numberOfValues function
Requirements.Internal.SlidingWindow.numberOfValues
ยท source
Returns the number of values in the buffer
Extends Modelica.Icons.Function
Returns the number of elements currently stored in the buffer, buffer.nElem (0 for an empty
buffer, at most nBuffer; when the buffer is
full, push drops the oldest element). The counting checks of
ChecksInSlidingWindow (e.g.
MinRising,
MaxFrequency) push one element per
rising edge and remove the elements that leave the window, so this is the number of rising edges in the
sliding time window.
Inputs
| Name | Type | Description |
|---|---|---|
buffer input | Buffer | Memory of sliding window |
Outputs
| Name | Type | Description |
|---|---|---|
result output | Integer | Number of values in the buffer |