Skip to main content

getUpscaledCapacity

Short summary

The method takes the requested size and the current capacity as input and determines the next suitable capacity value based on the implemented resizing strategy. The resulting capacity is returned as newCapacity. It returns true when a resizing is needed wihtin the used strategy, false if no resizing is needed.

  • Return type: BOOL

Parameters

NameTypeCommentKind
requestedSizeUDINTthe new size that is neededinput
currentCapacityUDINTthe current actual size of the containerinput
newCapacityUDINTthe calculated size of the containeroutput

Code

Declaration

METHOD getUpscaledCapacity : BOOL
VAR_INPUT
(* the new size that is needed *)
requestedSize :UDINT;
(* the current actual size of the container *)
currentCapacity :UDINT;
END_VAR
VAR_OUTPUT
(* the calculated size of the container *)
newCapacity :UDINT;
END_VAR