mavlink 0.18.0

Implements the MAVLink data interchange format for UAVs.
#![cfg_attr(not(feature = "std"), no_std)]
#![cfg_attr(docsrs, feature(doc_cfg))]

//! Rust implementation of the MAVLink UAV messaging protocol, with bindings for all dialects.
//! This crate provides message set code generation, packet building, parsing and connection handling for blocking and asynchronous I/O.
//!
//! # Feature flags
//! The `mavlink` crate uses a number of [feature flags] to reduce the amount of compiled code by making certain functions and MAVLink message sets (dialects) optional.
//! These feature flags are available to control the provided functionalities:
//!
//! - `std`: Enables the usage of `std` in `mavlink`, enabled by default, this can be disabled for embedded applications.
//! - `transport-direct-serial`: Enable serial MAVLink connections, enabled by default.
//! - `transport-udp`: Enables UDP based MAVLink connections, enabled by default.
//! - `transport-tcp`: Enables TCP based MAVLink connections, enabled by default.
//! - `mav2-message-signing`: Enable support for [MAVLink 2 message signing]
//! - `embedded`: Enables embedded support using the [embedded-io] crate, incompatible with `tokio`.
//! - `tokio`: Enable support for asynchronous I/O using [tokio], incompatible with `embedded`.
//! - `serde`: Enables [serde] support in generated message sets, enabled by default.
//! - `format-generated-code`: Generated MAVLink message set code will be formatted, requires `rustfmt` to be installed, enabled by default.
//! - `mav2-message-extensions`: Generated MAVLink message set code will include [MAVLink 2 message extensions].
//! - `arbitrary`: Enable support for the [arbitrary] crate.
//! - `ts-rs`: Enable TypeScript code generation via [ts-rs].
//!
//! Either `std` or `embedded` must be enabled.
//!
//! Each MAVlink message set (dialect) can be enabled using its feature flag. The following message set feature flags are available:
//! - `dialect-all`
//! - `dialect-ardupilotmega`, enabled by default
//! - `dialect-common`, enabled by default
//! - `dialect-asluav`
//! - `dialect-avssuas`
//! - `dialect-cubepilot`
//! - `dialect-csairlink`
//! - `dialect-development`
//! - `dialect-icarous`
//! - `dialect-loweheiser`
//! - `dialect-marsh`
//! - `dialect-matrixpilot`
//! - `dialect-minimal`
//! - `dialect-paparazzi`
//! - `dialect-python_array_test`
//! - `dialect-standard`
//! - `dialect-stemstudios`
//! - `dialect-storm32`
//! - `dialect-test`
//! - `dialect-ualberta`
//! - `dialect-uavionix`
//!
//! [feature flags]: https://doc.rust-lang.org/cargo/reference/manifest.html#the-features-section
//! [MAVLink 2 message signing]: https://mavlink.io/en/guide/message_signing.html
//! [MAVLink 2 message extensions]: https://mavlink.io/en/guide/define_xml_element.html#message_extensions
//! [embedded-io]: https://crates.io/crates/embedded-io
//! [embedded-hal]: https://crates.io/crates/embedded-hal
//! [tokio]: https://crates.io/crates/tokio
//! [serde]: https://crates.io/crates/serde
//! [arbitrary]: https://crates.io/crates/arbitrary
//! [ts-rs]: https://crates.io/crates/ts-rs

#[cfg(all(feature = "std", feature = "embedded", not(any(clippy, doc))))]
compile_error!("`std` and `embedded` features cannot be enabled together");

pub mod dialects {
    //! MAVLink dialect Rust bindings generated by mavlink-bindgen.
    //!
    //! Enable a dialect by enabling its Cargo feature:
    //! - dialect-ardupilotmega
    //! - dialect-asluav
    //! - dialect-avssuas
    //! - dialect-common
    //! - dialect-csairlink
    //! - dialect-cubepilot
    //! - dialect-development
    //! - dialect-icarous
    //! - dialect-loweheiser
    //! - dialect-marsh
    //! - dialect-matrixpilot
    //! - dialect-minimal
    //! - dialect-paparazzi
    //! - dialect-python_array_test
    //! - dialect-standard
    //! - dialect-stemstudios
    //! - dialect-storm32
    //! - dialect-test
    //! - dialect-ualberta
    //! - dialect-uavionix
    include!(concat!(env!("OUT_DIR"), "/mod.rs"));
}

pub use mavlink_core::*;