Struct rtlola_frontend::mir::RtLolaMir
source · [−]pub struct RtLolaMir {
pub inputs: Vec<InputStream>,
pub outputs: Vec<OutputStream>,
pub time_driven: Vec<TimeDrivenStream>,
pub event_driven: Vec<EventDrivenStream>,
pub discrete_windows: Vec<DiscreteWindow>,
pub sliding_windows: Vec<SlidingWindow>,
pub triggers: Vec<Trigger>,
}
Expand description
This struct constitutes the Mid-Level Intermediate Representation (MIR) of an RTLola specification.
The RtLolaMir is specifically designed to allow convenient navigation and access to data. Hence, it is perfect for working with the specification rather than work on it.
Most Notable Structs and Enums
- Stream is a trait offering several convenient access methods for everything constituting a stream.
- OutputStream represents a single output stream. The data structure is enriched with information regarding streams accessing it or accessed by it and much more. For input streams confer InputStream.
- StreamReference used for referencing streams within the Mir.
- InstanceTemplate contains all information regarding the parametrization and spawning behavior of streams.
- Expression represents an expression. It contains its ExpressionKind and its type. The latter contains all information specific to a certain kind of expression such as sub-expressions of operators.
See Also
- rtlola_frontend for an overview regarding different representations.
- rtlola_frontend::parse to obtain an RtLolaMir for a specification in form of a string or path to a specification file.
- rtlola_hir::hir::RtLolaHir for a data structs designed for working _on_it.
- RtLolaAst, which is the most basic and down-to-syntax data structure available for RTLola.
Fields
inputs: Vec<InputStream>
Contains all input streams.
outputs: Vec<OutputStream>
Contains all output streams including all triggers. They only contain the information relevant for every single kind of output stream. Refer to RtLolaMir::time_driven, RtLolaMir::event_driven, and RtLolaMir::triggers for more information.
time_driven: Vec<TimeDrivenStream>
References and pacing information of all time-driven streams.
event_driven: Vec<EventDrivenStream>
References and pacing information of all event-driven streams.
discrete_windows: Vec<DiscreteWindow>
A collection of all discrete windows.
sliding_windows: Vec<SlidingWindow>
A collection of all sliding windows.
triggers: Vec<Trigger>
References and message information of all triggers.
Implementations
sourceimpl RtLolaMir
impl RtLolaMir
sourcepub fn input_refs(&self) -> impl Iterator<Item = InputReference>
pub fn input_refs(&self) -> impl Iterator<Item = InputReference>
Returns a collection containing a reference to each input stream in the specification.
sourcepub fn output_refs(&self) -> impl Iterator<Item = OutputReference>
pub fn output_refs(&self) -> impl Iterator<Item = OutputReference>
Returns a collection containing a reference to each output stream in the specification.
sourcepub fn input_mut(&mut self, reference: StreamReference) -> &mut InputStream
pub fn input_mut(&mut self, reference: StreamReference) -> &mut InputStream
sourcepub fn input(&self, reference: StreamReference) -> &InputStream
pub fn input(&self, reference: StreamReference) -> &InputStream
sourcepub fn output_mut(&mut self, reference: StreamReference) -> &mut OutputStream
pub fn output_mut(&mut self, reference: StreamReference) -> &mut OutputStream
sourcepub fn output(&self, reference: StreamReference) -> &OutputStream
pub fn output(&self, reference: StreamReference) -> &OutputStream
sourcepub fn stream(&self, reference: StreamReference) -> &dyn Stream
pub fn stream(&self, reference: StreamReference) -> &dyn Stream
Provides immutable access to a stream.
sourcepub fn all_streams(&self) -> impl Iterator<Item = StreamReference>
pub fn all_streams(&self) -> impl Iterator<Item = StreamReference>
Produces an iterator over all stream references.
sourcepub fn all_triggers(&self) -> Vec<&OutputStream>
pub fn all_triggers(&self) -> Vec<&OutputStream>
Provides a collection of all output streams representing a trigger.
sourcepub fn all_event_driven(&self) -> Vec<&OutputStream>
pub fn all_event_driven(&self) -> Vec<&OutputStream>
Provides a collection of all event-driven output streams.
sourcepub fn has_time_driven_features(&self) -> bool
pub fn has_time_driven_features(&self) -> bool
Return true if the specification contains any time-driven features. This includes time-driven streams and time-driven spawn conditions.
sourcepub fn all_time_driven(&self) -> Vec<&OutputStream>
pub fn all_time_driven(&self) -> Vec<&OutputStream>
Provides a collection of all time-driven output streams.
sourcepub fn get_ac(&self, sref: StreamReference) -> Option<&ActivationCondition>
pub fn get_ac(&self, sref: StreamReference) -> Option<&ActivationCondition>
Provides the activation contion of a event-driven stream and none if the stream is time-driven
sourcepub fn discrete_window(&self, window: WindowReference) -> &DiscreteWindow
pub fn discrete_window(&self, window: WindowReference) -> &DiscreteWindow
Provides immutable access to a discrete window.
Panic
Panics if window
is a WindowReference::Sliding.
sourcepub fn sliding_window(&self, window: WindowReference) -> &SlidingWindow
pub fn sliding_window(&self, window: WindowReference) -> &SlidingWindow
Provides immutable access to a sliding window.
Panic
Panics if window
is a WindowReference::Discrete.
sourcepub fn get_event_driven_layers(&self) -> Vec<Vec<Task>>
pub fn get_event_driven_layers(&self) -> Vec<Vec<Task>>
Provides a representation for the evaluation layers of all event-driven output streams. Each element of the outer Vec
represents a layer, each element of the inner Vec
an output stream in the layer.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for RtLolaMir
impl<'de> Deserialize<'de> for RtLolaMir
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for RtLolaMir
Auto Trait Implementations
impl RefUnwindSafe for RtLolaMir
impl Send for RtLolaMir
impl Sync for RtLolaMir
impl Unpin for RtLolaMir
impl UnwindSafe for RtLolaMir
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more