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
sourceimpl 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
sourceimpl Clone for MsgStatusJournal
impl Clone for MsgStatusJournal
sourcefn clone(&self) -> MsgStatusJournal
fn clone(&self) -> MsgStatusJournal
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 MsgStatusJournal
impl ConcreteMessage for MsgStatusJournal
sourceconst MESSAGE_TYPE: u16 = 65_533u16
const MESSAGE_TYPE: u16 = 65_533u16
The message type.
sourceconst MESSAGE_NAME: &'static str = "MSG_STATUS_JOURNAL"
const MESSAGE_NAME: &'static str = "MSG_STATUS_JOURNAL"
The message name.
sourceimpl Debug for MsgStatusJournal
impl Debug for MsgStatusJournal
sourceimpl From<MsgStatusJournal> for Sbp
impl From<MsgStatusJournal> for Sbp
sourcefn from(msg: MsgStatusJournal) -> Self
fn from(msg: MsgStatusJournal) -> Self
Converts to this type from the input type.
sourceimpl SbpMessage for MsgStatusJournal
impl SbpMessage for MsgStatusJournal
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 MsgStatusJournal
impl Send for MsgStatusJournal
impl Sync for MsgStatusJournal
impl Unpin for MsgStatusJournal
impl UnwindSafe for MsgStatusJournal
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more