Module mavio::protocol

source ·
Expand description

MAVLink protocol abstractions.

We also re-export from mavspec::rust::spec crate to provide a full specification of MAVLink-related types.

§Frames

The key MAVLink entity is a Frame, that represents a packet containing message body and additional metadata as specified by MAVLink serialization protocol. Each frame has a header and payload. Frames can be decoded into messages using Frame::decode. To build a frame you need a FrameBuilder that provides an interface for constructing valid frames both manually and from existing messages.

§Message Signing

MAVLink 2 protocol is capable of signing frames allowing the receiver to authenticate frame’s sender. To sign a frame you can either use Frame<V2>::add_signature or SigningConf::apply. The latter will sign only MAVLink 2 frames keeping MAVLink 1 frames untouched.

The signing algorithm is split into Sign and Signer. The former is a trait that provides sha256_48, a MAVLink 2 specific hashing algorithm. The latter takes an implementor of Sign and feeds frame data into it. This library provides and implementor of Sign, the MavSha256, for std targets. All no_std targets should implement their own algorithm based on their platform-specific access to random value generators.

Structs§

Enums§

  • Defines, how to process compatibility and incompatibility flags.
  • Version-agnostic MAVLink frame, that can be matched according to its protocol version.
  • mavspec MAVLink protocol version.
  • Packet start marker.

Traits§

Type Aliases§