pub trait MessageSpec {
    // Required methods
    fn id(&self) -> MessageId;
    fn min_supported_mavlink_version(&self) -> MavLinkVersion;
    fn crc_extra(&self) -> CrcExtra;
}
Expand description

Generic MAVLink message specification.

MessageInfo implements this trait.

Messages generated by MAVSpec also implement this trait.

Required Methods§

source

fn id(&self) -> MessageId

MAVLink message ID.

In MAVLink 2 message ID is a 24-bit unsigned integer stored as u32.

MAVLink 1 supports only 8-bit message ID.

Minimum supported MAVLink protocol version.

Messages supporting both MAVLink 1 and MAVLink 2 will return MavLinkVersion::V1.

Messages which make sense only in MAVLink 2 will return MavLinkVersion::V2,

source

fn crc_extra(&self) -> CrcExtra

Message EXTRA_CRC calculated from message XML definition.

CRC for message name and key message fields to detect incompatible changes in message definition.

See: CRC_EXTRA calculation in MAVLink docs.

Implementors§