mavlink-message-definitions 0.6.7

MAVLink message definitions in MAVInspect format
Documentation
# MAVLink message definitions for [MAVSpec]https://crates.io/crates/mavspec

<span style="font-size:24px">[πŸ‡ΊπŸ‡¦](https://mavka.gitlab.io/home/a_note_on_the_war_in_ukraine/)</span>
[![
`repository`](https://img.shields.io/gitlab/pipeline-status/mavka/libs/mavspec.svg?branch=main&label=repository)](https://gitlab.com/mavka/spec/protocols/mavlink/mavspec-definitions)
[![
`crates.io`](https://img.shields.io/crates/v/mavlink-message-definitions.svg)](https://crates.io/crates/mavlink-message-definitions)
[![
`docs.rs`](https://img.shields.io/docsrs/mavlink-message-definitions.svg?label=docs.rs)](https://docs.rs/mavlink-message-definitions/latest/mavlink-message-definitions/)
[![
`issues`](https://img.shields.io/gitlab/issues/open/mavka/libs/mavspec.svg)](https://gitlab.com/mavka/libs/mavspec/-/issues/)

> ⚠️ All issues related to this project should be submitted to [MAVSpec]https://gitlab.com/mavka/libs/mavspec.

This is a very simple crate with the whole purpose to collect MAVLink
[message definitions](https://gitlab.com/mavka/spec/protocols/mavlink/message-definitions-v1.0)
using [MAVInspect](https://crates.io/crates/mavinspect). It is used by
[MAVSpec](https://crates.io/crates/mavspec) as a source of truth about MAVLink dialect
specification.

Upstream crates that use [Mavka](https://mavka.gitlab.io/home/) libraries toolchain can use
Cargo [patch](https://doc.rust-lang.org/cargo/reference/overriding-dependencies.html#the-patch-section)
mechanism to replace this crate and therefore change which dialects will be packaged.

Usage
-----

> ⚠️ Make sure that you've enabled the `std` feature when using this crate without default features.

This crate exposes just one `protocol` function that allows to get metadata for the entire set of MAVLink dialects.

```rust
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`](./message_definitions) directory.

- [`standard`]./message_definitions/standard β€” standard MAVLink dialects. These dialects enabled by `dlct-*` feature
  flags.
- [`test`]./message_definitions/standard β€” MAVLink dialects for test purposes. These dialects enabled by
  `test-dialects` feature flag.
- [`extra`]./message_definitions/standard β€” extra dialects. These dialects enabled by `test-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](https://gitlab.com/mavka/libs/mavspec) as a submodule.

We reserve a special [`extras`](https://gitlab.com/mavka/spec/protocols/mavlink/mavspec-definitions/-/tree/extras)
branch to test extra dialects' generation.

License
-------

> Here we simply comply with the suggested dual licensing according to
> [Rust API Guidelines]https://rust-lang.github.io/api-guidelines/about.html (C-PERMISSIVE).

Licensed under either of

* Apache License, Version 2.0
  ([LICENSE-APACHE]LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
* MIT license
  ([LICENSE-MIT]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.