Struct sbp::messages::system::msg_status_journal::MsgStatusJournal
source · pub struct MsgStatusJournal {
pub sender_id: Option<u16>,
pub reporting_system: u16,
pub sbp_version: u16,
pub total_status_reports: u32,
pub sequence_descriptor: u8,
pub journal: Vec<StatusJournalItem>,
}
Expand description
Status report journal
The status journal message contains past status reports (see MSG_STATUS_REPORT) and functions as a error/event storage for telemetry purposes.
Fields§
§sender_id: Option<u16>
The message sender_id
reporting_system: u16
Identity of reporting system
sbp_version: u16
SBP protocol version
total_status_reports: u32
Total number of status reports sent since system startup
sequence_descriptor: u8
Index and number of messages in this sequence. First nibble is the size of the sequence (n), second nibble is the zero-indexed counter (ith packet of n)
journal: Vec<StatusJournalItem>
Status journal
Implementations§
source§impl MsgStatusJournal
impl MsgStatusJournal
sourcepub fn system(&self) -> Result<System, u16>
pub fn system(&self) -> Result<System, u16>
Gets the System stored in the reporting_system
bitfield.
Returns Ok
if the bitrange contains a known System
variant.
Otherwise the value of the bitrange is returned as an Err(u16)
. This may be because of a malformed message,
or because new variants of System
were added.
sourcepub fn set_system(&mut self, system: System)
pub fn set_system(&mut self, system: System)
Set the bitrange corresponding to the System of the reporting_system
bitfield.
sourcepub fn sbp_major_protocol_version_number(&self) -> u8
pub fn sbp_major_protocol_version_number(&self) -> u8
Gets the sbp_major_protocol_version_number
stored in sbp_version
.
sourcepub fn set_sbp_major_protocol_version_number(
&mut self,
sbp_major_protocol_version_number: u8
)
pub fn set_sbp_major_protocol_version_number( &mut self, sbp_major_protocol_version_number: u8 )
Sets the sbp_major_protocol_version_number
bitrange of sbp_version
.
sourcepub fn sbp_minor_protocol_version_number(&self) -> u8
pub fn sbp_minor_protocol_version_number(&self) -> u8
Gets the sbp_minor_protocol_version_number
stored in sbp_version
.
sourcepub fn set_sbp_minor_protocol_version_number(
&mut self,
sbp_minor_protocol_version_number: u8
)
pub fn set_sbp_minor_protocol_version_number( &mut self, sbp_minor_protocol_version_number: u8 )
Sets the sbp_minor_protocol_version_number
bitrange of sbp_version
.
Trait Implementations§
source§impl Clone for MsgStatusJournal
impl Clone for MsgStatusJournal
source§fn clone(&self) -> MsgStatusJournal
fn clone(&self) -> MsgStatusJournal
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl ConcreteMessage for MsgStatusJournal
impl ConcreteMessage for MsgStatusJournal
source§const MESSAGE_TYPE: u16 = 65_533u16
const MESSAGE_TYPE: u16 = 65_533u16
source§const MESSAGE_NAME: &'static str = "MSG_STATUS_JOURNAL"
const MESSAGE_NAME: &'static str = "MSG_STATUS_JOURNAL"
source§impl Debug for MsgStatusJournal
impl Debug for MsgStatusJournal
source§impl<'de> Deserialize<'de> for MsgStatusJournal
impl<'de> Deserialize<'de> for MsgStatusJournal
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 MsgStatusJournal
impl FriendlyName for MsgStatusJournal
fn friendly_name() -> &'static str
source§impl From<MsgStatusJournal> for Sbp
impl From<MsgStatusJournal> for Sbp
source§fn from(msg: MsgStatusJournal) -> Self
fn from(msg: MsgStatusJournal) -> Self
source§impl PartialEq for MsgStatusJournal
impl PartialEq for MsgStatusJournal
source§fn eq(&self, other: &MsgStatusJournal) -> bool
fn eq(&self, other: &MsgStatusJournal) -> bool
self
and other
values to be equal, and is used
by ==
.