Struct sbp::messages::system::msg_sensor_aid_event::MsgSensorAidEvent
source · [−]pub struct MsgSensorAidEvent {
pub sender_id: Option<u16>,
pub time: u32,
pub sensor_type: u8,
pub sensor_id: u16,
pub sensor_state: u8,
pub n_available_meas: u8,
pub n_attempted_meas: u8,
pub n_accepted_meas: u8,
pub flags: u32,
}
Expand description
Sensor state and update status data
This diagnostic message contains state and update status information for all sensors that are being used by the fusion engine. This message will be generated asynchronously to the solution messages and will be emitted anytime a sensor update is being processed.
Fields
sender_id: Option<u16>
The message sender_id
time: u32
Update timestamp in milliseconds.
sensor_type: u8
Sensor type
sensor_id: u16
Sensor identifier
sensor_state: u8
Reserved for future use
n_available_meas: u8
Number of available measurements in this epoch
n_attempted_meas: u8
Number of attempted measurements in this epoch
n_accepted_meas: u8
Number of accepted measurements in this epoch
flags: u32
Reserved for future use
Implementations
sourceimpl MsgSensorAidEvent
impl MsgSensorAidEvent
sourcepub fn type_identifier(&self) -> Result<TypeIdentifier, u8>
pub fn type_identifier(&self) -> Result<TypeIdentifier, u8>
Gets the TypeIdentifier stored in the sensor_type
bitfield.
Returns Ok
if the bitrange contains a known TypeIdentifier
variant.
Otherwise the value of the bitrange is returned as an Err(u8)
. This may be because of a malformed message,
or because new variants of TypeIdentifier
were added.
sourcepub fn set_type_identifier(&mut self, type_identifier: TypeIdentifier)
pub fn set_type_identifier(&mut self, type_identifier: TypeIdentifier)
Set the bitrange corresponding to the TypeIdentifier of the sensor_type
bitfield.
Trait Implementations
sourceimpl Clone for MsgSensorAidEvent
impl Clone for MsgSensorAidEvent
sourcefn clone(&self) -> MsgSensorAidEvent
fn clone(&self) -> MsgSensorAidEvent
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl ConcreteMessage for MsgSensorAidEvent
impl ConcreteMessage for MsgSensorAidEvent
sourceconst MESSAGE_TYPE: u16
const MESSAGE_TYPE: u16
The message type.
sourceconst MESSAGE_NAME: &'static str
const MESSAGE_NAME: &'static str
The message name.
sourceimpl Debug for MsgSensorAidEvent
impl Debug for MsgSensorAidEvent
sourceimpl From<MsgSensorAidEvent> for Sbp
impl From<MsgSensorAidEvent> for Sbp
sourcefn from(msg: MsgSensorAidEvent) -> Self
fn from(msg: MsgSensorAidEvent) -> Self
Performs the conversion.
sourceimpl SbpMessage for MsgSensorAidEvent
impl SbpMessage for MsgSensorAidEvent
sourcefn message_name(&self) -> &'static str
fn message_name(&self) -> &'static str
Get the message name.
sourcefn message_type(&self) -> u16
fn message_type(&self) -> u16
Get the message type.
sourcefn set_sender_id(&mut self, new_id: u16)
fn set_sender_id(&mut self, new_id: u16)
Set the sender id.
sourcefn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Number of bytes this message will take on the wire.
Auto Trait Implementations
impl RefUnwindSafe for MsgSensorAidEvent
impl Send for MsgSensorAidEvent
impl Sync for MsgSensorAidEvent
impl Unpin for MsgSensorAidEvent
impl UnwindSafe for MsgSensorAidEvent
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more