indexTime function
Requirements.Internal.SlidingWindow.indexTime
ยท source
Returns the time value at buffer index
Extends Modelica.Icons.Function
Returns the time instant of the element at position index of the buffer, counted from the newest
element: index = 1 is the newest element, index = nElem the oldest one. The position
is mapped to the index in the ring, wrapping around below 1 to nBuffer. It asserts
1 ≤ index ≤ nElem. The value of the same element is returned by
indexValue. Used by
maxDuration and
accumulatedDuration to read the
instants at which the signal changed.
Inputs
| Name | Type | Description |
|---|---|---|
buffer input | Buffer | Memory of sliding window |
index input | Integer | Index of time value (index >= 1; index=1: first) |
Outputs
| Name | Type | Description |
|---|---|---|
t output | SI.Time | Time value at index of buffer |