[−][src]Struct lrl_test_compiler::environment::Environment
Represents the contextual information for interpretting a test descriptor file. This is really just a wrapper around Config with an in memory cache of all the calibration tables needed.
Fields
config: Config
drivers_file: Option<DriversFile>
table_cache: HashMap<PathBuf, Calibration>
Implementations
impl Environment
[src]
const HEADER_LEN: u32
[src]
Length of the binary config header in bytes
const SECTION_HEADER: u32
[src]
Length of the binary config section headers in bytes
const RELAY_LEN: u32
[src]
Length of a single relay in bytes
const SENSOR_LEN: u32
[src]
Length of a single sensor in bytes
const GLOBAL_BOUNDS_LEN: u32
[src]
Length of a single global bounds entry in bytes
fn append_header_to_buffer(&self, buffer: &mut BitWriter)
[src]
Appends the binary config header to a buffer
fn append_relays_to_buffer(&self, buffer: &mut BitWriter)
[src]
Appends the relays to a buffer
fn append_sensors_to_buffer(&self, buffer: &mut BitWriter)
[src]
Appends the sensors to a buffer
fn append_v_relays_to_buffer(&self, buffer: &mut BitWriter)
[src]
Appends the virtual relays to a buffer
fn append_v_sensors_to_buffer(&self, buffer: &mut BitWriter)
[src]
Appends the virtual sensors to a buffer
fn append_safe_state_to_buffer(&self, buffer: &mut BitWriter)
[src]
Appends the safe state to a buffer
fn append_global_bounds_to_buffer(
&self,
buffer: &mut BitWriter
) -> CompilerResult<()>
[src]
&self,
buffer: &mut BitWriter
) -> CompilerResult<()>
Appends the global bounds to a buffer
fn append_footer_to_buffer(&self, buffer: &mut BitWriter) -> u32
[src]
Appends the binary config footer to the buffer
pub fn append_to_buffer(&self, buffer: &mut BitWriter) -> u32
[src]
Appends the body of the config to a buffer
impl Environment
[src]
pub fn get_calibration(
&self,
sensor_id: &str
) -> CompilerResult<Option<&Calibration>>
[src]
&self,
sensor_id: &str
) -> CompilerResult<Option<&Calibration>>
Get calibration for provided sensor id
pub fn boolean_calibration_lookup(
calibration: &BooleanCalibration,
bool_value: bool
) -> CompilerResult<(u16, u16)>
[src]
calibration: &BooleanCalibration,
bool_value: bool
) -> CompilerResult<(u16, u16)>
Attempt to perform a calibration lookup on the boolean input value using the provided boolean calibration table.
pub fn numeric_calibration_lookup(
calibration: &NumericCalibration,
constraint: (f64, f64)
) -> CompilerResult<(u16, u16)>
[src]
calibration: &NumericCalibration,
constraint: (f64, f64)
) -> CompilerResult<(u16, u16)>
Attempt to perform a calibration lookup on the sensor constraint using the input numeric calibration.
pub fn raw_calibration_lookup(
constraint: (f64, f64)
) -> CompilerResult<(u16, u16)>
[src]
constraint: (f64, f64)
) -> CompilerResult<(u16, u16)>
Trait Implementations
impl Debug for Environment
[src]
impl PartialEq<Environment> for Environment
[src]
fn eq(&self, other: &Environment) -> bool
[src]
fn ne(&self, other: &Environment) -> bool
[src]
impl StructuralPartialEq for Environment
[src]
Auto Trait Implementations
impl RefUnwindSafe for Environment
impl Send for Environment
impl Sync for Environment
impl Unpin for Environment
impl UnwindSafe for Environment
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>,