lastValue function
Requirements.Internal.SlidingWindow.lastValue
ยท source
Returns the oldest value
Extends Modelica.Icons.Function
Returns the Boolean value of the oldest element of the buffer (index last), the value of the
signal at the oldest change still in the sliding window. It asserts that the buffer is not empty. The time
of this element is indexTime(buffer, nElem);
the newest value is returned by firstValue.
Used by maxDuration and
accumulatedDuration: if the oldest
value is false, the signal was true before it, from the start of the window on.
Inputs
| Name | Type | Description |
|---|---|---|
buffer input | Buffer | Memory of sliding window |
Outputs
| Name | Type | Description |
|---|---|---|
b output | Boolean | Oldest value |