pub struct TankLevelSwitchSignals {
pub tank_level_switch_position: bool,
pub tank_level_switch_position_stabilized: bool,
pub tank_level_switch_invalid: bool,
}Expand description
Contains all signal information from the tank level switch relevant for other threads:
- measured tank level switch position
- stabilized tank level switch position
- flag indicating if the tank level switch position is invalid
Fields§
§tank_level_switch_position: boolmeasured pin state
tank_level_switch_position_stabilized: boolcalculated stabilized pin state
tank_level_switch_invalid: boolflag indicating if the tank level switch position is invalid
Implementations§
Source§impl TankLevelSwitchSignals
impl TankLevelSwitchSignals
Sourcepub fn new(
tank_level_switch_position: bool,
tank_level_switch_position_stabilized: bool,
tank_level_switch_invalid: bool,
) -> TankLevelSwitchSignals
pub fn new( tank_level_switch_position: bool, tank_level_switch_position_stabilized: bool, tank_level_switch_invalid: bool, ) -> TankLevelSwitchSignals
Creates a new TankLevelSwitchSignals struct with initial status values.
This constructor sets the initially measured position, the calculated stabilized position, and the validity flag of the tank level switch. It’s a general-purpose constructor for this data-holding struct.
§Arguments
tank_level_switch_position- The initial measured pin state (truefor high water,falsefor low).tank_level_switch_position_stabilized- The initial calculated stabilized pin state.tank_level_switch_invalid- The initial flag indicating if the switch position is considered invalid.
§Returns
A new TankLevelSwitchSignals struct.
Auto Trait Implementations§
impl Freeze for TankLevelSwitchSignals
impl RefUnwindSafe for TankLevelSwitchSignals
impl Send for TankLevelSwitchSignals
impl Sync for TankLevelSwitchSignals
impl Unpin for TankLevelSwitchSignals
impl UnwindSafe for TankLevelSwitchSignals
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more