4 releases

new 0.6.0 Feb 21, 2025
0.6.0-rc.1 Feb 20, 2025

#257 in Robotics

Download history

96 downloads per month

MIT/Apache

81KB
953 lines

MAVLink dialects bindings for MAVSpec

🇺🇦 repository crates.io docs.rs issues

⚠️ All issues related to this crate should be submitted to MAVSpec.

MAVLink messages bindings based on MAVInspect.

This library is a part of MAVSpec code-generation toolchain and is intended to use alongside with it. However, nothing prevents you from using this crate independently.

Since MAVSpec is I/O agnostic, it and does not provide any abstractions for transferring MAVLink messages. If you want to communicate with MAVLink devices, use Mavio for embedded devices and simple tasks or Maviola for advanced I/O in std environments (for ground control stations, communication layers, and so on).

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 dialects module where all MAVlink dialects can be found.

fn main() {
    let protocol = mavlink_dialects::common::Common;
    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");
}

Development

The main development workflow for this crate involves inclusion into MAVSpec as a submodule.

License

Here we simply comply with the suggested dual licensing according to Rust API Guidelines (C-PERMISSIVE).

Licensed under either of

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

~0.9–2.5MB
~46K SLoC