Expand description
The MAVLink message set.
§Message sets and the Message
trait
Each message set has its own module with corresponding data types, including a MavMessage
enum
that represents all possible messages in that message set. The Message
trait is used to
represent messages in an abstract way, and each MavMessage
enum implements this trait (for
example, ardupilotmega::MavMessage). This is then monomorphized to the specific message
set you are using in your application at compile-time via type parameters. If you expect
ArduPilotMega-flavored messages, then you will need a MavConnection<ardupilotmega::MavMessage>
and you will receive ardupilotmega::MavMessage
s from it.
Some message sets include others. For example, most message sets include the
common message set. These included values are not differently represented in the MavMessage
enum: a message
in the common message set received on an ArduPilotMega connection will just be an
ardupilotmega::MavMessage
.
If you want to enable a given message set, you do not have to enable the
feature for the message sets that it includes. For example, you can use the ardupilotmega
feature without also using the uavionix
, icarous
, common
features.
Modules§
- bytes
- bytes_
mut - error
- peek_
reader - This module implements a buffered/peekable reader.
- utils
- Utilities for processing MAVLink messages
Structs§
- File
Connectable std
ortokio-1
- MAVLink connection address for a file input
- MAVLink
V1Message Raw - Byte buffer containing the raw representation of a MAVLink 1 message beginning with the STX marker.
- MAVLink
V2Message Raw - Byte buffer containing the raw representation of a MAVLink 2 message beginning with the STX marker.
- MavFrame
- Encapsulation of the MAVLink message and the header, important to preserve information about the sender system and component id.
- MavHeader
- Metadata from a MAVLink packet header
- Serial
Connectable std
ortokio-1
- MAVLink address for a serial connection
- TcpConnectable
std
ortokio-1
- MAVLink connection address for a TCP server or client
- UdpConnectable
std
ortokio-1
- MAVLink address for a UDP server client or broadcast connection
Enums§
- Connection
Address std
ortokio-1
- A parsed MAVLink connection address
- MAVLink
Message Raw - Raw byte representation of a MAVLink message of either version
- Mavlink
Version - Versions of the MAVLink protocol that we support
- Read
Version - MAVLink Version selection when attempting to read
- UdpMode
std
ortokio-1
- Type of UDP connection
Constants§
- MAV_STX
- Message framing marker for MAVLink 1
- MAV_
STX_ V2 - Message framing marker for MAVLink 2
- MAX_
FRAME_ SIZE - Maximum size of any MAVLink frame in bytes.
Traits§
- Connectable
std
- A MAVLink connection address that can be connected to, establishing a
MavConnection
- MavConnection
std
- A MAVLink connection
- Message
- A MAVLink message payload
- Message
Data
Functions§
- calculate_
crc - Calculates the CRC checksum of a messages header, payload and the CRC_EXTRA byte.
- connect
std
- Connect to a MAVLink node by address string.
- read_
any_ msg - Read and parse a MAVLink 1 or 2 message from a
PeekReader
. - read_
any_ raw_ message - Read a raw MAVLink 1 or 2 message from a
PeekReader
. - read_
v1_ msg - Read and parse a MAVLink 1 message from a
PeekReader
. - read_
v1_ raw_ message - Read a raw MAVLink 1 message from a
PeekReader
. - read_
v2_ msg - Read and parse a MAVLink 2 message from a
PeekReader
. - read_
v2_ raw_ message - Read a raw MAVLink 2 message from a
PeekReader
. - read_
versioned_ msg - Read and parse a MAVLink message of the specified version from a
PeekReader
. - write_
v1_ msg - Write a MAVLink 1 message to a
Write
r. - write_
v2_ msg - Write a MAVLink 2 message to a
Write
r. - write_
versioned_ msg - Write a MAVLink message using the given mavlink version to a
Write
r.