Expand description
The Monitor is the single threaded version of the API. Consequently deadlines of timed streams are only evaluated with a new event. Hence this API is more suitable for offline monitoring or embedded scenarios.
The Monitor is parameterized over its input and output method. The preferred method to create an API is using the ConfigBuilder and the monitor method.
§Input Method
An input method has to implement the EventFactory trait. Out of the box two different methods are provided:
- ArrayFactory: Provides a basic input method for anything that already is an Event or that can be transformed into one using
TryInto<[Value]>
. - MappedFactory: Is a more elaborate input method. It allows to provide a custom data structure to the monitor as an event, as long as it implements the InputMap 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
- TotalIncremental: For each processed event a complete list of monitor state changes is provided
- TriggerMessages: For each event a list of violated triggers with their description is produced.
Structs§
- Monitor
- The Monitor is the central object exposed by the API.
- NoTracer
- This tracer provides no tracing data at all and serves as a default value.
- RawVerdict
- A raw verdict that is transformed into the respective representation
- Total
- Represents a snapshot of the monitor state containing the current value of each output and input stream.
- Total
Incremental - Represents the changes of the monitor state divided into inputs, outputs and trigger. Changes of output streams are represented by a set of Changes. A change of an input is represented by its new Value. A change of a trigger is represented by its TriggerReference.
- Tracing
Verdict - A generic VerdictRepresentation suitable to use with any tracer.
- Verdicts
- The Verdicts struct represents the verdict of the API.
Enums§
- Change
- An enum representing a change in the monitor.
Traits§
- Tracer
- Provides the functionality to collect additional tracing data during evaluation. The ‘start’ methods are guaranteed to be called before the ‘end’ method, while either both or none of them are called.
- Verdict
Representation - Provides the functionality to generate a snapshot of the streams values.
Type Aliases§
- Event
- An event to be handled by the interpreter
- Incremental
- Represents the changes of the monitor state. Each element represents a set of Changes of a specific output stream.
- Instance
- A stream instance. First element represents the parameter values of the instance, the second element the value of the instance.
- Parameters
- 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 toSome(vec![])
- Trigger
Messages - Represents the index and the formatted message of all violated triggers.