pub struct ConfigBuilder<C: SubConfig, S: ConfigState, OutputTime: OutputTimeRepresentation> { /* private fields */ }
Expand description

The main entry point of the application. Use the various methods to construct a configuration either for running the interpreter directly or to use the Monitor API interface.

An example construction of the API:

use rtlola_interpreter::ConfigBuilder;
use rtlola_interpreter::monitor::{EventInput, Incremental};
use rtlola_interpreter::{Monitor, Value};
use rtlola_interpreter::time::RelativeFloat;

let monitor: Monitor<_,_,Incremental,_> =
    ConfigBuilder::api()
        .spec_str("input i: Int64")
        .input_time::<RelativeFloat>()
        .event_input::<Vec<Value>>()
        .with_verdict::<Incremental>()
        .monitor();

An example configuration to run the interpreter:

use rtlola_interpreter::ConfigBuilder;
use rtlola_interpreter::monitor::{EventInput, Incremental};
use rtlola_interpreter::{Monitor, Value};
use rtlola_interpreter::config::Verbosity;
use std::path::PathBuf;
use rtlola_interpreter::time::RelativeFloat;

 ConfigBuilder::runnable()
    .spec_str("input a: Int64")
    .input_time::<RelativeFloat>()
    .offline()
    .verbosity(Verbosity::Silent)
    .csv_file_input(PathBuf::from("traces/tests/count_1_2.csv"), None)
    .run();

Implementations

Creates a new executable configuration.

Creates a new configuration to be used with the API.

Sets the format in which time is returned. See the README for more details on time formats. For possible formats see the OutputTimeRepresentation trait.

Sets the start time of the execution.

Use an existing ir with the configuration

Read the specification from a file at the given path.

Read the specification from the given string.

Use an existing ir with the configuration

Sets the execute mode to be offline, i.e. takes the time of events from the input source. The time representation is given as the type parameter. See the README for further details on time representations. For possible TimeRepresentations see the Time Module.

Sets the execute mode to be online, i.e. the time of events is taken by the interpreter.

Take the events from a given CSV file at ‘path’. Optionally, the time column in the input can be specified.

Take the events in CSV format from stdin. Optionally, the time column in the input can be specified.

A delay is set to ignore the given timestamps in the input and take the delay as the time between the events.

Enable the output of statistics like processes events per second.

Set the output verbosity

Print the output to a file at path

Print the output to stdout

Print the output to stderr

Use the predefined EventInput method to provide inputs to the API.

Use the predefined RecordInput method to provide inputs to the API.

Use a custom input method to provide inputs to the API.

Sets the VerdictRepresentation for the monitor

Finalize the configuration and generate a configuration.

Create a Monitor from the configuration. The entrypoint of the API. The data is provided to the Input source at creation.

Create a Monitor from the configuration. The entrypoint of the API.

Finalize the configuration and generate a configuration.

Run the interpreter with the constructed configuration

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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 resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

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.