Trait sbp::SbpMessage
source · pub trait SbpMessage: WireFormat + Clone + Sized {
fn message_name(&self) -> &'static str;
fn message_type(&self) -> u16;
fn sender_id(&self) -> Option<u16>;
fn set_sender_id(&mut self, new_id: u16);
fn encoded_len(&self) -> usize;
fn friendly_name(&self) -> &'static str { ... }
}
Expand description
Common functionality available to all SBP messages.
Required Methods§
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.
Provided Methods§
sourcefn friendly_name(&self) -> &'static str
fn friendly_name(&self) -> &'static str
Get friendly name associated with the message.