Module rtlola_interpreter::time
source · Expand description
This module contains the different time representations of the interpreter.
Time Representations
The RTLola interpreter supports multiple representations of time in its input and output. If run in offline mode, meaning the time for an event is parsed from the input source, the format in which the time is present in the input has to be set. Consider the following example CSV file:
a,b,time 0,1,0.1 2,3,0.2 4,5,0.3
The supported time representations are:
Relative
Time is considered relative to a fixed point in time. Call this point in time x then in the example above
the first event gets the timestamp x + 0.1, the second one x + 0.2 and so forth.
Incremental
Time is considered relative to the preceding event. This induces the following timestamps for the above example:
a,b, time 0,1, x + 0.1 2,3, x + 0.3 4,5, x + 0.6
Absolute
Time is parsed as absolute timestamps.
Note: The evaluation of periodic streams depends on the time passed between events. Depending on the representation, determining the time that passed before the first event is not obvious. While the relative and incremental representations do not strictly need a point of reference to determine the time passed, the absolute representation requires such a point of reference. This point of time can either be directly supplied during configuration using the start_time method or inferred as the time of the first event. The latter consequently assumes that no time has passed before the first event in the input.