getDownscaledCapacity
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 downsizing is needed within the used strategy, false if no resizing is needed.
- Return type:
BOOL
Parameters
| Name | Type | Comment | Kind |
|---|---|---|---|
| requestedSize | UDINT | the new size that is needed | input |
| currentCapacity | UDINT | the current actual size of the container | input |
| newCapacity | UDINT | the calculated size of the container | output |
Code
Declaration
METHOD getDownscaledCapacity : 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
Implementation
newCapacity := currentCapacity;
getDownscaledCapacity := FALSE;