Crate mavlink_core

Source
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::MavMessages 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§

async_peek_readertokio-1
This module implements a buffered/peekable reader using async I/O.
bytes
bytes_mut
error
peek_reader
This module implements a buffered/peekable reader.
utils
Utilities for processing MAVLink messages

Structs§

FileConnectablestd or tokio-1
MAVLink connection address for a file input
MAVLinkV1MessageRaw
Byte buffer containing the raw representation of a MAVLink 1 message beginning with the STX marker.
MAVLinkV2MessageRaw
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
SerialConnectablestd or tokio-1
MAVLink address for a serial connection
SigningConfigsigning
Configuration used for MAVLink 2 messages signing as defined in https://mavlink.io/en/guide/message_signing.html.
SigningDatasigning
MAVLink 2 message signing data
TcpConnectablestd or tokio-1
MAVLink connection address for a TCP server or client
UdpConnectablestd or tokio-1
MAVLink address for a UDP server client or broadcast connection

Enums§

ConnectionAddressstd or tokio-1
A parsed MAVLink connection address
MAVLinkMessageRaw
Raw byte representation of a MAVLink message of either version
MavlinkVersion
Versions of the MAVLink protocol that we support
ReadVersion
MAVLink Version selection when attempting to read
UdpModestd or tokio-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§

AsyncConnectabletokio-1
A MAVLink connection address that can be connected to, establishing an AsyncMavConnection
AsyncMavConnectiontokio-1
An async MAVLink connection
Connectablestd
A MAVLink connection address that can be connected to, establishing a MavConnection
MavConnectionstd
A MAVLink connection
Message
A MAVLink message payload
MessageData

Functions§

calculate_crc
Calculates the CRC checksum of a messages header, payload and the CRC_EXTRA byte.
connectstd
Connect to a MAVLink node by address string.
connect_asynctokio-1
Connect asynchronously to a MAVLink node by address string.
read_any_msg
Read and parse a MAVLink 1 or 2 message from a PeekReader.
read_any_msg_asynctokio-1
Asynchronously read and parse a MAVLink 1 or 2 message from a AsyncPeekReader.
read_any_msg_async_signedtokio-1 and signing
Asynchronously read and parse a MAVLink 1 or 2 message from a AsyncPeekReader with signing support.
read_any_msg_signedsigning
Read and parse a MAVLink 1 or 2 message from a PeekReader with signing support.
read_any_raw_message
Read a raw MAVLink 1 or 2 message from a PeekReader.
read_any_raw_message_asynctokio-1
Asynchronously read a raw MAVLink 1 or 2 message from a AsyncPeekReader.
read_any_raw_message_async_signedtokio-1 and signing
Asynchronously read a raw MAVLink 1 or 2 message from a AsyncPeekReader with signing support.
read_any_raw_message_signedsigning
Read a raw MAVLink 1 or 2 message from a PeekReader with signing support.
read_v1_msg
Read and parse a MAVLink 1 message from a PeekReader.
read_v1_msg_asynctokio-1
Asynchronously read and parse a MAVLink 1 message from a AsyncPeekReader.
read_v1_raw_message
Read a raw MAVLink 1 message from a PeekReader.
read_v1_raw_message_asynctokio-1
Asynchronously read a raw MAVLink 1 message from a AsyncPeekReader.
read_v2_msg
Read and parse a MAVLink 2 message from a PeekReader.
read_v2_msg_asynctokio-1
Asynchronously read and parse a MAVLink 2 message from a AsyncPeekReader.
read_v2_msg_async_signedtokio-1 and signing
Asynchronously read and parse a MAVLink 2 message from a AsyncPeekReader.
read_v2_msg_signedsigning
Read and parse a MAVLink 2 message from a PeekReader.
read_v2_raw_message
Read a raw MAVLink 2 message from a PeekReader.
read_v2_raw_message_asynctokio-1
Asynchronously read a raw MAVLink 2 message from a AsyncPeekReader.
read_v2_raw_message_async_signedtokio-1 and signing
Asynchronously read a raw MAVLink 2 message with signing support from a AsyncPeekReader.
read_v2_raw_message_signedsigning
Read a raw MAVLink 2 message with signing support from a PeekReader.
read_versioned_msg
Read and parse a MAVLink message of the specified version from a PeekReader.
read_versioned_msg_asynctokio-1
Asynchronously read and parse a MAVLink message of the specified version from a AsyncPeekReader.
read_versioned_msg_async_signedtokio-1 and signing
Asynchronously read and parse a MAVLink message of the specified version from a AsyncPeekReader with signing support.
read_versioned_msg_signedsigning
Read and parse a MAVLink message of the specified version from a PeekReader with signing support.
write_v1_msg
Write a MAVLink 1 message to a Writer.
write_v1_msg_asynctokio-1
Asynchronously write a MAVLink 1 message to a AsyncWriter.
write_v2_msg
Write a MAVLink 2 message to a Writer.
write_v2_msg_asynctokio-1
Asynchronously write a MAVLink 2 message to a AsyncWriter.
write_v2_msg_async_signedsigning and tokio-1
Write a MAVLink 2 message to a AsyncWriter with signing support.
write_v2_msg_signedsigning
Write a MAVLink 2 message to a Writer with signing support.
write_versioned_msg
Write a MAVLink message using the given mavlink version to a Writer.
write_versioned_msg_asynctokio-1
Asynchronously write a MAVLink message using the given MAVLink version to a AsyncWriter.
write_versioned_msg_async_signedtokio-1 and signing
Asynchronously write a MAVLink message using the given MAVLink version to a AsyncWriter with signing support.
write_versioned_msg_signedsigning
Write a MAVLink message using the given mavlink version to a Writer with signing support.