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§
source§impl 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§
source§impl Clone for MsgSensorAidEvent
impl Clone for MsgSensorAidEvent
source§fn clone(&self) -> MsgSensorAidEvent
fn clone(&self) -> MsgSensorAidEvent
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl ConcreteMessage for MsgSensorAidEvent
impl ConcreteMessage for MsgSensorAidEvent
source§const MESSAGE_TYPE: u16 = 65_289u16
const MESSAGE_TYPE: u16 = 65_289u16
source§const MESSAGE_NAME: &'static str = "MSG_SENSOR_AID_EVENT"
const MESSAGE_NAME: &'static str = "MSG_SENSOR_AID_EVENT"
source§impl Debug for MsgSensorAidEvent
impl Debug for MsgSensorAidEvent
source§impl<'de> Deserialize<'de> for MsgSensorAidEvent
impl<'de> Deserialize<'de> for MsgSensorAidEvent
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>,
source§impl FriendlyName for MsgSensorAidEvent
impl FriendlyName for MsgSensorAidEvent
fn friendly_name() -> &'static str
source§impl From<MsgSensorAidEvent> for Sbp
impl From<MsgSensorAidEvent> for Sbp
source§fn from(msg: MsgSensorAidEvent) -> Self
fn from(msg: MsgSensorAidEvent) -> Self
source§impl PartialEq for MsgSensorAidEvent
impl PartialEq for MsgSensorAidEvent
source§fn eq(&self, other: &MsgSensorAidEvent) -> bool
fn eq(&self, other: &MsgSensorAidEvent) -> bool
self
and other
values to be equal, and is used
by ==
.