pub struct SensorId(/* private fields */);
Expand description
Identifies a sensor. See also SensorIds
.
Implementations§
Source§impl SensorId
impl SensorId
Sourcepub const META_IDENTIFIER: SensorId
pub const META_IDENTIFIER: SensorId
A generic identifier, e.g. for describing a carrier board.
Sourcepub const fn new_with(
sensor_tag: u16,
sensor_type_id: u8,
value_type: ValueType,
) -> Self
pub const fn new_with( sensor_tag: u16, sensor_type_id: u8, value_type: ValueType, ) -> Self
Constructs a new sensor ID.
Sourcepub fn from(frame: &Version1DataFrame) -> Self
pub fn from(frame: &Version1DataFrame) -> Self
Constructs a new sensor ID from a Version1DataFrame
.
Sourcepub const fn with_sensor_tag(self, tag: u16) -> Self
pub const fn with_sensor_tag(self, tag: u16) -> Self
Consumes self and returns a new SensorId
that has tag.
Sourcepub fn value_type(&self) -> ValueType
pub fn value_type(&self) -> ValueType
Returns the sensor’s value type.
Sourcepub fn num_components(&self) -> Result<u8, ComponentLookupError>
pub fn num_components(&self) -> Result<u8, ComponentLookupError>
Trait Implementations§
Source§impl<'__de> BorrowDecode<'__de> for SensorId
impl<'__de> BorrowDecode<'__de> for SensorId
Source§fn borrow_decode<__D: BorrowDecoder<'__de>>(
decoder: &mut __D,
) -> Result<Self, DecodeError>
fn borrow_decode<__D: BorrowDecoder<'__de>>( decoder: &mut __D, ) -> Result<Self, DecodeError>
Attempt to decode this type with the given BorrowDecode.
Source§impl From<&Version1DataFrame> for SensorId
impl From<&Version1DataFrame> for SensorId
Source§fn from(value: &Version1DataFrame) -> Self
fn from(value: &Version1DataFrame) -> Self
Converts to this type from the input type.
Source§impl Ord for SensorId
impl Ord for SensorId
Source§impl PartialOrd for SensorId
impl PartialOrd for SensorId
impl Eq for SensorId
impl StructuralPartialEq for SensorId
Auto Trait Implementations§
impl Freeze for SensorId
impl RefUnwindSafe for SensorId
impl Send for SensorId
impl Sync for SensorId
impl Unpin for SensorId
impl UnwindSafe for SensorId
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