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
stdfeature 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 (stdis 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β Includeardupilotmegadialect -
dlct-asluavβ IncludeASLUAVdialect -
dlct-avssuasβ IncludeAVSSUASdialect -
dlct-commonβ Includecommondialect -
dlct-cs_air_linkβ IncludecsAirLinkdialect -
dlct-cubepilotβ Includecubepilotdialect -
dlct-developmentβ Includedevelopmentdialect -
dlct-icarousβ Includeicarousdialect -
dlct-matrixpilotβ Includematrixpilotdialect -
dlct-minimalβ Includeminimaldialect -
dlct-paparazziβ Includepaparazzidialect -
dlct-standardβ Includestandarddialect -
dlct-ualbertaβ Includeualbertadialect -
dlct-uavionixβ IncludeuAvionixdialect -
dlct-allβ Includeallmeta-dialect -
extra-dialectsβ Enables extra dialectsDownstream crates can patch
mavspec-definitionsadding 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.