pub struct MAVLinkV1MessageRaw(/* private fields */);
Expand description
Byte buffer containing the raw representation of a MAVLink 1 message beginning with the STX marker.
Follow protocol definition: https://mavlink.io/en/guide/serialization.html#v1_packet_format. Maximum size is 263 bytes.
Implementations§
Source§impl MAVLinkV1MessageRaw
impl MAVLinkV1MessageRaw
Sourcepub const fn new() -> MAVLinkV1MessageRaw
pub const fn new() -> MAVLinkV1MessageRaw
Create a new raw MAVLink 1 message filled with zeros.
Sourcepub const fn from_bytes_unparsed(bytes: [u8; 263]) -> MAVLinkV1MessageRaw
pub const fn from_bytes_unparsed(bytes: [u8; 263]) -> MAVLinkV1MessageRaw
Create a new raw MAVLink 1 message from a given buffer.
Note: This method does not guarantee that the constructed MAVLink message is valid.
Sourcepub fn as_mut_slice(&mut self) -> &mut [u8] ⓘ
pub fn as_mut_slice(&mut self) -> &mut [u8] ⓘ
Mutable reference to its internal buffer.
Sourcepub fn into_inner(self) -> [u8; 263]
pub fn into_inner(self) -> [u8; 263]
Deconstruct the MAVLink message into its owned internal buffer.
Sourcepub fn payload_length(&self) -> u8
pub fn payload_length(&self) -> u8
Size of the payload of the message
Sourcepub fn component_id(&self) -> u8
pub fn component_id(&self) -> u8
Message sender Component ID
Sourcepub fn message_id(&self) -> u8
pub fn message_id(&self) -> u8
Message ID
Sourcepub fn checksum(&self) -> u16
pub fn checksum(&self) -> u16
CRC-16 checksum field of the message
Sourcepub fn has_valid_crc<M>(&self) -> boolwhere
M: Message,
pub fn has_valid_crc<M>(&self) -> boolwhere
M: Message,
Checks wether the message’s CRC-16 checksum calculation matches its checksum field.
Sourcepub fn serialize_message<M>(&mut self, header: MavHeader, message: &M)where
M: Message,
pub fn serialize_message<M>(&mut self, header: MavHeader, message: &M)where
M: Message,
Serialize a Message
with a given header into this raw message buffer.
pub fn serialize_message_data<D>(&mut self, header: MavHeader, message_data: &D)where
D: MessageData,
Trait Implementations§
Source§impl Clone for MAVLinkV1MessageRaw
impl Clone for MAVLinkV1MessageRaw
Source§fn clone(&self) -> MAVLinkV1MessageRaw
fn clone(&self) -> MAVLinkV1MessageRaw
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more