Expand description
Β§MAVLink message definitions for MAVSpec.
This is a very simple crate with the whole purpose to collect MAVLink message definitions using MAVInspect. It is used by MAVSpec as a source of truth about MAVLink dialect specification.
Upstream crates that use Mavka toolchain can use Cargo
patch
mechanism to replace this crate and therefore change which dialects will be packaged. The latter
may be combined with extra-dialects
feature flag that enforces inclusion of all extra dialects.
Β§Usage
β οΈ Make sure that youβve enabled the
std
feature when using this crate without default features.
Use protocol
function to get metadata for the entire set of MAVLink dialects.
let protocol = mavlink_message_definitions::protocol();
let common = protocol.get_dialect_by_name("common").unwrap();
let heartbeat_message = common.get_message_by_name("HEARTBEAT").unwrap();
assert_eq!(heartbeat_message.defined_in(), "minimal");
Β§Development
The main development workflow for this crate involves inclusion into MAVSpec as a submodule.
Β§Feature flags
Β§Generic features
-
default
β Default features (std
is enabled) -
std
(enabled by default) β Enable standard library support.Without this feature the library will be essentially empty.
-
compress
β Compress the protocol definition
Β§Dialects
Bundle standard MAVLink dialects as defined in XML message definitions.
Enabling any of dlct-*
features will bundle corresponding dialect.
In case you want to patch
mavspec-definitions
, you might be interested in enabling extra-dialects
feature.
-
dlct-ardupilotmega
β Includeardupilotmega
dialect -
dlct-asluav
β IncludeASLUAV
dialect -
dlct-avssuas
β IncludeAVSSUAS
dialect -
dlct-common
β Includecommon
dialect -
dlct-cs_air_link
β IncludecsAirLink
dialect -
dlct-cubepilot
β Includecubepilot
dialect -
dlct-development
β Includedevelopment
dialect -
dlct-icarous
β Includeicarous
dialect -
dlct-matrixpilot
β Includematrixpilot
dialect -
dlct-minimal
β Includeminimal
dialect -
dlct-paparazzi
β Includepaparazzi
dialect -
dlct-standard
β Includestandard
dialect -
dlct-ualberta
β Includeualberta
dialect -
dlct-uavionix
β IncludeuAvionix
dialect -
dlct-all
β Includeall
meta-dialect -
extra-dialects
β Enables extra dialectsDownstream crates can patch
mavspec-definitions
adding extra MAVLink dialects. -
test-dialects
β Enables test dialectsThese dialects are useful for checking various test cases.
ConstantsΒ§
- DEFAULT_
DIALECT_ SEQUENCE - The sequence of default dialects from the most feature-rich to the most primitive.
FunctionsΒ§
- protocol
- Metadata for MAVLink dialects generated by MAVInspect.