pub struct MAVLinkV2MessageRaw(/* private fields */);
Expand description
Byte buffer containing the raw representation of a MAVLink 2 message beginning with the STX marker.
Follow protocol definition: https://mavlink.io/en/guide/serialization.html#mavlink2_packet_format. Maximum size is 280 bytes.
Implementations§
Source§impl MAVLinkV2MessageRaw
impl MAVLinkV2MessageRaw
Sourcepub fn payload_length(&self) -> u8
pub fn payload_length(&self) -> u8
Size of the payload of the message
Sourcepub fn incompatibility_flags(&self) -> u8
pub fn incompatibility_flags(&self) -> u8
Incompatiblity flags of the message
Currently the only supported incompatebility flag is MAVLINK_IFLAG_SIGNED
.
Sourcepub fn incompatibility_flags_mut(&mut self) -> &mut u8
pub fn incompatibility_flags_mut(&mut self) -> &mut u8
Mutable reference to the incompatiblity flags of the message
Currently the only supported incompatebility flag is MAVLINK_IFLAG_SIGNED
.
Sourcepub fn compatibility_flags(&self) -> u8
pub fn compatibility_flags(&self) -> u8
Compatibility Flags of the message
Sourcepub fn component_id(&self) -> u8
pub fn component_id(&self) -> u8
Message sender Component ID
Sourcepub fn message_id(&self) -> u32
pub fn message_id(&self) -> u32
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: Message>(&self) -> bool
pub fn has_valid_crc<M: Message>(&self) -> bool
Checks wether the message’s CRC-16 checksum calculation matches its checksum field.
Sourcepub fn serialize_message<M: Message>(&mut self, header: MavHeader, message: &M)
pub fn serialize_message<M: Message>(&mut self, header: MavHeader, message: &M)
Serialize a Message with a given header into this raw message buffer.
This does not set any compatiblity or incompatiblity flags.
Sourcepub fn serialize_message_for_signing<M: Message>(
&mut self,
header: MavHeader,
message: &M,
)
pub fn serialize_message_for_signing<M: Message>( &mut self, header: MavHeader, message: &M, )
Serialize a Message with a given header into this raw message buffer and sets the MAVLINK_IFLAG_SIGNED
incompatiblity flag.
This does not update the message’s signature fields. This does not set any compatiblity flags.
pub fn serialize_message_data<D: MessageData>( &mut self, header: MavHeader, message_data: &D, )
Trait Implementations§
Source§impl Clone for MAVLinkV2MessageRaw
impl Clone for MAVLinkV2MessageRaw
Source§fn clone(&self) -> MAVLinkV2MessageRaw
fn clone(&self) -> MAVLinkV2MessageRaw
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more