pub struct EasySensor {
pub sensor_value: i32,
pub sensor_type: u8,
pub sensor_refresh_period: u8,
pub sensor_failsafe_config: u8,
pub sensor_reading_id: u8,
pub sensor_id: [u8; 8],
pub sensor_ok_status: u8,
}Expand description
EasySensor data structure
Fields§
§sensor_value: i32§sensor_type: u8§sensor_refresh_period: u8§sensor_failsafe_config: u8§sensor_reading_id: u8§sensor_id: [u8; 8]§sensor_ok_status: u8Implementations§
Source§impl EasySensor
impl EasySensor
pub fn new() -> Self
pub fn is_ok(&self) -> bool
pub fn get_refresh_period_seconds(&self) -> f32
pub fn set_refresh_period_seconds(&mut self, seconds: f32)
pub fn get_failsafe_timeout(&self) -> u8
pub fn set_failsafe_timeout(&mut self, timeout_seconds: u8)
pub fn is_failsafe_invalid_zero(&self) -> bool
pub fn set_failsafe_invalid_zero(&mut self, enable: bool)
pub fn is_failsafe_invalid_max(&self) -> bool
pub fn set_failsafe_invalid_max(&mut self, enable: bool)
Trait Implementations§
Source§impl Clone for EasySensor
impl Clone for EasySensor
Source§fn clone(&self) -> EasySensor
fn clone(&self) -> EasySensor
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for EasySensor
impl Debug for EasySensor
Source§impl Default for EasySensor
impl Default for EasySensor
Source§impl<'de> Deserialize<'de> for EasySensor
impl<'de> Deserialize<'de> for EasySensor
Source§fn 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
Auto Trait Implementations§
impl Freeze for EasySensor
impl RefUnwindSafe for EasySensor
impl Send for EasySensor
impl Sync for EasySensor
impl Unpin for EasySensor
impl UnsafeUnpin for EasySensor
impl UnwindSafe for EasySensor
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