Ranges

A range is a time interval with a start and an end time. Ranges are used to represent subsets of samples to calculate a reduction function. A range includes all samples with time stamps greater than the start and less or equal the end, i.e. it is an interval that is open on the left and closed on the right.

Ranges can be used both as output of a calculation (e.g. Window_Signal) or as input of a calculation (Accumulate_Rolling). Ranges are not a separate data type but are encoded as a scalar signal where:

Value = start time

Time = end time

This means that the end time is implicit and cannot be selected as a separate signal. It can be accessed using the Master() function.

Examples:

  • A range over the last 2 seconds can be created by
    Master() - 2
  • Rolling average over the last 10 samples
    State_Delay(Master(), 0, 10)

Note: Due to the mapping of end time of the ranges to time stamps the end times have to be strictly monotonously increasing.