[−][src]Struct lrl_test_compiler::test_builder::TestBuilder
Builder for a TDF test struct and the associated environment
Fields
test: Test
env: Environment
Implementations
impl TestBuilder
[src]
pub fn new() -> Self
[src]
Create an empty TestBuilder with default test and environment
fn default_test() -> Test
[src]
Build a completely empty Test struct
fn default_env() -> Environment
[src]
Build a completely empty Environment struct apart from a couple necessary config values
pub fn with_abort(&mut self, abort_name: &str) -> InstructionStreamBuilder<'_>
[src]
Add an abort to the test struct and return an InstructionStreamBuilder that will build instructions for this abort
pub fn with_body(&mut self) -> InstructionStreamBuilder<'_>
[src]
Get an InstructionStreamBuilder that will build instructions for the test body
pub fn with_sensor(&mut self, sensor_name: &str) -> &mut Self
[src]
Add a sensor record into the environment if one with the given name does not already exist Automatically uses a 1ms polling interval and the numeric calibration file in the tests/input_files directory
pub fn with_relay(&mut self, relay_name: &str) -> &mut Self
[src]
Add a relay record into the environment if one with the given name does not already exist.
pub fn with_v_sensor(&mut self, sensor_name: &str) -> &mut Self
[src]
Add a virtual sensor record into the environment if one with the given name does not already exist. Automatically uses the driver "test_sensor_driver" with no arguments, a 1ms polling interval, and the numeric calibration file in the tests/input_files directory
pub fn with_v_relay(&mut self, relay_name: &str) -> &mut Self
[src]
Add a virtual relay record into the environment if one with the given name does not already exist. Automatically uses the driver "test_relay_driver" with no arguments.
pub fn with_safe_state_relay(&mut self, relay_name: &str) -> &mut Self
[src]
Add a relay name into the configured safe state No error checks are performed
fn get_section_with_name(
&self,
section_name: &str,
stream_id: &StreamId<'_>
) -> &Vec<Statement>
[src]
&self,
section_name: &str,
stream_id: &StreamId<'_>
) -> &Vec<Statement>
Get a reference to the statements within the section statement defined with the given name. Searches for the section name within the given StreamId This is used to add statements using the StreamId::Section Variant
fn get_section_with_name_mut(
&mut self,
section_name: &str,
stream_id: &StreamId<'_>
) -> &mut Vec<Statement>
[src]
&mut self,
section_name: &str,
stream_id: &StreamId<'_>
) -> &mut Vec<Statement>
Get a mutable reference to the statements within the section statement defined with the given name. Searches for the section name within the given StreamId This is used to add statements using the StreamId::Section Variant
pub fn get_statements(&self, stream_id: &StreamId<'_>) -> &Vec<Statement>
[src]
Get the vector of statements in the given stream id
pub fn get_statements_mut(
&mut self,
stream_id: &StreamId<'_>
) -> &mut Vec<Statement>
[src]
&mut self,
stream_id: &StreamId<'_>
) -> &mut Vec<Statement>
Get a mutable reference to the vector of statements in the given stream id
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for TestBuilder
impl Send for TestBuilder
impl Sync for TestBuilder
impl Unpin for TestBuilder
impl UnwindSafe for TestBuilder
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<Src, Dst> LosslessTryInto<Dst> for Src where
Dst: LosslessTryFrom<Src>,
[src]
Dst: LosslessTryFrom<Src>,
pub fn lossless_try_into(self) -> Option<Dst>
[src]
impl<Src, Dst> LossyInto<Dst> for Src where
Dst: LossyFrom<Src>,
[src]
Dst: LossyFrom<Src>,
pub fn lossy_into(self) -> Dst
[src]
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
[src]
V: MultiLane<T>,