4 releases
new 0.6.0 | Feb 21, 2025 |
---|---|
0.6.0-rc.1 | Feb 20, 2025 |
#342 in Robotics
98 downloads per month
Used in mavlink-dialects
535KB
188 lines
MAVLink message definitions for MAVSpec
⚠️ All issues related to this project should be submitted to 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 libraries toolchain can use Cargo patch mechanism to replace this crate and therefore change which dialects will be packaged.
Usage
This crate exposes just one protocol
function that allows to obtain metadata for the entire set of MAVLink dialects.
fn main() {
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().unwrap(), "minimal");
}
Message Definitions
All MAVLink message definitions live in the message_definitions
directory.
standard
— standard MAVLink dialects. These dialects enabled bydlct-*
feature flags.test
— MAVLink dialects for test purposes. These dialects enabled bytest-dialects
feature flag.extra
— extra dialects. These dialects enabled bytest-dialects
feature flag. You can put your own message definitions here and patch this crate to generate additional dialects for upstream crates.
Development
The main development workflow for this crate involves inclusion into MAVSpec as a submodule.
We reserve a special extras
branch to test extra dialects' generation.
License
Here we simply comply with the suggested dual licensing according to Rust API Guidelines (C-PERMISSIVE).
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Dependencies
~9MB
~165K SLoC