pub struct QueuedMonitor<Source, SourceTime, Verdict = Incremental, VerdictTime = RelativeFloat>where
    Source: Input,
    SourceTime: TimeRepresentation,
    Verdict: VerdictRepresentation,
    VerdictTime: OutputTimeRepresentation + 'static,
{ /* private fields */ }
Expand description

The QueuedMonitor is a threaded version of the Api allowing deadlines to be evaluated immediately.

The QueuedMonitor accepts new events and computes streams. It can compute streams based on new events through accept_event once the start function was invoked. Timed streams are evaluated automatically at their deadline. The resulting verdicts of events and deadlines are returned through a Receiver which can be obtained through output_queue. Note that the start function has to be invoked before any event can be evaluated. Finally, a calling end will block until all events have been evaluated.

The generic argument Source implements the Input trait describing the input source of the API. The generic argument SourceTime implements the TimeRepresentation trait defining the input time format. The generic argument Verdict implements the VerdictRepresentation trait describing the output format of the API that is by default Incremental. The generic argument VerdictTime implements the TimeRepresentation trait defining the output time format. It defaults to RelativeFloat

Implementations§

setup the api, while providing bounds for the queues.

Examples found in repository?
src/api/queued.rs (line 223)
219
220
221
222
223
224
    pub fn setup(
        config: Config<SourceTime, VerdictTime>,
        setup_data: Source::CreationData,
    ) -> QueuedMonitor<Source, SourceTime, Verdict, VerdictTime> {
        Self::bounded_setup(config, setup_data, QueueLength::Unbounded, QueueLength::Unbounded)
    }

setup the api

Examples found in repository?
src/configuration/config.rs (line 91)
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
    pub fn queued_monitor_with_data(
        self,
        data: Source::CreationData,
    ) -> QueuedMonitor<Source, SourceTime, Verdict, VerdictTime> {
        QueuedMonitor::setup(self.config, data)
    }

    #[cfg(feature = "queued-api")]
    /// Transforms the configuration into a [QueuedMonitor]
    pub fn queued_monitor(self) -> QueuedMonitor<Source, SourceTime, Verdict, VerdictTime>
    where
        Source: Input<CreationData = ()>,
    {
        QueuedMonitor::setup(self.config, ())
    }

Starts the evaluation process. This method has to be called before any event is accepted.

This method returns the queue through which the verdicts can be received.

Schedules a new event for evaluation. The verdict can be received through the Queue return by the QueuedMonitor::output_queue.

Ends the evaluation process and blocks until all events are processed.

Returns the underlying representation of the specification as an RtLolaMir

Get the name of an input stream based on its InputReference.

The reference is valid for the lifetime of the monitor.

Get the name of an output stream based on its OutputReference.

The reference is valid for the lifetime of the monitor.

Get the message of a trigger based on its index.

The reference is valid for the lifetime of the monitor.

Get the OutputReference of a trigger based on its index.

Get the number of input streams.

Get the number of output streams (this includes one output stream for each trigger).

Get the number of triggers.

Get the type of an input stream based on its InputReference.

The reference is valid for the lifetime of the monitor.

Get the type of an output stream based on its OutputReference.

The reference is valid for the lifetime of the monitor.

Get the extend rate of an output stream based on its OutputReference.

The reference is valid for the lifetime of the monitor.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.