Expand description

The API of the RTLola interpreter. It is used to evaluate input events on a given specification and output the results. The main structure is the Monitor which is parameterized over its input and output method. The preferred method to create a Monitor is using the ConfigBuilder and the monitor method.

Input Method

An input method has to implement the Input trait. Out of the box two different methods are provided:

  • EventInput: Provides a basic input method for anything that already is an Event or that can be transformed into one using Into<Event>.
  • RecordInput: Is a more elaborate input method. It allows to provide a custom data structure to the monitor as an input, as long as it implements the Record trait. If implemented this traits provides functionality to generate a new value for any input stream from the data structure.

Output Method

The Monitor can provide output with a varying level of detail captured by the VerdictRepresentation trait. The different output formats are:

  • Incremental: For each processed event a condensed list of monitor state changes is provided.
  • Total: For each event a complete snapshot of the current monitor state is returned
  • TriggerMessages: For each event a list of violated triggers with their description is produced.
  • TriggersWithInfoValues: For each event a list of violated triggers with their specified corresponding values is returned.

Structs

The simplest input method to the monitor. It accepts any type that implements Into<Event>. The conversion to values and the order of inputs must be handled externally.

The Monitor is the central object exposed by the API.

A raw verdict that is transformed into the respective representation

An input method for types that implement the Record trait. Useful if you do not want to bother with the order of the input streams in an event. Assuming the specification has 3 inputs: ‘a’, ‘b’ and ‘c’. You could implement this trait for your custom ‘MyType’ as follows:

Represents a snapshot of the monitor state containing the current value of each output and input stream.

The Verdicts struct represents the verdict of the API.

Enums

An enum representing a change in the monitor.

Traits

This trait provides the functionality to pass inputs to the monitor. You can either implement this trait for your own Datatype or use one of the predefined input methods. See RecordInput and EventInput

This trait provides functionality to parse a record into an event. It is only used in combination with the RecordInput.

Provides the functionality to generate a snapshot of the streams values.

Type Definitions

An event to be handled by the interpreter

Represents the changes of the monitor state. Each element represents a set of Changes of a specific output stream.

A stream instance. First element represents the parameter values of the instance, the second element the value of the instance.

A type representing the parameters of a stream. If a stream is not dynamically created it defaults to None. If a stream is dynamically created but does not have parameters it defaults to Some(vec![])

Represents the index and the formatted message of all violated triggers.

Represents the index and the info values of all violated triggers.