pub enum ModelCheck {
Match {
device_code: u16,
},
Mismatch {
expected_code: u16,
device_code: u16,
},
Inconclusive {
device_code: u16,
},
}Expand description
Outcome of crate::Xy::verify_model. Mismatch is the dangerous
case — readings WILL be off by 10× until the configured Model is
changed to match the hardware.
Variants§
Match
Device’s MODEL register matches the configured model’s family.
Mismatch
Device reports a code mapped to a different scale family. The
configured Model is wrong for this hardware; readings will
be off until it’s corrected.
Inconclusive
Verification was not possible: either the device returned a
code outside the documented set, or the configured model is
Custom (no canonical expected code).
Trait Implementations§
Source§impl Clone for ModelCheck
impl Clone for ModelCheck
Source§fn clone(&self) -> ModelCheck
fn clone(&self) -> ModelCheck
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 ModelCheck
impl Debug for ModelCheck
Source§impl<'de> Deserialize<'de> for ModelCheck
impl<'de> Deserialize<'de> for ModelCheck
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
Source§impl Format for ModelCheck
impl Format for ModelCheck
Source§impl PartialEq for ModelCheck
impl PartialEq for ModelCheck
Source§impl Serialize for ModelCheck
impl Serialize for ModelCheck
impl Copy for ModelCheck
impl Eq for ModelCheck
impl StructuralPartialEq for ModelCheck
Auto Trait Implementations§
impl Freeze for ModelCheck
impl RefUnwindSafe for ModelCheck
impl Send for ModelCheck
impl Sync for ModelCheck
impl Unpin for ModelCheck
impl UnsafeUnpin for ModelCheck
impl UnwindSafe for ModelCheck
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