mavlink

    Pure MoonBit MAVLink v2/v1 wire protocol, SHA-256 packet signing, microservice state machines, and recursive XML-to-MoonBit code generator

    mavlink
    mavlink-v2
    drone
    uav
    px4
    ardupilot
    codegen
    microservices
    protocol
    embedded
    Download zip
    Author
    Version
    0.4.0
    License
    Apache-2.0
    Last updated
    4 hours ago
    Downloads
    8

    No dependencies

    #lycvvt/mavlink — MoonBit MAVLink v2 Protocol, Microservices, Multi-Link Router & XML Code Generator

    lycvvt/mavlink 是面向无人机(PX4、ArduPilot)、机器人与地面控制站(QGroundControl)通信的纯 MoonBit(Zero FFI)MAVLink v2 / v1 协议栈、高阶微服务状态机(Heartbeat / Parameter / ParamExt / Mission / Command / Timesync / FTP #110)、多链路防环路由器(MavRouter)、QGroundControl .tlog 遥测录制回放器与支持多文件 <include> 的官方 XML 自动代码生成器(内置 22 个标准枚举与 60 条核心飞控消息,100 项测试 100% 通过)。详细工程文档与基准数据请参阅 README.md 与 docs/BENCHMARK_AND_BOUNDARIES.md。

    Attitude

    pub(all) struct Attitude {
    time_boot_ms : UInt
    roll : Float
    pitch : Float
    yaw : Float
    rollspeed : Float
    pitchspeed : Float
    yawspeed : Float
    } derive(Eq,
    Debug
    )

    The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right).
    • MAVLink Message ATTITUDE (ID: 30, CRC_EXTRA: 39, base_len: 28B, max_len: 28B)

    Attitude::base_payload_len

    fn Attitude::base_payload_len() -> Int

    Attitude::crc_extra

    fn Attitude::crc_extra() -> Byte

    Attitude::decode_payload

    fn Attitude::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[Attitude, MavError]

    Deserialize Attitude from wire-ordered little-endian payload bytes.

    Attitude::encode_payload

    fn Attitude::encode_payload(self : Attitude, v2? : Bool) -> Bytes

    Serialize Attitude into wire-ordered little-endian payload bytes.

    Attitude::equal

    fn Attitude::equal(Attitude, Attitude) -> Bool
    automatically derived

    Attitude::max_payload_len

    fn Attitude::max_payload_len() -> Int

    Attitude::msg_id

    fn Attitude::msg_id() -> UInt

    Attitude::not_equal

    fn Attitude::not_equal(x : Attitude, y : Attitude) -> Bool
    automatically derived

    Attitude::to_repr

    automatically derived

    AttitudeQuaternion

    pub(all) struct AttitudeQuaternion {
    time_boot_ms : UInt
    q1 : Float
    q2 : Float
    q3 : Float
    q4 : Float
    rollspeed : Float
    pitchspeed : Float
    yawspeed : Float
    repr_offset_q : FixedArray[Float]
    } derive(Eq,
    Debug
    )

    The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion.
    • MAVLink Message ATTITUDE_QUATERNION (ID: 31, CRC_EXTRA: 246, base_len: 32B, max_len: 48B)

    AttitudeQuaternion::base_payload_len

    fn AttitudeQuaternion::base_payload_len() -> Int

    AttitudeQuaternion::crc_extra

    fn AttitudeQuaternion::crc_extra() -> Byte

    AttitudeQuaternion::decode_payload

    fn AttitudeQuaternion::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[AttitudeQuaternion, MavError]

    Deserialize AttitudeQuaternion from wire-ordered little-endian payload bytes.

    AttitudeQuaternion::encode_payload

    fn AttitudeQuaternion::encode_payload(self : AttitudeQuaternion, v2? : Bool) -> Bytes

    Serialize AttitudeQuaternion into wire-ordered little-endian payload bytes.

    AttitudeQuaternion::equal

    automatically derived

    AttitudeQuaternion::max_payload_len

    fn AttitudeQuaternion::max_payload_len() -> Int

    AttitudeQuaternion::msg_id

    fn AttitudeQuaternion::msg_id() -> UInt

    AttitudeQuaternion::not_equal

    automatically derived

    AttitudeQuaternion::to_repr

    automatically derived

    AttitudeTarget

    pub(all) struct AttitudeTarget {
    time_boot_ms : UInt
    type_mask : Byte
    q : FixedArray[Float]
    body_roll_rate : Float
    body_pitch_rate : Float
    body_yaw_rate : Float
    thrust : Float
    } derive(Eq,
    Debug
    )

    Reports the current commanded vehicle attitude as specified by the autopilot.
    • MAVLink Message ATTITUDE_TARGET (ID: 83, CRC_EXTRA: 22, base_len: 37B, max_len: 37B)

    AttitudeTarget::base_payload_len

    fn AttitudeTarget::base_payload_len() -> Int

    AttitudeTarget::crc_extra

    fn AttitudeTarget::crc_extra() -> Byte

    AttitudeTarget::decode_payload

    fn AttitudeTarget::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[AttitudeTarget, MavError]

    Deserialize AttitudeTarget from wire-ordered little-endian payload bytes.

    AttitudeTarget::encode_payload

    fn AttitudeTarget::encode_payload(self : AttitudeTarget, v2? : Bool) -> Bytes

    Serialize AttitudeTarget into wire-ordered little-endian payload bytes.

    AttitudeTarget::equal

    automatically derived

    AttitudeTarget::max_payload_len

    fn AttitudeTarget::max_payload_len() -> Int

    AttitudeTarget::msg_id

    fn AttitudeTarget::msg_id() -> UInt

    AttitudeTarget::not_equal

    fn AttitudeTarget::not_equal(x : AttitudeTarget, y : AttitudeTarget) -> Bool
    automatically derived

    AttitudeTarget::to_repr

    automatically derived

    AttitudeTargetTypemask

    pub(all) enum AttitudeTargetTypemask {
    BodyRollRateIgnore
    BodyPitchRateIgnore
    BodyYawRateIgnore
    ThrottleIgnore
    AttitudeIgnore
    } derive(Eq,
    Debug
    )

    Bitmap to indicate which dimensions should be ignored by the vehicle.

    AttitudeTargetTypemask::equal

    automatically derived

    AttitudeTargetTypemask::from_uint

    Decode AttitudeTargetTypemask from its raw MAVLink numeric value.

    AttitudeTargetTypemask::not_equal

    automatically derived

    AttitudeTargetTypemask::to_repr

    automatically derived

    AttitudeTargetTypemask::to_uint

    Convert AttitudeTargetTypemask to its raw MAVLink numeric value.

    AutopilotVersion

    pub(all) struct AutopilotVersion {
    capabilities : UInt64
    flight_sw_version : UInt
    middleware_sw_version : UInt
    os_sw_version : UInt
    board_version : UInt
    flight_custom_version : FixedArray[Byte]
    middleware_custom_version : FixedArray[Byte]
    os_custom_version : FixedArray[Byte]
    vendor_id : UInt
    product_id : UInt
    uid : UInt64
    uid2 : FixedArray[Byte]
    } derive(Eq,
    Debug
    )

    Version and capability of autopilot software.
    • MAVLink Message AUTOPILOT_VERSION (ID: 148, CRC_EXTRA: 178, base_len: 60B, max_len: 78B)

    AutopilotVersion::base_payload_len

    fn AutopilotVersion::base_payload_len() -> Int

    AutopilotVersion::crc_extra

    fn AutopilotVersion::crc_extra() -> Byte

    AutopilotVersion::decode_payload

    fn AutopilotVersion::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[AutopilotVersion, MavError]

    Deserialize AutopilotVersion from wire-ordered little-endian payload bytes.

    AutopilotVersion::encode_payload

    fn AutopilotVersion::encode_payload(self : AutopilotVersion, v2? : Bool) -> Bytes

    Serialize AutopilotVersion into wire-ordered little-endian payload bytes.

    AutopilotVersion::equal

    automatically derived

    AutopilotVersion::max_payload_len

    fn AutopilotVersion::max_payload_len() -> Int

    AutopilotVersion::msg_id

    fn AutopilotVersion::msg_id() -> UInt

    AutopilotVersion::not_equal

    fn AutopilotVersion::not_equal(x : AutopilotVersion, y : AutopilotVersion) -> Bool
    automatically derived

    AutopilotVersion::to_repr

    automatically derived

    BatteryStatus

    pub(all) struct BatteryStatus {
    id : Byte
    battery_function : Byte
    mav_type : Byte
    temperature : Int
    voltages : FixedArray[UInt]
    current_battery : Int
    current_consumed : Int
    energy_consumed : Int
    battery_remaining : Int
    time_remaining : Int
    charge_state : Byte
    voltages_ext : FixedArray[UInt]
    mode : Byte
    fault_bitmask : UInt
    } derive(Eq,
    Debug
    )

    Battery information.
    • MAVLink Message BATTERY_STATUS (ID: 147, CRC_EXTRA: 154, base_len: 36B, max_len: 54B)

    BatteryStatus::base_payload_len

    fn BatteryStatus::base_payload_len() -> Int

    BatteryStatus::crc_extra

    fn BatteryStatus::crc_extra() -> Byte

    BatteryStatus::decode_payload

    fn BatteryStatus::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[BatteryStatus, MavError]

    Deserialize BatteryStatus from wire-ordered little-endian payload bytes.

    BatteryStatus::encode_payload

    fn BatteryStatus::encode_payload(self : BatteryStatus, v2? : Bool) -> Bytes

    Serialize BatteryStatus into wire-ordered little-endian payload bytes.

    BatteryStatus::equal

    automatically derived

    BatteryStatus::max_payload_len

    fn BatteryStatus::max_payload_len() -> Int

    BatteryStatus::msg_id

    fn BatteryStatus::msg_id() -> UInt

    BatteryStatus::not_equal

    fn BatteryStatus::not_equal(x : BatteryStatus, y : BatteryStatus) -> Bool
    automatically derived

    BatteryStatus::to_repr

    automatically derived

    CommandAck

    pub(all) struct CommandAck {
    command : UInt
    result : Byte
    progress : Byte
    result_param2 : Int
    target_system : Byte
    target_component : Byte
    } derive(Eq,
    Debug
    )

    Report status of a command. Includes feedback whether the command was executed.
    • MAVLink Message COMMAND_ACK (ID: 77, CRC_EXTRA: 143, base_len: 3B, max_len: 10B)

    CommandAck::base_payload_len

    fn CommandAck::base_payload_len() -> Int

    CommandAck::crc_extra

    fn CommandAck::crc_extra() -> Byte

    CommandAck::decode_payload

    fn CommandAck::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[CommandAck, MavError]

    Deserialize CommandAck from wire-ordered little-endian payload bytes.

    CommandAck::encode_payload

    fn CommandAck::encode_payload(self : CommandAck, v2? : Bool) -> Bytes

    Serialize CommandAck into wire-ordered little-endian payload bytes.

    CommandAck::equal

    fn CommandAck::equal(CommandAck, CommandAck) -> Bool
    automatically derived

    CommandAck::max_payload_len

    fn CommandAck::max_payload_len() -> Int

    CommandAck::msg_id

    fn CommandAck::msg_id() -> UInt

    CommandAck::not_equal

    fn CommandAck::not_equal(x : CommandAck, y : CommandAck) -> Bool
    automatically derived

    CommandAck::to_repr

    automatically derived

    CommandCancel

    pub(all) struct CommandCancel {
    target_system : Byte
    target_component : Byte
    command : UInt
    } derive(Eq,
    Debug
    )

    Cancel a long running command.
    • MAVLink Message COMMAND_CANCEL (ID: 80, CRC_EXTRA: 14, base_len: 4B, max_len: 4B)

    CommandCancel::base_payload_len

    fn CommandCancel::base_payload_len() -> Int

    CommandCancel::crc_extra

    fn CommandCancel::crc_extra() -> Byte

    CommandCancel::decode_payload

    fn CommandCancel::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[CommandCancel, MavError]

    Deserialize CommandCancel from wire-ordered little-endian payload bytes.

    CommandCancel::encode_payload

    fn CommandCancel::encode_payload(self : CommandCancel, v2? : Bool) -> Bytes

    Serialize CommandCancel into wire-ordered little-endian payload bytes.

    CommandCancel::equal

    automatically derived

    CommandCancel::max_payload_len

    fn CommandCancel::max_payload_len() -> Int

    CommandCancel::msg_id

    fn CommandCancel::msg_id() -> UInt

    CommandCancel::not_equal

    fn CommandCancel::not_equal(x : CommandCancel, y : CommandCancel) -> Bool
    automatically derived

    CommandCancel::to_repr

    automatically derived

    CommandClient

    pub(all) struct CommandClient {
    target_system : Byte
    target_component : Byte
    timeout_ms : UInt64
    max_retries : Int
    state : CommandTxState
    active_cmd : CommandLong?
    last_sent_ms : UInt64
    retries : Int
    } derive(Eq,
    Debug
    )

    GCS-side MAVLink Command Protocol state machine with automatic confirmation counter increment on retransmission, MAV_RESULT_IN_PROGRESS tracking, and COMMAND_CANCEL.

    CommandClient::cancel_active

    fn CommandClient::cancel_active(self : CommandClient, now_ms : UInt64) -> MavMessage?

    Cancel the currently active long-running command by emitting COMMAND_CANCEL (#80).

    CommandClient::equal

    automatically derived

    CommandClient::new

    fn CommandClient::new(target_system : Byte, target_component : Byte, timeout_ms? : UInt64, max_retries? : Int) -> CommandClient

    Create a new CommandClient.

    CommandClient::not_equal

    fn CommandClient::not_equal(x : CommandClient, y : CommandClient) -> Bool
    automatically derived

    CommandClient::on_command_ack

    fn CommandClient::on_command_ack(self : CommandClient, ack : CommandAck, now_ms : UInt64) -> Unit

    Process an incoming COMMAND_ACK (#77) message.

    CommandClient::poll_timeout

    fn CommandClient::poll_timeout(self : CommandClient, now_ms : UInt64) -> MavMessage?

    Poll for timeout retransmission. Per official MAVLink Command Microservice specification, each retransmission increments the confirmation field (0 -> 1 -> 2...).

    CommandClient::send_command_long

    fn CommandClient::send_command_long(self : CommandClient, command : UInt, now_ms : UInt64, param1? : Float, param2? : Float, param3? : Float, param4? : Float, param5? : Float, param6? : Float, param7? : Float) -> MavMessage

    Send a COMMAND_LONG (#76) with initial confirmation = 0.

    CommandClient::to_repr

    automatically derived

    CommandInt

    pub(all) struct CommandInt {
    target_system : Byte
    target_component : Byte
    frame : Byte
    command : UInt
    current : Byte
    autocontinue : Byte
    param1 : Float
    param2 : Float
    param3 : Float
    param4 : Float
    x : Int
    y : Int
    z : Float
    } derive(Eq,
    Debug
    )

    Message encoding a command with parameters as scaled integers.
    • MAVLink Message COMMAND_INT (ID: 75, CRC_EXTRA: 158, base_len: 35B, max_len: 35B)

    CommandInt::base_payload_len

    fn CommandInt::base_payload_len() -> Int

    CommandInt::crc_extra

    fn CommandInt::crc_extra() -> Byte

    CommandInt::decode_payload

    fn CommandInt::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[CommandInt, MavError]

    Deserialize CommandInt from wire-ordered little-endian payload bytes.

    CommandInt::encode_payload

    fn CommandInt::encode_payload(self : CommandInt, v2? : Bool) -> Bytes

    Serialize CommandInt into wire-ordered little-endian payload bytes.

    CommandInt::equal

    fn CommandInt::equal(CommandInt, CommandInt) -> Bool
    automatically derived

    CommandInt::max_payload_len

    fn CommandInt::max_payload_len() -> Int

    CommandInt::msg_id

    fn CommandInt::msg_id() -> UInt

    CommandInt::not_equal

    fn CommandInt::not_equal(x : CommandInt, y : CommandInt) -> Bool
    automatically derived

    CommandInt::to_repr

    automatically derived

    CommandLong

    pub(all) struct CommandLong {
    target_system : Byte
    target_component : Byte
    command : UInt
    confirmation : Byte
    param1 : Float
    param2 : Float
    param3 : Float
    param4 : Float
    param5 : Float
    param6 : Float
    param7 : Float
    } derive(Eq,
    Debug
    )

    Send a command with up to seven parameters to the MAV.
    • MAVLink Message COMMAND_LONG (ID: 76, CRC_EXTRA: 152, base_len: 33B, max_len: 33B)

    CommandLong::base_payload_len

    fn CommandLong::base_payload_len() -> Int

    CommandLong::crc_extra

    fn CommandLong::crc_extra() -> Byte

    CommandLong::decode_payload

    fn CommandLong::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[CommandLong, MavError]

    Deserialize CommandLong from wire-ordered little-endian payload bytes.

    CommandLong::encode_payload

    fn CommandLong::encode_payload(self : CommandLong, v2? : Bool) -> Bytes

    Serialize CommandLong into wire-ordered little-endian payload bytes.

    CommandLong::equal

    fn CommandLong::equal(CommandLong, CommandLong) -> Bool
    automatically derived

    CommandLong::max_payload_len

    fn CommandLong::max_payload_len() -> Int

    CommandLong::msg_id

    fn CommandLong::msg_id() -> UInt

    CommandLong::not_equal

    fn CommandLong::not_equal(x : CommandLong, y : CommandLong) -> Bool
    automatically derived

    CommandLong::to_repr

    automatically derived

    CommandTxState

    pub(all) enum CommandTxState {
    Idle
    Pending(UInt, Byte)
    InProgress(UInt, Byte)
    Finished(UInt, MavResult)
    TimedOut(UInt)
    } derive(Eq,
    Debug
    )

    Execution state of a MAVLink Command transaction (COMMAND_LONG #76 / COMMAND_ACK #77).

    CommandTxState::equal

    automatically derived

    CommandTxState::not_equal

    fn CommandTxState::not_equal(x : CommandTxState, y : CommandTxState) -> Bool
    automatically derived

    CommandTxState::to_repr

    automatically derived

    CrcFieldSpec

    pub(all) struct CrcFieldSpec {
    wire_type : String
    name : String
    is_extension : Bool
    } derive(Eq,
    Debug
    )

    Field descriptor used for MAVLink wire ordering and CRC_EXTRA computation.

    CrcFieldSpec::equal

    automatically derived

    CrcFieldSpec::new

    fn CrcFieldSpec::new(wire_type : String, name : String, is_extension? : Bool) -> CrcFieldSpec

    Construct a field specification for CRC_EXTRA calculation.

    CrcFieldSpec::not_equal

    fn CrcFieldSpec::not_equal(x : CrcFieldSpec, y : CrcFieldSpec) -> Bool
    automatically derived

    CrcFieldSpec::to_repr

    automatically derived

    DialectSchema

    pub(all) struct DialectSchema {
    version : Int
    dialect : Int
    includes : Array[String]
    enums : Array[XmlEnumDef]
    messages : Array[XmlMessageDef]
    } derive(Eq,
    Debug
    )

    Complete parsed MAVLink XML dialect schema (<mavlink>).

    DialectSchema::equal

    automatically derived

    DialectSchema::not_equal

    fn DialectSchema::not_equal(x : DialectSchema, y : DialectSchema) -> Bool
    automatically derived

    DialectSchema::to_repr

    automatically derived

    DistanceSensor

    pub(all) struct DistanceSensor {
    time_boot_ms : UInt
    min_distance : UInt
    max_distance : UInt
    current_distance : UInt
    mav_type : Byte
    id : Byte
    orientation : Byte
    covariance : Byte
    horizontal_fov : Float
    vertical_fov : Float
    quaternion : FixedArray[Float]
    signal_quality : Byte
    } derive(Eq,
    Debug
    )

    Distance sensor information for an onboard rangefinder.
    • MAVLink Message DISTANCE_SENSOR (ID: 132, CRC_EXTRA: 85, base_len: 14B, max_len: 39B)

    DistanceSensor::base_payload_len

    fn DistanceSensor::base_payload_len() -> Int

    DistanceSensor::crc_extra

    fn DistanceSensor::crc_extra() -> Byte

    DistanceSensor::decode_payload

    fn DistanceSensor::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[DistanceSensor, MavError]

    Deserialize DistanceSensor from wire-ordered little-endian payload bytes.

    DistanceSensor::encode_payload

    fn DistanceSensor::encode_payload(self : DistanceSensor, v2? : Bool) -> Bytes

    Serialize DistanceSensor into wire-ordered little-endian payload bytes.

    DistanceSensor::equal

    automatically derived

    DistanceSensor::max_payload_len

    fn DistanceSensor::max_payload_len() -> Int

    DistanceSensor::msg_id

    fn DistanceSensor::msg_id() -> UInt

    DistanceSensor::not_equal

    fn DistanceSensor::not_equal(x : DistanceSensor, y : DistanceSensor) -> Bool
    automatically derived

    DistanceSensor::to_repr

    automatically derived

    ExtParameterEntry

    pub(all) struct ExtParameterEntry {
    param_id : String
    param_value : String
    param_type : Byte
    param_index : UInt
    } derive(Eq,
    Debug
    )

    Extended 128-byte parameter entry for camera, gimbal, and smart payload subsystems.

    ExtParameterEntry::equal

    automatically derived

    ExtParameterEntry::not_equal

    fn ExtParameterEntry::not_equal(x : ExtParameterEntry, y : ExtParameterEntry) -> Bool
    automatically derived

    ExtParameterEntry::to_repr

    automatically derived

    ExtendedParameterClient

    pub(all) struct ExtendedParameterClient {
    target_system : Byte
    target_component : Byte
    last_ack_result : ParamAck?
    params : Array[ExtParameterEntry]
    } derive(Eq,
    Debug
    )

    GCS-side client for the MAVLink Extended Parameter Protocol (PARAM_EXT_* #320..#324).

    ExtendedParameterClient::equal

    automatically derived

    ExtendedParameterClient::new

    fn ExtendedParameterClient::new(target_system : Byte, target_component : Byte) -> ExtendedParameterClient

    Create a new ExtendedParameterClient.

    ExtendedParameterClient::not_equal

    automatically derived

    ExtendedParameterClient::on_message

    fn ExtendedParameterClient::on_message(self : ExtendedParameterClient, msg : MavMessage) -> Unit

    Process an incoming PARAM_EXT_VALUE (#322) or PARAM_EXT_ACK (#324) message.

    ExtendedParameterClient::request_list

    Request all extended parameters (PARAM_EXT_REQUEST_LIST #321).

    ExtendedParameterClient::set_param

    fn ExtendedParameterClient::set_param(self : ExtendedParameterClient, param_id : String, param_value : String, param_type : Byte) -> MavMessage

    Send a PARAM_EXT_SET (#323) command to update an extended parameter.

    ExtendedParameterClient::to_repr

    automatically derived

    ExtendedParameterServer

    pub(all) struct ExtendedParameterServer {
    sysid : Byte
    compid : Byte
    params : Array[ExtParameterEntry]
    } derive(Eq,
    Debug
    )

    Vehicle/payload-side server for the MAVLink Extended Parameter Protocol (PARAM_EXT_REQUEST_LIST #321, PARAM_EXT_REQUEST_READ #320, PARAM_EXT_SET #323 -> PARAM_EXT_ACK #324).

    ExtendedParameterServer::equal

    automatically derived

    ExtendedParameterServer::handle_message

    Handle an incoming PARAM_EXT_* message and return the outbound responses.

    ExtendedParameterServer::new

    fn ExtendedParameterServer::new(sysid : Byte, compid : Byte, initial_params : Array[(String, String, Byte)]) -> ExtendedParameterServer

    Create a new ExtendedParameterServer initialized with (param_id, param_value, param_type) entries.

    ExtendedParameterServer::not_equal

    automatically derived

    ExtendedParameterServer::to_repr

    automatically derived

    ExtendedSysState

    pub(all) struct ExtendedSysState {
    vtol_state : Byte
    landed_state : Byte
    } derive(Eq,
    Debug
    )

    Provides state for additional features.
    • MAVLink Message EXTENDED_SYS_STATE (ID: 245, CRC_EXTRA: 130, base_len: 2B, max_len: 2B)

    ExtendedSysState::base_payload_len

    fn ExtendedSysState::base_payload_len() -> Int

    ExtendedSysState::crc_extra

    fn ExtendedSysState::crc_extra() -> Byte

    ExtendedSysState::decode_payload

    fn ExtendedSysState::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[ExtendedSysState, MavError]

    Deserialize ExtendedSysState from wire-ordered little-endian payload bytes.

    ExtendedSysState::encode_payload

    fn ExtendedSysState::encode_payload(self : ExtendedSysState, v2? : Bool) -> Bytes

    Serialize ExtendedSysState into wire-ordered little-endian payload bytes.

    ExtendedSysState::equal

    automatically derived

    ExtendedSysState::max_payload_len

    fn ExtendedSysState::max_payload_len() -> Int

    ExtendedSysState::msg_id

    fn ExtendedSysState::msg_id() -> UInt

    ExtendedSysState::not_equal

    fn ExtendedSysState::not_equal(x : ExtendedSysState, y : ExtendedSysState) -> Bool
    automatically derived

    ExtendedSysState::to_repr

    automatically derived

    FileTransferProtocol

    pub(all) struct FileTransferProtocol {
    target_network : Byte
    target_system : Byte
    target_component : Byte
    payload : FixedArray[Byte]
    } derive(Eq,
    Debug
    )

    File transfer protocol message: https://mavlink.io/en/services/ftp.html.
    • MAVLink Message FILE_TRANSFER_PROTOCOL (ID: 110, CRC_EXTRA: 84, base_len: 254B, max_len: 254B)

    FileTransferProtocol::base_payload_len

    fn FileTransferProtocol::base_payload_len() -> Int

    FileTransferProtocol::crc_extra

    fn FileTransferProtocol::crc_extra() -> Byte

    FileTransferProtocol::decode_payload

    fn FileTransferProtocol::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[FileTransferProtocol, MavError]

    Deserialize FileTransferProtocol from wire-ordered little-endian payload bytes.

    FileTransferProtocol::encode_payload

    fn FileTransferProtocol::encode_payload(self : FileTransferProtocol, v2? : Bool) -> Bytes

    Serialize FileTransferProtocol into wire-ordered little-endian payload bytes.

    FileTransferProtocol::equal

    automatically derived

    FileTransferProtocol::max_payload_len

    fn FileTransferProtocol::max_payload_len() -> Int

    FileTransferProtocol::msg_id

    fn FileTransferProtocol::msg_id() -> UInt

    FileTransferProtocol::not_equal

    automatically derived

    FileTransferProtocol::to_repr

    automatically derived

    FrameParser

    pub(all) struct FrameParser {
    buffer : Array[Byte]
    packets_received : UInt
    packets_dropped : UInt
    crc_errors : UInt
    noise_bytes_skipped : UInt
    last_seq : Int
    } derive(Eq,
    Debug
    )

    Stateful streaming MAVLink v1/v2 frame parser with noise recovery, partial-packet buffering, and sequence-gap packet-drop tracking.

    FrameParser::equal

    fn FrameParser::equal(FrameParser, FrameParser) -> Bool
    automatically derived

    FrameParser::new

    Create a new streaming FrameParser.

    FrameParser::not_equal

    fn FrameParser::not_equal(x : FrameParser, y : FrameParser) -> Bool
    automatically derived

    FrameParser::push_bytes

    fn FrameParser::push_bytes(self : FrameParser, chunk : Bytes, crc_extra_lookup : (UInt) -> Byte?, signing? : SigningContext?) -> Array[ParseStreamEvent]

    Feed a chunk of incoming bytes (e.g. from UART or UDP) into the parser and return all decoded frames and protocol errors encountered.

    FrameParser::to_repr

    automatically derived

    FtpOpcode

    pub(all) enum FtpOpcode {
    FtpNone
    TerminateSession
    ResetSessions
    ListDirectory
    OpenFileRO
    ReadFile
    CreateFile
    WriteFile
    RemoveFile
    CreateDirectory
    RemoveDirectory
    OpenFileWO
    TruncateFile
    Rename
    CalcFileCRC32
    BurstReadFile
    Ack
    Nak
    } derive(Eq,
    Debug
    )

    Official MAVLink FTP opcodes carried inside the 251-byte FILE_TRANSFER_PROTOCOL (#110) payload.

    FtpOpcode::equal

    fn FtpOpcode::equal(FtpOpcode, FtpOpcode) -> Bool
    automatically derived

    FtpOpcode::from_byte

    fn FtpOpcode::from_byte(b : Byte) -> FtpOpcode?

    Decode FtpOpcode from its wire byte code.

    FtpOpcode::not_equal

    fn FtpOpcode::not_equal(x : FtpOpcode, y : FtpOpcode) -> Bool
    automatically derived

    FtpOpcode::to_byte

    fn FtpOpcode::to_byte(self : FtpOpcode) -> Byte

    Convert FtpOpcode to its wire byte code.

    FtpOpcode::to_repr

    automatically derived

    FtpPacket

    pub(all) struct FtpPacket {
    seq_number : UInt
    session : Byte
    opcode : FtpOpcode
    req_opcode : FtpOpcode
    burst_complete : Bool
    offset : UInt
    data : Bytes
    } derive(Eq,
    Debug
    )

    Structured MAVLink FTP sub-packet (12-byte little-endian header + up to 239 data bytes = 251 bytes max).

    FtpPacket::equal

    fn FtpPacket::equal(FtpPacket, FtpPacket) -> Bool
    automatically derived

    FtpPacket::from_file_transfer_protocol

    fn FtpPacket::from_file_transfer_protocol(ftp : FileTransferProtocol) -> Result[FtpPacket, MavError]

    Decode an FtpPacket from a FileTransferProtocol (#110) struct.

    FtpPacket::not_equal

    fn FtpPacket::not_equal(x : FtpPacket, y : FtpPacket) -> Bool
    automatically derived

    FtpPacket::to_mav_message

    fn FtpPacket::to_mav_message(self : FtpPacket, target_network? : Byte, target_system? : Byte, target_component? : Byte) -> Result[MavMessage, MavError]

    Encode FtpPacket into a FILE_TRANSFER_PROTOCOL (#110) MavMessage. Returns Err(PayloadTooLarge(_)) if data.length() > 239.

    FtpPacket::to_repr

    automatically derived

    FtpServer

    pub(all) struct FtpServer {
    active_session : Byte
    open_file_idx : Int
    files : Array[FtpVirtualFile]
    } derive(Eq,
    Debug
    )

    Vehicle-side MAVLink FTP (FILE_TRANSFER_PROTOCOL #110) virtual filesystem server supporting OpenFileRO, ReadFile, ListDirectory, TerminateSession, and ResetSessions.

    FtpServer::equal

    fn FtpServer::equal(FtpServer, FtpServer) -> Bool
    automatically derived

    FtpServer::handle_packet

    fn FtpServer::handle_packet(self : FtpServer, req : FtpPacket) -> FtpPacket

    Process an incoming FtpPacket request and return the corresponding Ack or Nak FtpPacket.

    FtpServer::new

    fn FtpServer::new(files : Array[(String, Bytes)], session_id? : Byte) -> FtpServer

    Create a new FtpServer populated with virtual files.

    FtpServer::not_equal

    fn FtpServer::not_equal(x : FtpServer, y : FtpServer) -> Bool
    automatically derived

    FtpServer::to_repr

    automatically derived

    FtpVirtualFile

    pub(all) struct FtpVirtualFile {
    path : String
    content : Bytes
    } derive(Eq,
    Debug
    )

    Virtual file entry stored inside FtpServer.

    FtpVirtualFile::equal

    automatically derived

    FtpVirtualFile::not_equal

    fn FtpVirtualFile::not_equal(x : FtpVirtualFile, y : FtpVirtualFile) -> Bool
    automatically derived

    FtpVirtualFile::to_repr

    automatically derived

    GlobalPositionInt

    pub(all) struct GlobalPositionInt {
    time_boot_ms : UInt
    lat : Int
    lon : Int
    alt : Int
    relative_alt : Int
    vx : Int
    vy : Int
    vz : Int
    hdg : UInt
    } derive(Eq,
    Debug
    )

    The filtered global position (e.g. fused GPS and accelerometers).
    • MAVLink Message GLOBAL_POSITION_INT (ID: 33, CRC_EXTRA: 104, base_len: 28B, max_len: 28B)

    GlobalPositionInt::base_payload_len

    fn GlobalPositionInt::base_payload_len() -> Int

    GlobalPositionInt::crc_extra

    fn GlobalPositionInt::crc_extra() -> Byte

    GlobalPositionInt::decode_payload

    fn GlobalPositionInt::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[GlobalPositionInt, MavError]

    Deserialize GlobalPositionInt from wire-ordered little-endian payload bytes.

    GlobalPositionInt::encode_payload

    fn GlobalPositionInt::encode_payload(self : GlobalPositionInt, v2? : Bool) -> Bytes

    Serialize GlobalPositionInt into wire-ordered little-endian payload bytes.

    GlobalPositionInt::equal

    automatically derived

    GlobalPositionInt::max_payload_len

    fn GlobalPositionInt::max_payload_len() -> Int

    GlobalPositionInt::msg_id

    fn GlobalPositionInt::msg_id() -> UInt

    GlobalPositionInt::not_equal

    fn GlobalPositionInt::not_equal(x : GlobalPositionInt, y : GlobalPositionInt) -> Bool
    automatically derived

    GlobalPositionInt::to_repr

    automatically derived

    GoldenDialectEntry

    pub(all) struct GoldenDialectEntry {
    msg_id : UInt
    name : String
    expected_crc_extra : Byte
    expected_base_len : Int
    expected_max_len : Int
    } derive(Eq,
    Debug
    )

    Reference golden vector entry for a standard MAVLink message (ID, name, CRC_EXTRA, base_len, max_len).

    GoldenDialectEntry::equal

    automatically derived

    GoldenDialectEntry::not_equal

    automatically derived

    GoldenDialectEntry::to_repr

    automatically derived

    GpsFixType

    pub(all) enum GpsFixType {
    NoGps
    NoFix
    V2dFix
    V3dFix
    Dgps
    RtkFloat
    RtkFixed
    } derive(Eq,
    Debug
    )

    Type of GPS fix.

    GpsFixType::equal

    fn GpsFixType::equal(GpsFixType, GpsFixType) -> Bool
    automatically derived

    GpsFixType::from_uint

    fn GpsFixType::from_uint(v : UInt) -> GpsFixType?

    Decode GpsFixType from its raw MAVLink numeric value.

    GpsFixType::not_equal

    fn GpsFixType::not_equal(x : GpsFixType, y : GpsFixType) -> Bool
    automatically derived

    GpsFixType::to_repr

    automatically derived

    GpsFixType::to_uint

    fn GpsFixType::to_uint(self : GpsFixType) -> UInt

    Convert GpsFixType to its raw MAVLink numeric value.

    GpsRawInt

    pub(all) struct GpsRawInt {
    time_usec : UInt64
    fix_type : Byte
    lat : Int
    lon : Int
    alt : Int
    eph : UInt
    epv : UInt
    vel : UInt
    cog : UInt
    satellites_visible : Byte
    alt_ellipsoid : Int
    h_acc : UInt
    v_acc : UInt
    vel_acc : UInt
    hdg_acc : UInt
    yaw : UInt
    } derive(Eq,
    Debug
    )

    The global position, as returned by the Global Positioning System (GPS).
    • MAVLink Message GPS_RAW_INT (ID: 24, CRC_EXTRA: 24, base_len: 30B, max_len: 52B)

    GpsRawInt::base_payload_len

    fn GpsRawInt::base_payload_len() -> Int

    GpsRawInt::crc_extra

    fn GpsRawInt::crc_extra() -> Byte

    GpsRawInt::decode_payload

    fn GpsRawInt::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[GpsRawInt, MavError]

    Deserialize GpsRawInt from wire-ordered little-endian payload bytes.

    GpsRawInt::encode_payload

    fn GpsRawInt::encode_payload(self : GpsRawInt, v2? : Bool) -> Bytes

    Serialize GpsRawInt into wire-ordered little-endian payload bytes.

    GpsRawInt::equal

    fn GpsRawInt::equal(GpsRawInt, GpsRawInt) -> Bool
    automatically derived

    GpsRawInt::max_payload_len

    fn GpsRawInt::max_payload_len() -> Int

    GpsRawInt::msg_id

    fn GpsRawInt::msg_id() -> UInt

    GpsRawInt::not_equal

    fn GpsRawInt::not_equal(x : GpsRawInt, y : GpsRawInt) -> Bool
    automatically derived

    GpsRawInt::to_repr

    automatically derived

    Heartbeat

    pub(all) struct Heartbeat {
    mav_type : Byte
    autopilot : Byte
    base_mode : Byte
    custom_mode : UInt
    system_status : Byte
    mavlink_version : Byte
    } derive(Eq,
    Debug
    )

    The heartbeat message shows that a system or component is present and responding.
    • MAVLink Message HEARTBEAT (ID: 0, CRC_EXTRA: 50, base_len: 9B, max_len: 9B)

    Heartbeat::base_payload_len

    fn Heartbeat::base_payload_len() -> Int

    Heartbeat::crc_extra

    fn Heartbeat::crc_extra() -> Byte

    Heartbeat::decode_payload

    fn Heartbeat::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[Heartbeat, MavError]

    Deserialize Heartbeat from wire-ordered little-endian payload bytes.

    Heartbeat::encode_payload

    fn Heartbeat::encode_payload(self : Heartbeat, v2? : Bool) -> Bytes

    Serialize Heartbeat into wire-ordered little-endian payload bytes.

    Heartbeat::equal

    fn Heartbeat::equal(Heartbeat, Heartbeat) -> Bool
    automatically derived

    Heartbeat::max_payload_len

    fn Heartbeat::max_payload_len() -> Int

    Heartbeat::msg_id

    fn Heartbeat::msg_id() -> UInt

    Heartbeat::not_equal

    fn Heartbeat::not_equal(x : Heartbeat, y : Heartbeat) -> Bool
    automatically derived

    Heartbeat::to_repr

    automatically derived

    HeartbeatMonitor

    pub(all) struct HeartbeatMonitor {
    timeout_ms : UInt64
    nodes : Array[NodeLinkStatus]
    } derive(Eq,
    Debug
    )

    Multi-node MAVLink v2 heartbeat and link quality monitor.

    HeartbeatMonitor::equal

    automatically derived

    HeartbeatMonitor::get_node

    fn HeartbeatMonitor::get_node(self : HeartbeatMonitor, sysid : Byte, compid : Byte) -> NodeLinkStatus?

    Look up the current NodeLinkStatus for (sysid, compid).

    HeartbeatMonitor::is_node_alive

    fn HeartbeatMonitor::is_node_alive(self : HeartbeatMonitor, sysid : Byte, compid : Byte, now_ms : UInt64) -> Bool

    Check whether a specific (sysid, compid) node is currently alive within timeout_ms.

    HeartbeatMonitor::new

    fn HeartbeatMonitor::new(timeout_ms? : UInt64) -> HeartbeatMonitor

    Create a new HeartbeatMonitor with a configurable link timeout in milliseconds (default 3000 ms).

    HeartbeatMonitor::node_packet_loss_ratio

    fn HeartbeatMonitor::node_packet_loss_ratio(self : HeartbeatMonitor, sysid : Byte, compid : Byte) -> Double

    Compute the packet loss ratio (0.0 .. 1.0) for (sysid, compid).

    HeartbeatMonitor::not_equal

    fn HeartbeatMonitor::not_equal(x : HeartbeatMonitor, y : HeartbeatMonitor) -> Bool
    automatically derived

    HeartbeatMonitor::on_frame

    fn HeartbeatMonitor::on_frame(self : HeartbeatMonitor, frame : MavFrame, now_ms : UInt64) -> Unit

    Record any incoming MavFrame to update sequence-gap packet loss statistics and automatically extract HEARTBEAT (#0) state when present.

    HeartbeatMonitor::to_repr

    automatically derived

    HighresImu

    pub(all) struct HighresImu {
    time_usec : UInt64
    xacc : Float
    yacc : Float
    zacc : Float
    xgyro : Float
    ygyro : Float
    zgyro : Float
    xmag : Float
    ymag : Float
    zmag : Float
    abs_pressure : Float
    diff_pressure : Float
    pressure_alt : Float
    temperature : Float
    fields_updated : UInt
    id : Byte
    } derive(Eq,
    Debug
    )

    The IMU readings in SI units in NED body frame.
    • MAVLink Message HIGHRES_IMU (ID: 105, CRC_EXTRA: 93, base_len: 62B, max_len: 63B)

    HighresImu::base_payload_len

    fn HighresImu::base_payload_len() -> Int

    HighresImu::crc_extra

    fn HighresImu::crc_extra() -> Byte

    HighresImu::decode_payload

    fn HighresImu::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[HighresImu, MavError]

    Deserialize HighresImu from wire-ordered little-endian payload bytes.

    HighresImu::encode_payload

    fn HighresImu::encode_payload(self : HighresImu, v2? : Bool) -> Bytes

    Serialize HighresImu into wire-ordered little-endian payload bytes.

    HighresImu::equal

    fn HighresImu::equal(HighresImu, HighresImu) -> Bool
    automatically derived

    HighresImu::max_payload_len

    fn HighresImu::max_payload_len() -> Int

    HighresImu::msg_id

    fn HighresImu::msg_id() -> UInt

    HighresImu::not_equal

    fn HighresImu::not_equal(x : HighresImu, y : HighresImu) -> Bool
    automatically derived

    HighresImu::to_repr

    automatically derived

    HomePosition

    pub(all) struct HomePosition {
    latitude : Int
    longitude : Int
    altitude : Int
    x : Float
    y : Float
    z : Float
    q : FixedArray[Float]
    approach_x : Float
    approach_y : Float
    approach_z : Float
    time_usec : UInt64
    } derive(Eq,
    Debug
    )

    Contains the home position.
    • MAVLink Message HOME_POSITION (ID: 242, CRC_EXTRA: 104, base_len: 52B, max_len: 60B)

    HomePosition::base_payload_len

    fn HomePosition::base_payload_len() -> Int

    HomePosition::crc_extra

    fn HomePosition::crc_extra() -> Byte

    HomePosition::decode_payload

    fn HomePosition::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[HomePosition, MavError]

    Deserialize HomePosition from wire-ordered little-endian payload bytes.

    HomePosition::encode_payload

    fn HomePosition::encode_payload(self : HomePosition, v2? : Bool) -> Bytes

    Serialize HomePosition into wire-ordered little-endian payload bytes.

    HomePosition::equal

    automatically derived

    HomePosition::max_payload_len

    fn HomePosition::max_payload_len() -> Int

    HomePosition::msg_id

    fn HomePosition::msg_id() -> UInt

    HomePosition::not_equal

    fn HomePosition::not_equal(x : HomePosition, y : HomePosition) -> Bool
    automatically derived

    HomePosition::to_repr

    automatically derived

    LocalPositionNed

    pub(all) struct LocalPositionNed {
    time_boot_ms : UInt
    x : Float
    y : Float
    z : Float
    vx : Float
    vy : Float
    vz : Float
    } derive(Eq,
    Debug
    )

    The filtered local position (e.g. fused computer vision and accelerometers) in NED frame.
    • MAVLink Message LOCAL_POSITION_NED (ID: 32, CRC_EXTRA: 185, base_len: 28B, max_len: 28B)

    LocalPositionNed::base_payload_len

    fn LocalPositionNed::base_payload_len() -> Int

    LocalPositionNed::crc_extra

    fn LocalPositionNed::crc_extra() -> Byte

    LocalPositionNed::decode_payload

    fn LocalPositionNed::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[LocalPositionNed, MavError]

    Deserialize LocalPositionNed from wire-ordered little-endian payload bytes.

    LocalPositionNed::encode_payload

    fn LocalPositionNed::encode_payload(self : LocalPositionNed, v2? : Bool) -> Bytes

    Serialize LocalPositionNed into wire-ordered little-endian payload bytes.

    LocalPositionNed::equal

    automatically derived

    LocalPositionNed::max_payload_len

    fn LocalPositionNed::max_payload_len() -> Int

    LocalPositionNed::msg_id

    fn LocalPositionNed::msg_id() -> UInt

    LocalPositionNed::not_equal

    fn LocalPositionNed::not_equal(x : LocalPositionNed, y : LocalPositionNed) -> Bool
    automatically derived

    LocalPositionNed::to_repr

    automatically derived

    LoggingAck

    pub(all) struct LoggingAck {
    target_system : Byte
    target_component : Byte
    sequence : UInt
    } derive(Eq,
    Debug
    )

    An ack for a LOGGING_DATA_ACKED message (requires 24-bit MAVLink v2 message ID).
    • MAVLink Message LOGGING_ACK (ID: 268, CRC_EXTRA: 14, base_len: 4B, max_len: 4B)

    LoggingAck::base_payload_len

    fn LoggingAck::base_payload_len() -> Int

    LoggingAck::crc_extra

    fn LoggingAck::crc_extra() -> Byte

    LoggingAck::decode_payload

    fn LoggingAck::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[LoggingAck, MavError]

    Deserialize LoggingAck from wire-ordered little-endian payload bytes.

    LoggingAck::encode_payload

    fn LoggingAck::encode_payload(self : LoggingAck, v2? : Bool) -> Bytes

    Serialize LoggingAck into wire-ordered little-endian payload bytes.

    LoggingAck::equal

    fn LoggingAck::equal(LoggingAck, LoggingAck) -> Bool
    automatically derived

    LoggingAck::max_payload_len

    fn LoggingAck::max_payload_len() -> Int

    LoggingAck::msg_id

    fn LoggingAck::msg_id() -> UInt

    LoggingAck::not_equal

    fn LoggingAck::not_equal(x : LoggingAck, y : LoggingAck) -> Bool
    automatically derived

    LoggingAck::to_repr

    automatically derived

    LoggingData

    pub(all) struct LoggingData {
    target_system : Byte
    target_component : Byte
    sequence : UInt
    length : Byte
    first_message_offset : Byte
    data : FixedArray[Byte]
    } derive(Eq,
    Debug
    )

    A message containing logged data (requires 24-bit MAVLink v2 message ID).
    • MAVLink Message LOGGING_DATA (ID: 266, CRC_EXTRA: 193, base_len: 255B, max_len: 255B)

    LoggingData::base_payload_len

    fn LoggingData::base_payload_len() -> Int

    LoggingData::crc_extra

    fn LoggingData::crc_extra() -> Byte

    LoggingData::decode_payload

    fn LoggingData::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[LoggingData, MavError]

    Deserialize LoggingData from wire-ordered little-endian payload bytes.

    LoggingData::encode_payload

    fn LoggingData::encode_payload(self : LoggingData, v2? : Bool) -> Bytes

    Serialize LoggingData into wire-ordered little-endian payload bytes.

    LoggingData::equal

    fn LoggingData::equal(LoggingData, LoggingData) -> Bool
    automatically derived

    LoggingData::max_payload_len

    fn LoggingData::max_payload_len() -> Int

    LoggingData::msg_id

    fn LoggingData::msg_id() -> UInt

    LoggingData::not_equal

    fn LoggingData::not_equal(x : LoggingData, y : LoggingData) -> Bool
    automatically derived

    LoggingData::to_repr

    automatically derived

    ManualControl

    pub(all) struct ManualControl {
    target : Byte
    x : Int
    y : Int
    z : Int
    r : Int
    buttons : UInt
    buttons2 : UInt
    enabled_extensions : Byte
    s : Int
    t : Int
    } derive(Eq,
    Debug
    )

    This message provides an API for manually controlling the vehicle using standard joystick axes.
    • MAVLink Message MANUAL_CONTROL (ID: 69, CRC_EXTRA: 243, base_len: 11B, max_len: 18B)

    ManualControl::base_payload_len

    fn ManualControl::base_payload_len() -> Int

    ManualControl::crc_extra

    fn ManualControl::crc_extra() -> Byte

    ManualControl::decode_payload

    fn ManualControl::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[ManualControl, MavError]

    Deserialize ManualControl from wire-ordered little-endian payload bytes.

    ManualControl::encode_payload

    fn ManualControl::encode_payload(self : ManualControl, v2? : Bool) -> Bytes

    Serialize ManualControl into wire-ordered little-endian payload bytes.

    ManualControl::equal

    automatically derived

    ManualControl::max_payload_len

    fn ManualControl::max_payload_len() -> Int

    ManualControl::msg_id

    fn ManualControl::msg_id() -> UInt

    ManualControl::not_equal

    fn ManualControl::not_equal(x : ManualControl, y : ManualControl) -> Bool
    automatically derived

    ManualControl::to_repr

    automatically derived

    MavAutopilot

    pub(all) enum MavAutopilot {
    Generic
    Ardupilotmega
    Invalid
    Px4
    } derive(Eq,
    Debug
    )

    Micro air vehicle / autopilot classes.

    MavAutopilot::equal

    automatically derived

    MavAutopilot::from_uint

    fn MavAutopilot::from_uint(v : UInt) -> MavAutopilot?

    Decode MavAutopilot from its raw MAVLink numeric value.

    MavAutopilot::not_equal

    fn MavAutopilot::not_equal(x : MavAutopilot, y : MavAutopilot) -> Bool
    automatically derived

    MavAutopilot::to_repr

    automatically derived

    MavAutopilot::to_uint

    fn MavAutopilot::to_uint(self : MavAutopilot) -> UInt

    Convert MavAutopilot to its raw MAVLink numeric value.

    MavCmd

    pub(all) enum MavCmd {
    NavWaypoint
    NavLoiterUnlim
    NavReturnToLaunch
    NavLand
    NavTakeoff
    DoSetMode
    DoChangeSpeed
    DoSetServo
    ComponentArmDisarm
    SetMessageInterval
    RequestMessage
    RequestAutopilotCapabilities
    } derive(Eq,
    Debug
    )

    Commands to be executed by the MAV.

    MavCmd::equal

    fn MavCmd::equal(MavCmd, MavCmd) -> Bool
    automatically derived

    MavCmd::from_uint

    fn MavCmd::from_uint(v : UInt) -> MavCmd?

    Decode MavCmd from its raw MAVLink numeric value.

    MavCmd::not_equal

    fn MavCmd::not_equal(x : MavCmd, y : MavCmd) -> Bool
    automatically derived

    MavCmd::to_repr

    automatically derived

    MavCmd::to_uint

    fn MavCmd::to_uint(self : MavCmd) -> UInt

    Convert MavCmd to its raw MAVLink numeric value.

    MavComponent

    pub(all) enum MavComponent {
    MavCompIdAll
    MavCompIdAutopilot1
    MavCompIdCamera
    MavCompIdGimbal
    MavCompIdMissionplanner
    MavCompIdOnboardComputer
    MavCompIdGps
    } derive(Eq,
    Debug
    )

    Component ids (values) for the different types and instances of onboard hardware/software.

    MavComponent::equal

    automatically derived

    MavComponent::from_uint

    fn MavComponent::from_uint(v : UInt) -> MavComponent?

    Decode MavComponent from its raw MAVLink numeric value.

    MavComponent::not_equal

    fn MavComponent::not_equal(x : MavComponent, y : MavComponent) -> Bool
    automatically derived

    MavComponent::to_repr

    automatically derived

    MavComponent::to_uint

    fn MavComponent::to_uint(self : MavComponent) -> UInt

    Convert MavComponent to its raw MAVLink numeric value.

    MavCoordFrame

    pub(all) enum MavCoordFrame {
    Global
    LocalNed
    Mission
    GlobalRelativeAlt
    LocalEnu
    GlobalInt
    GlobalRelativeAltInt
    BodyNed
    } derive(Eq,
    Debug
    )

    Coordinate frames used by MAVLink mission items and position messages.

    MavCoordFrame::equal

    automatically derived

    MavCoordFrame::from_uint

    fn MavCoordFrame::from_uint(v : UInt) -> MavCoordFrame?

    Decode MavCoordFrame from its raw MAVLink numeric value.

    MavCoordFrame::not_equal

    fn MavCoordFrame::not_equal(x : MavCoordFrame, y : MavCoordFrame) -> Bool
    automatically derived

    MavCoordFrame::to_repr

    automatically derived

    MavCoordFrame::to_uint

    fn MavCoordFrame::to_uint(self : MavCoordFrame) -> UInt

    Convert MavCoordFrame to its raw MAVLink numeric value.

    MavDataStream

    pub(all) enum MavDataStream {
    All
    RawSensors
    ExtendedStatus
    RcChannels
    RawController
    Position
    Extra1
    Extra2
    Extra3
    } derive(Eq,
    Debug
    )

    Data stream IDs for telemetry rate configuration.

    MavDataStream::equal

    automatically derived

    MavDataStream::from_uint

    fn MavDataStream::from_uint(v : UInt) -> MavDataStream?

    Decode MavDataStream from its raw MAVLink numeric value.

    MavDataStream::not_equal

    fn MavDataStream::not_equal(x : MavDataStream, y : MavDataStream) -> Bool
    automatically derived

    MavDataStream::to_repr

    automatically derived

    MavDataStream::to_uint

    fn MavDataStream::to_uint(self : MavDataStream) -> UInt

    Convert MavDataStream to its raw MAVLink numeric value.

    MavDebug

    pub(all) struct MavDebug {
    time_boot_ms : UInt
    ind : Byte
    value : Float
    } derive(Eq,
    Debug
    )

    Send a debug value. The index is used to discriminate between values.
    • MAVLink Message DEBUG (ID: 254, CRC_EXTRA: 46, base_len: 9B, max_len: 9B)

    MavDebug::base_payload_len

    fn MavDebug::base_payload_len() -> Int

    MavDebug::crc_extra

    fn MavDebug::crc_extra() -> Byte

    MavDebug::decode_payload

    fn MavDebug::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[MavDebug, MavError]

    Deserialize MavDebug from wire-ordered little-endian payload bytes.

    MavDebug::encode_payload

    fn MavDebug::encode_payload(self : MavDebug, v2? : Bool) -> Bytes

    Serialize MavDebug into wire-ordered little-endian payload bytes.

    MavDebug::equal

    fn MavDebug::equal(MavDebug, MavDebug) -> Bool
    automatically derived

    MavDebug::max_payload_len

    fn MavDebug::max_payload_len() -> Int

    MavDebug::msg_id

    fn MavDebug::msg_id() -> UInt

    MavDebug::not_equal

    fn MavDebug::not_equal(x : MavDebug, y : MavDebug) -> Bool
    automatically derived

    MavDebug::to_repr

    automatically derived

    MavDistanceSensor

    pub(all) enum MavDistanceSensor {
    Laser
    Ultrasound
    Infrared
    Radar
    Unknown
    } derive(Eq,
    Debug
    )

    Enumeration of distance sensor types.

    MavDistanceSensor::equal

    automatically derived

    MavDistanceSensor::from_uint

    fn MavDistanceSensor::from_uint(v : UInt) -> MavDistanceSensor?

    Decode MavDistanceSensor from its raw MAVLink numeric value.

    MavDistanceSensor::not_equal

    fn MavDistanceSensor::not_equal(x : MavDistanceSensor, y : MavDistanceSensor) -> Bool
    automatically derived

    MavDistanceSensor::to_repr

    automatically derived

    MavDistanceSensor::to_uint

    fn MavDistanceSensor::to_uint(self : MavDistanceSensor) -> UInt

    Convert MavDistanceSensor to its raw MAVLink numeric value.

    MavError

    pub(all) enum MavError {
    InvalidMagic(Byte)
    IncompleteFrame(Int, Int)
    PayloadTooLarge(Int)
    PayloadTooShort(Int, Int)
    UnsupportedV1MessageId(UInt)
    UnsupportedIncompatFlags(Byte)
    UnknownMessageId(UInt)
    CrcMismatch(UInt, UInt)
    SignatureMissing
    SignatureInvalid(String)
    InvalidEnumValue(String, UInt)
    XmlParseError(String)
    SchemaError(String)
    } derive(Eq,
    Debug
    )

    Comprehensive error type covering wire framing, checksum verification, payload serialization, packet signing, and XML schema code generation.

    MavError::equal

    fn MavError::equal(MavError, MavError) -> Bool
    automatically derived

    MavError::not_equal

    fn MavError::not_equal(x : MavError, y : MavError) -> Bool
    automatically derived

    MavError::to_repr

    automatically derived

    MavFieldType

    pub(all) enum MavFieldType {
    Scalar(MavPrimitiveType, Bool)
    FixedArrayType(MavPrimitiveType, Int)
    } derive(Eq,
    Debug
    )

    Parsed field type representation (scalar or fixed-length array).

    MavFieldType::equal

    automatically derived

    MavFieldType::not_equal

    fn MavFieldType::not_equal(x : MavFieldType, y : MavFieldType) -> Bool
    automatically derived

    MavFieldType::order_weight

    fn MavFieldType::order_weight(self : MavFieldType) -> Int

    Element byte width used for MAVLink wire field reordering.

    MavFieldType::to_repr

    automatically derived

    MavFieldType::total_byte_len

    fn MavFieldType::total_byte_len(self : MavFieldType) -> Int

    Total wire byte length occupied by a field.

    MavFrame

    pub(all) struct MavFrame {
    header : MavHeader
    payload : Bytes
    checksum : UInt
    signature : MavSignature?
    } derive(Eq,
    Debug
    )

    Decoded or ready-to-encode raw MAVLink wire frame.

    MavFrame::equal

    fn MavFrame::equal(MavFrame, MavFrame) -> Bool
    automatically derived

    MavFrame::not_equal

    fn MavFrame::not_equal(x : MavFrame, y : MavFrame) -> Bool
    automatically derived

    MavFrame::to_repr

    automatically derived

    MavHeader

    pub(all) struct MavHeader {
    version : ProtocolVersion
    incompat_flags : Byte
    compat_flags : Byte
    seq : Byte
    sysid : Byte
    compid : Byte
    msgid : UInt
    } derive(Eq,
    Debug
    )

    Metadata header for a MAVLink v1 or v2 packet.

    MavHeader::equal

    fn MavHeader::equal(MavHeader, MavHeader) -> Bool
    automatically derived

    MavHeader::new_v1

    fn MavHeader::new_v1(seq~ : Byte, sysid~ : Byte, compid~ : Byte, msgid~ : UInt) -> MavHeader

    Construct a legacy MAVLink v1 header.

    MavHeader::new_v2

    fn MavHeader::new_v2(seq~ : Byte, sysid~ : Byte, compid~ : Byte, msgid~ : UInt, incompat_flags? : Byte, compat_flags? : Byte) -> MavHeader

    Construct a standard MAVLink v2 header.

    MavHeader::not_equal

    fn MavHeader::not_equal(x : MavHeader, y : MavHeader) -> Bool
    automatically derived

    MavHeader::to_repr

    automatically derived

    MavLandedState

    pub(all) enum MavLandedState {
    Undefined
    OnGround
    InAir
    Takeoff
    Landing
    } derive(Eq,
    Debug
    )

    Enumeration of landed detector states.

    MavLandedState::equal

    automatically derived

    MavLandedState::from_uint

    fn MavLandedState::from_uint(v : UInt) -> MavLandedState?

    Decode MavLandedState from its raw MAVLink numeric value.

    MavLandedState::not_equal

    fn MavLandedState::not_equal(x : MavLandedState, y : MavLandedState) -> Bool
    automatically derived

    MavLandedState::to_repr

    automatically derived

    MavLandedState::to_uint

    fn MavLandedState::to_uint(self : MavLandedState) -> UInt

    Convert MavLandedState to its raw MAVLink numeric value.

    MavMessage

    pub(all) enum MavMessage {
    MsgHeartbeat(Heartbeat)
    MsgSysStatus(SysStatus)
    MsgSystemTime(SystemTime)
    MsgPing(Ping)
    MsgSetMode(SetMode)
    MsgParamRequestRead(ParamRequestRead)
    MsgParamRequestList(ParamRequestList)
    MsgParamValue(ParamValue)
    MsgParamSet(ParamSet)
    MsgGpsRawInt(GpsRawInt)
    MsgScaledImu(ScaledImu)
    MsgRawImu(RawImu)
    MsgScaledPressure(ScaledPressure)
    MsgAttitude(Attitude)
    MsgAttitudeQuaternion(AttitudeQuaternion)
    MsgLocalPositionNed(LocalPositionNed)
    MsgGlobalPositionInt(GlobalPositionInt)
    MsgRcChannelsRaw(RcChannelsRaw)
    MsgServoOutputRaw(ServoOutputRaw)
    MsgMissionRequest(MissionRequest)
    MsgMissionSetCurrent(MissionSetCurrent)
    MsgMissionCurrent(MissionCurrent)
    MsgMissionRequestList(MissionRequestList)
    MsgMissionCount(MissionCount)
    MsgMissionClearAll(MissionClearAll)
    MsgMissionItemReached(MissionItemReached)
    MsgMissionAck(MissionAck)
    MsgMissionRequestInt(MissionRequestInt)
    MsgRcChannels(RcChannels)
    MsgManualControl(ManualControl)
    MsgMissionItemInt(MissionItemInt)
    MsgVfrHud(VfrHud)
    MsgCommandInt(CommandInt)
    MsgCommandLong(CommandLong)
    MsgCommandAck(CommandAck)
    MsgCommandCancel(CommandCancel)
    MsgSetAttitudeTarget(SetAttitudeTarget)
    MsgTimesync(Timesync)
    MsgDistanceSensor(DistanceSensor)
    MsgBatteryStatus(BatteryStatus)
    MsgAutopilotVersion(AutopilotVersion)
    MsgExtendedSysState(ExtendedSysState)
    MsgStatustext(Statustext)
    MsgMavDebug(MavDebug)
    MsgLoggingAck(LoggingAck)
    MsgMissionWritePartialList(MissionWritePartialList)
    MsgMissionItem(MissionItem)
    MsgAttitudeTarget(AttitudeTarget)
    MsgSetPositionTargetLocalNed(SetPositionTargetLocalNed)
    MsgPositionTargetLocalNed(PositionTargetLocalNed)
    MsgOpticalFlow(OpticalFlow)
    MsgHighresImu(HighresImu)
    MsgFileTransferProtocol(FileTransferProtocol)
    MsgHomePosition(HomePosition)
    MsgLoggingData(LoggingData)
    MsgParamExtRequestRead(ParamExtRequestRead)
    MsgParamExtRequestList(ParamExtRequestList)
    MsgParamExtValue(ParamExtValue)
    MsgParamExtSet(ParamExtSet)
    MsgParamExtAck(ParamExtAck)
    } derive(Eq,
    Debug
    )

    Unified top-level MAVLink dialect message sum type.

    MavMessage::base_payload_len

    fn MavMessage::base_payload_len(self : MavMessage) -> Int

    Return the base (non-extension) payload length in bytes of self.

    MavMessage::crc_extra

    fn MavMessage::crc_extra(self : MavMessage) -> Byte

    Return the CRC_EXTRA seed byte of self.

    MavMessage::decode_from_frame

    fn MavMessage::decode_from_frame(frame : MavFrame) -> Result[MavMessage, MavError]

    Decode a MavMessage from a verified MavFrame.

    MavMessage::encode_payload

    fn MavMessage::encode_payload(self : MavMessage, v2? : Bool) -> Bytes

    Encode self into a wire payload.

    MavMessage::encode_to_frame

    fn MavMessage::encode_to_frame(self : MavMessage, seq~ : Byte, sysid~ : Byte, compid~ : Byte, version? : ProtocolVersion, signing? : SigningContext?) -> Result[(Bytes, MavFrame), MavError]

    Encode self into a complete MAVLink v1 or v2 wire frame.

    MavMessage::equal

    fn MavMessage::equal(MavMessage, MavMessage) -> Bool
    automatically derived

    MavMessage::max_payload_len

    fn MavMessage::max_payload_len(self : MavMessage) -> Int

    Return the maximum (v2 with extensions) payload length in bytes of self.

    MavMessage::msg_id

    fn MavMessage::msg_id(self : MavMessage) -> UInt

    Return the numeric MAVLink message ID of self.

    MavMessage::msg_name

    fn MavMessage::msg_name(self : MavMessage) -> String

    Return the official MAVLink message name of self.

    MavMessage::not_equal

    fn MavMessage::not_equal(x : MavMessage, y : MavMessage) -> Bool
    automatically derived

    MavMessage::to_repr

    automatically derived

    MavMissionResult

    pub(all) enum MavMissionResult {
    MavMissionAccepted
    MavMissionError
    MavMissionUnsupportedFrame
    MavMissionUnsupported
    MavMissionNoSpace
    MavMissionInvalid
    MavMissionInvalidSequence
    MavMissionDenied
    MavMissionOperationCancelled
    } derive(Eq,
    Debug
    )

    Result of a MAVLink mission operation (MAV_MISSION_ACK).

    MavMissionResult::equal

    automatically derived

    MavMissionResult::from_uint

    fn MavMissionResult::from_uint(v : UInt) -> MavMissionResult?

    Decode MavMissionResult from its raw MAVLink numeric value.

    MavMissionResult::not_equal

    fn MavMissionResult::not_equal(x : MavMissionResult, y : MavMissionResult) -> Bool
    automatically derived

    MavMissionResult::to_repr

    automatically derived

    MavMissionResult::to_uint

    fn MavMissionResult::to_uint(self : MavMissionResult) -> UInt

    Convert MavMissionResult to its raw MAVLink numeric value.

    MavMissionType

    pub(all) enum MavMissionType {
    Mission
    Fence
    Rally
    All
    } derive(Eq,
    Debug
    )

    Type of mission items being requested, uploaded, or cleared.

    MavMissionType::equal

    automatically derived

    MavMissionType::from_uint

    fn MavMissionType::from_uint(v : UInt) -> MavMissionType?

    Decode MavMissionType from its raw MAVLink numeric value.

    MavMissionType::not_equal

    fn MavMissionType::not_equal(x : MavMissionType, y : MavMissionType) -> Bool
    automatically derived

    MavMissionType::to_repr

    automatically derived

    MavMissionType::to_uint

    fn MavMissionType::to_uint(self : MavMissionType) -> UInt

    Convert MavMissionType to its raw MAVLink numeric value.

    MavModeFlag

    pub(all) enum MavModeFlag {
    CustomModeEnabled
    TestEnabled
    AutoEnabled
    GuidedEnabled
    StabilizeEnabled
    HilEnabled
    ManualInputEnabled
    SafetyArmed
    } derive(Eq,
    Debug
    )

    These flags encode the MAV mode.

    MavModeFlag::equal

    fn MavModeFlag::equal(MavModeFlag, MavModeFlag) -> Bool
    automatically derived

    MavModeFlag::from_uint

    fn MavModeFlag::from_uint(v : UInt) -> MavModeFlag?

    Decode MavModeFlag from its raw MAVLink numeric value.

    MavModeFlag::not_equal

    fn MavModeFlag::not_equal(x : MavModeFlag, y : MavModeFlag) -> Bool
    automatically derived

    MavModeFlag::to_repr

    automatically derived

    MavModeFlag::to_uint

    fn MavModeFlag::to_uint(self : MavModeFlag) -> UInt

    Convert MavModeFlag to its raw MAVLink numeric value.

    MavParamExtType

    pub(all) enum MavParamExtType {
    Uint8
    Int8
    Uint16
    Int16
    Uint32
    Int32
    Uint64
    Int64
    Real32
    Real64
    Custom
    } derive(Eq,
    Debug
    )

    Specifies the datatype of a MAVLink extended parameter.

    MavParamExtType::equal

    automatically derived

    MavParamExtType::from_uint

    fn MavParamExtType::from_uint(v : UInt) -> MavParamExtType?

    Decode MavParamExtType from its raw MAVLink numeric value.

    MavParamExtType::not_equal

    fn MavParamExtType::not_equal(x : MavParamExtType, y : MavParamExtType) -> Bool
    automatically derived

    MavParamExtType::to_repr

    automatically derived

    MavParamExtType::to_uint

    fn MavParamExtType::to_uint(self : MavParamExtType) -> UInt

    Convert MavParamExtType to its raw MAVLink numeric value.

    MavParamType

    pub(all) enum MavParamType {
    Uint8
    Int8
    Uint16
    Int16
    Uint32
    Int32
    Uint64
    Int64
    Real32
    Real64
    } derive(Eq,
    Debug
    )

    Specifies the datatype of a MAVLink parameter.

    MavParamType::equal

    automatically derived

    MavParamType::from_uint

    fn MavParamType::from_uint(v : UInt) -> MavParamType?

    Decode MavParamType from its raw MAVLink numeric value.

    MavParamType::not_equal

    fn MavParamType::not_equal(x : MavParamType, y : MavParamType) -> Bool
    automatically derived

    MavParamType::to_repr

    automatically derived

    MavParamType::to_uint

    fn MavParamType::to_uint(self : MavParamType) -> UInt

    Convert MavParamType to its raw MAVLink numeric value.

    MavPrimitiveType

    pub(all) enum MavPrimitiveType {
    UInt8
    Int8
    UInt16
    Int16
    UInt32
    Int32
    UInt64
    Int64
    Float32
    Float64
    Char
    } derive(Eq,
    Debug
    )

    Primitive element types defined in the official MAVLink XML schema.

    MavPrimitiveType::byte_size

    fn MavPrimitiveType::byte_size(self : MavPrimitiveType) -> Int

    Return the wire size in bytes of a MavPrimitiveType.

    MavPrimitiveType::equal

    automatically derived

    MavPrimitiveType::not_equal

    fn MavPrimitiveType::not_equal(x : MavPrimitiveType, y : MavPrimitiveType) -> Bool
    automatically derived

    MavPrimitiveType::to_repr

    automatically derived

    MavResult

    pub(all) enum MavResult {
    Accepted
    TemporarilyRejected
    Denied
    Unsupported
    Failed
    InProgress
    Cancelled
    } derive(Eq,
    Debug
    )

    Result from a MAVLink command (MAV_CMD).

    MavResult::equal

    fn MavResult::equal(MavResult, MavResult) -> Bool
    automatically derived

    MavResult::from_uint

    fn MavResult::from_uint(v : UInt) -> MavResult?

    Decode MavResult from its raw MAVLink numeric value.

    MavResult::not_equal

    fn MavResult::not_equal(x : MavResult, y : MavResult) -> Bool
    automatically derived

    MavResult::to_repr

    automatically derived

    MavResult::to_uint

    fn MavResult::to_uint(self : MavResult) -> UInt

    Convert MavResult to its raw MAVLink numeric value.

    MavRouter

    pub(all) struct MavRouter {
    ports : Array[Int]
    routes : Array[RouteEntry]
    unicast_forwarded : Int
    broadcast_flooded : Int
    } derive(Eq,
    Debug
    )

    Multi-link MAVLink v2 packet router (modeled after mavlink-router / MAVProxy) with automatic source-address learning, unicast target resolution, and split-horizon loop prevention.

    MavRouter::equal

    fn MavRouter::equal(MavRouter, MavRouter) -> Bool
    automatically derived

    MavRouter::learn_source

    fn MavRouter::learn_source(self : MavRouter, sysid : Byte, compid : Byte, port_id : Int) -> Unit

    Learn or update the ingress port_id for (sysid, compid).

    MavRouter::new

    fn MavRouter::new(port_ids : Array[Int]) -> MavRouter

    Create a new MavRouter configured with a list of link port IDs (e.g. [0, 1, 2] for UART0, UART1, UDP0).

    MavRouter::not_equal

    fn MavRouter::not_equal(x : MavRouter, y : MavRouter) -> Bool
    automatically derived

    MavRouter::route_frame

    fn MavRouter::route_frame(self : MavRouter, ingress_port : Int, frame : MavFrame) -> Array[Int]

    Compute the list of egress link port IDs to which an incoming MavFrame arriving on ingress_port should be forwarded.

    Rules:
    1. Records (frame.header.sysid, frame.header.compid) -> ingress_port in the routing table.
    2. If the message is broadcast (target_system == 0 or untargeted telemetry), returns all ports except ingress_port.
    3. If the message targets a learned (target_system, target_component) (or target_component == 0), forwards only to the matching egress port(s) (excluding ingress_port).
    4. If the target address has not yet been learned, falls back to flooding all non-ingress ports.

    MavRouter::to_repr

    automatically derived

    MavSensorOrientation

    pub(all) enum MavSensorOrientation {
    MavSensorRotationNone
    MavSensorRotationYaw45
    MavSensorRotationYaw90
    MavSensorRotationYaw180
    MavSensorRotationYaw270
    MavSensorRotationPitch270
    } derive(Eq,
    Debug
    )

    Enumeration of sensor orientation, according to its rotations.

    MavSensorOrientation::equal

    automatically derived

    MavSensorOrientation::from_uint

    fn MavSensorOrientation::from_uint(v : UInt) -> MavSensorOrientation?

    Decode MavSensorOrientation from its raw MAVLink numeric value.

    MavSensorOrientation::not_equal

    automatically derived

    MavSensorOrientation::to_repr

    automatically derived

    MavSensorOrientation::to_uint

    fn MavSensorOrientation::to_uint(self : MavSensorOrientation) -> UInt

    Convert MavSensorOrientation to its raw MAVLink numeric value.

    MavSeverity

    pub(all) enum MavSeverity {
    Emergency
    Alert
    Critical
    Error
    Warning
    Notice
    Info
    Debug
    } derive(Eq,
    Debug
    )

    Indicates the severity level, generally used for status messages.

    MavSeverity::equal

    fn MavSeverity::equal(MavSeverity, MavSeverity) -> Bool
    automatically derived

    MavSeverity::from_uint

    fn MavSeverity::from_uint(v : UInt) -> MavSeverity?

    Decode MavSeverity from its raw MAVLink numeric value.

    MavSeverity::not_equal

    fn MavSeverity::not_equal(x : MavSeverity, y : MavSeverity) -> Bool
    automatically derived

    MavSeverity::to_repr

    automatically derived

    MavSeverity::to_uint

    fn MavSeverity::to_uint(self : MavSeverity) -> UInt

    Convert MavSeverity to its raw MAVLink numeric value.

    MavSignature

    pub(all) struct MavSignature {
    link_id : Byte
    timestamp : UInt64
    signature : FixedArray[Byte]
    } derive(Eq,
    Debug
    )

    13-byte MAVLink v2 packet authentication trailer.
    • link_id: 8-bit communication channel identifier
    • timestamp: 48-bit timestamp in 10-microsecond units since Jan 1, 2015 GMT
    • signature: 6-byte (48-bit) truncated SHA-256 digest

    MavSignature::equal

    automatically derived

    MavSignature::not_equal

    fn MavSignature::not_equal(x : MavSignature, y : MavSignature) -> Bool
    automatically derived

    MavSignature::to_repr

    automatically derived

    MavState

    pub(all) enum MavState {
    Uninit
    Boot
    Calibrating
    Standby
    Active
    Critical
    Emergency
    Poweroff
    FlightTermination
    } derive(Eq,
    Debug
    )

    Indicates the current state of the vehicle.

    MavState::equal

    fn MavState::equal(MavState, MavState) -> Bool
    automatically derived

    MavState::from_uint

    fn MavState::from_uint(v : UInt) -> MavState?

    Decode MavState from its raw MAVLink numeric value.

    MavState::not_equal

    fn MavState::not_equal(x : MavState, y : MavState) -> Bool
    automatically derived

    MavState::to_repr

    automatically derived

    MavState::to_uint

    fn MavState::to_uint(self : MavState) -> UInt

    Convert MavState to its raw MAVLink numeric value.

    MavType

    pub(all) enum MavType {
    Generic
    FixedWing
    Quadrotor
    Gcs
    GroundRover
    Submarine
    Hexarotor
    Octorotor
    VtolTailsitter
    } derive(Eq,
    Debug
    )

    MAVLINK component type reported in HEARTBEAT message.

    MavType::equal

    fn MavType::equal(MavType, MavType) -> Bool
    automatically derived

    MavType::from_uint

    fn MavType::from_uint(v : UInt) -> MavType?

    Decode MavType from its raw MAVLink numeric value.

    MavType::not_equal

    fn MavType::not_equal(x : MavType, y : MavType) -> Bool
    automatically derived

    MavType::to_repr

    automatically derived

    MavType::to_uint

    fn MavType::to_uint(self : MavType) -> UInt

    Convert MavType to its raw MAVLink numeric value.

    MavVtolState

    pub(all) enum MavVtolState {
    Undefined
    TransitionToFw
    TransitionToMc
    Mc
    Fw
    } derive(Eq,
    Debug
    )

    Enumeration of VTOL states.

    MavVtolState::equal

    automatically derived

    MavVtolState::from_uint

    fn MavVtolState::from_uint(v : UInt) -> MavVtolState?

    Decode MavVtolState from its raw MAVLink numeric value.

    MavVtolState::not_equal

    fn MavVtolState::not_equal(x : MavVtolState, y : MavVtolState) -> Bool
    automatically derived

    MavVtolState::to_repr

    automatically derived

    MavVtolState::to_uint

    fn MavVtolState::to_uint(self : MavVtolState) -> UInt

    Convert MavVtolState to its raw MAVLink numeric value.

    MessageRateStat

    pub(all) struct MessageRateStat {
    msgid : UInt
    frame_count : Int
    payload_bytes : Int
    wire_bytes : Int
    } derive(Eq,
    Debug
    )

    Per-message-ID reception counter and byte volume tracked by TelemetryRateTracker.

    MessageRateStat::equal

    automatically derived

    MessageRateStat::not_equal

    fn MessageRateStat::not_equal(x : MessageRateStat, y : MessageRateStat) -> Bool
    automatically derived

    MessageRateStat::to_repr

    automatically derived

    MissionAck

    pub(all) struct MissionAck {
    target_system : Byte
    target_component : Byte
    mav_type : Byte
    mission_type : Byte
    opaque_id : UInt
    } derive(Eq,
    Debug
    )

    Acknowledgment message during waypoint handling.
    • MAVLink Message MISSION_ACK (ID: 47, CRC_EXTRA: 153, base_len: 3B, max_len: 8B)

    MissionAck::base_payload_len

    fn MissionAck::base_payload_len() -> Int

    MissionAck::crc_extra

    fn MissionAck::crc_extra() -> Byte

    MissionAck::decode_payload

    fn MissionAck::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[MissionAck, MavError]

    Deserialize MissionAck from wire-ordered little-endian payload bytes.

    MissionAck::encode_payload

    fn MissionAck::encode_payload(self : MissionAck, v2? : Bool) -> Bytes

    Serialize MissionAck into wire-ordered little-endian payload bytes.

    MissionAck::equal

    fn MissionAck::equal(MissionAck, MissionAck) -> Bool
    automatically derived

    MissionAck::max_payload_len

    fn MissionAck::max_payload_len() -> Int

    MissionAck::msg_id

    fn MissionAck::msg_id() -> UInt

    MissionAck::not_equal

    fn MissionAck::not_equal(x : MissionAck, y : MissionAck) -> Bool
    automatically derived

    MissionAck::to_repr

    automatically derived

    MissionClearAll

    pub(all) struct MissionClearAll {
    target_system : Byte
    target_component : Byte
    mission_type : Byte
    } derive(Eq,
    Debug
    )

    Delete all mission items at once.
    • MAVLink Message MISSION_CLEAR_ALL (ID: 45, CRC_EXTRA: 232, base_len: 2B, max_len: 3B)

    MissionClearAll::base_payload_len

    fn MissionClearAll::base_payload_len() -> Int

    MissionClearAll::crc_extra

    fn MissionClearAll::crc_extra() -> Byte

    MissionClearAll::decode_payload

    fn MissionClearAll::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[MissionClearAll, MavError]

    Deserialize MissionClearAll from wire-ordered little-endian payload bytes.

    MissionClearAll::encode_payload

    fn MissionClearAll::encode_payload(self : MissionClearAll, v2? : Bool) -> Bytes

    Serialize MissionClearAll into wire-ordered little-endian payload bytes.

    MissionClearAll::equal

    automatically derived

    MissionClearAll::max_payload_len

    fn MissionClearAll::max_payload_len() -> Int

    MissionClearAll::msg_id

    fn MissionClearAll::msg_id() -> UInt

    MissionClearAll::not_equal

    fn MissionClearAll::not_equal(x : MissionClearAll, y : MissionClearAll) -> Bool
    automatically derived

    MissionClearAll::to_repr

    automatically derived

    MissionCount

    pub(all) struct MissionCount {
    target_system : Byte
    target_component : Byte
    count : UInt
    mission_type : Byte
    opaque_id : UInt
    } derive(Eq,
    Debug
    )

    This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction.
    • MAVLink Message MISSION_COUNT (ID: 44, CRC_EXTRA: 221, base_len: 4B, max_len: 9B)

    MissionCount::base_payload_len

    fn MissionCount::base_payload_len() -> Int

    MissionCount::crc_extra

    fn MissionCount::crc_extra() -> Byte

    MissionCount::decode_payload

    fn MissionCount::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[MissionCount, MavError]

    Deserialize MissionCount from wire-ordered little-endian payload bytes.

    MissionCount::encode_payload

    fn MissionCount::encode_payload(self : MissionCount, v2? : Bool) -> Bytes

    Serialize MissionCount into wire-ordered little-endian payload bytes.

    MissionCount::equal

    automatically derived

    MissionCount::max_payload_len

    fn MissionCount::max_payload_len() -> Int

    MissionCount::msg_id

    fn MissionCount::msg_id() -> UInt

    MissionCount::not_equal

    fn MissionCount::not_equal(x : MissionCount, y : MissionCount) -> Bool
    automatically derived

    MissionCount::to_repr

    automatically derived

    MissionCurrent

    pub(all) struct MissionCurrent {
    seq : UInt
    total : UInt
    mission_state : Byte
    mission_mode : Byte
    } derive(Eq,
    Debug
    )

    Message that announces the sequence number of the current active mission item.
    • MAVLink Message MISSION_CURRENT (ID: 42, CRC_EXTRA: 28, base_len: 2B, max_len: 6B)

    MissionCurrent::base_payload_len

    fn MissionCurrent::base_payload_len() -> Int

    MissionCurrent::crc_extra

    fn MissionCurrent::crc_extra() -> Byte

    MissionCurrent::decode_payload

    fn MissionCurrent::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[MissionCurrent, MavError]

    Deserialize MissionCurrent from wire-ordered little-endian payload bytes.

    MissionCurrent::encode_payload

    fn MissionCurrent::encode_payload(self : MissionCurrent, v2? : Bool) -> Bytes

    Serialize MissionCurrent into wire-ordered little-endian payload bytes.

    MissionCurrent::equal

    automatically derived

    MissionCurrent::max_payload_len

    fn MissionCurrent::max_payload_len() -> Int

    MissionCurrent::msg_id

    fn MissionCurrent::msg_id() -> UInt

    MissionCurrent::not_equal

    fn MissionCurrent::not_equal(x : MissionCurrent, y : MissionCurrent) -> Bool
    automatically derived

    MissionCurrent::to_repr

    automatically derived

    MissionDownloadClient

    pub(all) struct MissionDownloadClient {
    target_system : Byte
    target_component : Byte
    mission_type : Byte
    timeout_ms : UInt64
    max_retries : Int
    state : MissionTxState
    expected_count : UInt
    last_action_ms : UInt64
    retries : Int
    downloaded_items : Array[MissionItemInt]
    } derive(Eq,
    Debug
    )

    GCS-side MAVLink Mission Download state machine (MISSION_REQUEST_LIST -> MISSION_COUNT -> MISSION_REQUEST_INT -> MISSION_ITEM_INT -> MISSION_ACK).

    MissionDownloadClient::equal

    automatically derived

    MissionDownloadClient::new

    fn MissionDownloadClient::new(target_system : Byte, target_component : Byte, mission_type? : Byte, timeout_ms? : UInt64, max_retries? : Int) -> MissionDownloadClient

    Create a new MissionDownloadClient.

    MissionDownloadClient::not_equal

    automatically derived

    MissionDownloadClient::on_message

    fn MissionDownloadClient::on_message(self : MissionDownloadClient, msg : MavMessage, now_ms : UInt64) -> MavMessage?

    Process an incoming MISSION_COUNT (#44) or MISSION_ITEM_INT (#73) during mission download.

    MissionDownloadClient::start_download

    fn MissionDownloadClient::start_download(self : MissionDownloadClient, now_ms : UInt64) -> MavMessage

    Initiate a mission download transaction (MISSION_REQUEST_LIST #43).

    MissionDownloadClient::to_repr

    automatically derived

    MissionItem

    pub(all) struct MissionItem {
    target_system : Byte
    target_component : Byte
    seq : UInt
    frame : Byte
    command : UInt
    current : Byte
    autocontinue : Byte
    param1 : Float
    param2 : Float
    param3 : Float
    param4 : Float
    x : Float
    y : Float
    z : Float
    mission_type : Byte
    } derive(Eq,
    Debug
    )

    Message encoding a mission item (legacy floating-point coordinates).
    • MAVLink Message MISSION_ITEM (ID: 39, CRC_EXTRA: 254, base_len: 37B, max_len: 38B)

    MissionItem::base_payload_len

    fn MissionItem::base_payload_len() -> Int

    MissionItem::crc_extra

    fn MissionItem::crc_extra() -> Byte

    MissionItem::decode_payload

    fn MissionItem::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[MissionItem, MavError]

    Deserialize MissionItem from wire-ordered little-endian payload bytes.

    MissionItem::encode_payload

    fn MissionItem::encode_payload(self : MissionItem, v2? : Bool) -> Bytes

    Serialize MissionItem into wire-ordered little-endian payload bytes.

    MissionItem::equal

    fn MissionItem::equal(MissionItem, MissionItem) -> Bool
    automatically derived

    MissionItem::max_payload_len

    fn MissionItem::max_payload_len() -> Int

    MissionItem::msg_id

    fn MissionItem::msg_id() -> UInt

    MissionItem::not_equal

    fn MissionItem::not_equal(x : MissionItem, y : MissionItem) -> Bool
    automatically derived

    MissionItem::to_repr

    automatically derived

    MissionItemInt

    pub(all) struct MissionItemInt {
    target_system : Byte
    target_component : Byte
    seq : UInt
    frame : Byte
    command : UInt
    current : Byte
    autocontinue : Byte
    param1 : Float
    param2 : Float
    param3 : Float
    param4 : Float
    x : Int
    y : Int
    z : Float
    mission_type : Byte
    } derive(Eq,
    Debug
    )

    Message encoding a mission item using integer latitude/longitude in degE7.
    • MAVLink Message MISSION_ITEM_INT (ID: 73, CRC_EXTRA: 38, base_len: 37B, max_len: 38B)

    MissionItemInt::base_payload_len

    fn MissionItemInt::base_payload_len() -> Int

    MissionItemInt::crc_extra

    fn MissionItemInt::crc_extra() -> Byte

    MissionItemInt::decode_payload

    fn MissionItemInt::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[MissionItemInt, MavError]

    Deserialize MissionItemInt from wire-ordered little-endian payload bytes.

    MissionItemInt::encode_payload

    fn MissionItemInt::encode_payload(self : MissionItemInt, v2? : Bool) -> Bytes

    Serialize MissionItemInt into wire-ordered little-endian payload bytes.

    MissionItemInt::equal

    automatically derived

    MissionItemInt::max_payload_len

    fn MissionItemInt::max_payload_len() -> Int

    MissionItemInt::msg_id

    fn MissionItemInt::msg_id() -> UInt

    MissionItemInt::not_equal

    fn MissionItemInt::not_equal(x : MissionItemInt, y : MissionItemInt) -> Bool
    automatically derived

    MissionItemInt::to_repr

    automatically derived

    MissionItemReached

    pub(all) struct MissionItemReached {
    seq : UInt
    } derive(Eq,
    Debug
    )

    A certain mission item has been reached.
    • MAVLink Message MISSION_ITEM_REACHED (ID: 46, CRC_EXTRA: 11, base_len: 2B, max_len: 2B)

    MissionItemReached::base_payload_len

    fn MissionItemReached::base_payload_len() -> Int

    MissionItemReached::crc_extra

    fn MissionItemReached::crc_extra() -> Byte

    MissionItemReached::decode_payload

    fn MissionItemReached::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[MissionItemReached, MavError]

    Deserialize MissionItemReached from wire-ordered little-endian payload bytes.

    MissionItemReached::encode_payload

    fn MissionItemReached::encode_payload(self : MissionItemReached, v2? : Bool) -> Bytes

    Serialize MissionItemReached into wire-ordered little-endian payload bytes.

    MissionItemReached::equal

    automatically derived

    MissionItemReached::max_payload_len

    fn MissionItemReached::max_payload_len() -> Int

    MissionItemReached::msg_id

    fn MissionItemReached::msg_id() -> UInt

    MissionItemReached::not_equal

    automatically derived

    MissionItemReached::to_repr

    automatically derived

    MissionRequest

    pub(all) struct MissionRequest {
    target_system : Byte
    target_component : Byte
    seq : UInt
    mission_type : Byte
    } derive(Eq,
    Debug
    )

    Request the information of the mission item with the sequence number seq.
    • MAVLink Message MISSION_REQUEST (ID: 40, CRC_EXTRA: 230, base_len: 4B, max_len: 5B)

    MissionRequest::base_payload_len

    fn MissionRequest::base_payload_len() -> Int

    MissionRequest::crc_extra

    fn MissionRequest::crc_extra() -> Byte

    MissionRequest::decode_payload

    fn MissionRequest::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[MissionRequest, MavError]

    Deserialize MissionRequest from wire-ordered little-endian payload bytes.

    MissionRequest::encode_payload

    fn MissionRequest::encode_payload(self : MissionRequest, v2? : Bool) -> Bytes

    Serialize MissionRequest into wire-ordered little-endian payload bytes.

    MissionRequest::equal

    automatically derived

    MissionRequest::max_payload_len

    fn MissionRequest::max_payload_len() -> Int

    MissionRequest::msg_id

    fn MissionRequest::msg_id() -> UInt

    MissionRequest::not_equal

    fn MissionRequest::not_equal(x : MissionRequest, y : MissionRequest) -> Bool
    automatically derived

    MissionRequest::to_repr

    automatically derived

    MissionRequestInt

    pub(all) struct MissionRequestInt {
    target_system : Byte
    target_component : Byte
    seq : UInt
    mission_type : Byte
    } derive(Eq,
    Debug
    )

    Request the information of the mission item with the sequence number seq.
    • MAVLink Message MISSION_REQUEST_INT (ID: 51, CRC_EXTRA: 196, base_len: 4B, max_len: 5B)

    MissionRequestInt::base_payload_len

    fn MissionRequestInt::base_payload_len() -> Int

    MissionRequestInt::crc_extra

    fn MissionRequestInt::crc_extra() -> Byte

    MissionRequestInt::decode_payload

    fn MissionRequestInt::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[MissionRequestInt, MavError]

    Deserialize MissionRequestInt from wire-ordered little-endian payload bytes.

    MissionRequestInt::encode_payload

    fn MissionRequestInt::encode_payload(self : MissionRequestInt, v2? : Bool) -> Bytes

    Serialize MissionRequestInt into wire-ordered little-endian payload bytes.

    MissionRequestInt::equal

    automatically derived

    MissionRequestInt::max_payload_len

    fn MissionRequestInt::max_payload_len() -> Int

    MissionRequestInt::msg_id

    fn MissionRequestInt::msg_id() -> UInt

    MissionRequestInt::not_equal

    fn MissionRequestInt::not_equal(x : MissionRequestInt, y : MissionRequestInt) -> Bool
    automatically derived

    MissionRequestInt::to_repr

    automatically derived

    MissionRequestList

    pub(all) struct MissionRequestList {
    target_system : Byte
    target_component : Byte
    mission_type : Byte
    } derive(Eq,
    Debug
    )

    Request the overall list of mission items from the system/component.
    • MAVLink Message MISSION_REQUEST_LIST (ID: 43, CRC_EXTRA: 132, base_len: 2B, max_len: 3B)

    MissionRequestList::base_payload_len

    fn MissionRequestList::base_payload_len() -> Int

    MissionRequestList::crc_extra

    fn MissionRequestList::crc_extra() -> Byte

    MissionRequestList::decode_payload

    fn MissionRequestList::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[MissionRequestList, MavError]

    Deserialize MissionRequestList from wire-ordered little-endian payload bytes.

    MissionRequestList::encode_payload

    fn MissionRequestList::encode_payload(self : MissionRequestList, v2? : Bool) -> Bytes

    Serialize MissionRequestList into wire-ordered little-endian payload bytes.

    MissionRequestList::equal

    automatically derived

    MissionRequestList::max_payload_len

    fn MissionRequestList::max_payload_len() -> Int

    MissionRequestList::msg_id

    fn MissionRequestList::msg_id() -> UInt

    MissionRequestList::not_equal

    automatically derived

    MissionRequestList::to_repr

    automatically derived

    MissionServer

    pub(all) struct MissionServer {
    sysid : Byte
    compid : Byte
    active_seq : UInt
    upload_expected : UInt
    uploading : Bool
    staging_items : Array[MissionItemInt]
    stored_items : Array[MissionItemInt]
    } derive(Eq,
    Debug
    )

    Vehicle-side MAVLink Mission Protocol server supporting upload, download, clear, and current waypoint selection.

    MissionServer::equal

    automatically derived

    MissionServer::handle_message

    fn MissionServer::handle_message(self : MissionServer, sender_sysid : Byte, sender_compid : Byte, msg : MavMessage) -> MavMessage?

    Handle an incoming MAVLink Mission Protocol message on the vehicle side.

    MissionServer::new

    fn MissionServer::new(sysid : Byte, compid : Byte) -> MissionServer

    Create a new vehicle-side MissionServer.

    MissionServer::not_equal

    fn MissionServer::not_equal(x : MissionServer, y : MissionServer) -> Bool
    automatically derived

    MissionServer::to_repr

    automatically derived

    MissionSetCurrent

    pub(all) struct MissionSetCurrent {
    target_system : Byte
    target_component : Byte
    seq : UInt
    } derive(Eq,
    Debug
    )

    Set the mission item with sequence number seq as current item.
    • MAVLink Message MISSION_SET_CURRENT (ID: 41, CRC_EXTRA: 28, base_len: 4B, max_len: 4B)

    MissionSetCurrent::base_payload_len

    fn MissionSetCurrent::base_payload_len() -> Int

    MissionSetCurrent::crc_extra

    fn MissionSetCurrent::crc_extra() -> Byte

    MissionSetCurrent::decode_payload

    fn MissionSetCurrent::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[MissionSetCurrent, MavError]

    Deserialize MissionSetCurrent from wire-ordered little-endian payload bytes.

    MissionSetCurrent::encode_payload

    fn MissionSetCurrent::encode_payload(self : MissionSetCurrent, v2? : Bool) -> Bytes

    Serialize MissionSetCurrent into wire-ordered little-endian payload bytes.

    MissionSetCurrent::equal

    automatically derived

    MissionSetCurrent::max_payload_len

    fn MissionSetCurrent::max_payload_len() -> Int

    MissionSetCurrent::msg_id

    fn MissionSetCurrent::msg_id() -> UInt

    MissionSetCurrent::not_equal

    fn MissionSetCurrent::not_equal(x : MissionSetCurrent, y : MissionSetCurrent) -> Bool
    automatically derived

    MissionSetCurrent::to_repr

    automatically derived

    MissionTxState

    pub(all) enum MissionTxState {
    Idle
    AwaitingRequest
    AwaitingCount
    AwaitingItem(UInt)
    Completed
    Failed(MavMissionResult)
    } derive(Eq,
    Debug
    )

    State of a MAVLink Mission Upload or Download transaction.

    MissionTxState::equal

    automatically derived

    MissionTxState::not_equal

    fn MissionTxState::not_equal(x : MissionTxState, y : MissionTxState) -> Bool
    automatically derived

    MissionTxState::to_repr

    automatically derived

    MissionUploadClient

    pub(all) struct MissionUploadClient {
    target_system : Byte
    target_component : Byte
    mission_type : Byte
    timeout_ms : UInt64
    max_retries : Int
    state : MissionTxState
    last_action_ms : UInt64
    retries : Int
    last_requested_seq : Int
    items : Array[MissionItemInt]
    } derive(Eq,
    Debug
    )

    GCS-side MAVLink Mission Upload state machine (MISSION_COUNT -> MISSION_REQUEST_INT -> MISSION_ITEM_INT -> MISSION_ACK).

    MissionUploadClient::equal

    automatically derived

    MissionUploadClient::new

    fn MissionUploadClient::new(target_system : Byte, target_component : Byte, mission_type? : Byte, timeout_ms? : UInt64, max_retries? : Int) -> MissionUploadClient

    Create a new MissionUploadClient.

    MissionUploadClient::not_equal

    automatically derived

    MissionUploadClient::on_message

    fn MissionUploadClient::on_message(self : MissionUploadClient, msg : MavMessage, now_ms : UInt64) -> MavMessage?

    Process an incoming MISSION_REQUEST_INT (#51), MISSION_REQUEST (#40), or MISSION_ACK (#47).

    MissionUploadClient::poll_timeout

    fn MissionUploadClient::poll_timeout(self : MissionUploadClient, now_ms : UInt64) -> MavMessage?

    Poll for upload timeout retransmission.

    MissionUploadClient::start_upload

    fn MissionUploadClient::start_upload(self : MissionUploadClient, waypoints : Array[MissionItemInt], now_ms : UInt64) -> MavMessage

    Start a mission upload transaction by emitting MISSION_COUNT (#44).

    MissionUploadClient::to_repr

    automatically derived

    MissionWritePartialList

    pub(all) struct MissionWritePartialList {
    target_system : Byte
    target_component : Byte
    start_index : Int
    end_index : Int
    mission_type : Byte
    } derive(Eq,
    Debug
    )

    This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated.
    • MAVLink Message MISSION_WRITE_PARTIAL_LIST (ID: 38, CRC_EXTRA: 9, base_len: 6B, max_len: 7B)

    MissionWritePartialList::base_payload_len

    fn MissionWritePartialList::base_payload_len() -> Int

    MissionWritePartialList::crc_extra

    fn MissionWritePartialList::crc_extra() -> Byte

    MissionWritePartialList::decode_payload

    fn MissionWritePartialList::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[MissionWritePartialList, MavError]

    Deserialize MissionWritePartialList from wire-ordered little-endian payload bytes.

    MissionWritePartialList::encode_payload

    fn MissionWritePartialList::encode_payload(self : MissionWritePartialList, v2? : Bool) -> Bytes

    Serialize MissionWritePartialList into wire-ordered little-endian payload bytes.

    MissionWritePartialList::equal

    automatically derived

    MissionWritePartialList::max_payload_len

    fn MissionWritePartialList::max_payload_len() -> Int

    MissionWritePartialList::msg_id

    fn MissionWritePartialList::msg_id() -> UInt

    MissionWritePartialList::not_equal

    automatically derived

    MissionWritePartialList::to_repr

    automatically derived

    NodeLinkStatus

    pub(all) struct NodeLinkStatus {
    sysid : Byte
    compid : Byte
    mav_type : Byte
    autopilot : Byte
    base_mode : Byte
    custom_mode : UInt
    system_status : Byte
    armed : Bool
    last_seen_ms : UInt64
    heartbeat_count : Int
    received_frames : Int
    dropped_frames : Int
    last_seq : Int
    } derive(Eq,
    Debug
    )

    Per-node link health and telemetry status tracked by HeartbeatMonitor.

    NodeLinkStatus::equal

    automatically derived

    NodeLinkStatus::not_equal

    fn NodeLinkStatus::not_equal(x : NodeLinkStatus, y : NodeLinkStatus) -> Bool
    automatically derived

    NodeLinkStatus::to_repr

    automatically derived

    NoisyStreamStressReport

    pub(all) struct NoisyStreamStressReport {
    transmitted_frames : Int
    recovered_frames : Int
    total_stream_bytes : Int
    injected_noise_bytes : Int
    detected_dropped_packets : Int
    } derive(Eq,
    Debug
    )

    Stress benchmark report for FrameParser under UART noise injection and chunk fragmentation.

    NoisyStreamStressReport::equal

    automatically derived

    NoisyStreamStressReport::not_equal

    automatically derived

    NoisyStreamStressReport::to_repr

    automatically derived

    OpticalFlow

    pub(all) struct OpticalFlow {
    time_usec : UInt64
    sensor_id : Byte
    flow_x : Int
    flow_y : Int
    flow_comp_m_x : Float
    flow_comp_m_y : Float
    quality : Byte
    ground_distance : Float
    flow_rate_x : Float
    flow_rate_y : Float
    } derive(Eq,
    Debug
    )

    Optical flow from a flow sensor (e.g. optical mouse sensor).
    • MAVLink Message OPTICAL_FLOW (ID: 100, CRC_EXTRA: 175, base_len: 26B, max_len: 34B)

    OpticalFlow::base_payload_len

    fn OpticalFlow::base_payload_len() -> Int

    OpticalFlow::crc_extra

    fn OpticalFlow::crc_extra() -> Byte

    OpticalFlow::decode_payload

    fn OpticalFlow::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[OpticalFlow, MavError]

    Deserialize OpticalFlow from wire-ordered little-endian payload bytes.

    OpticalFlow::encode_payload

    fn OpticalFlow::encode_payload(self : OpticalFlow, v2? : Bool) -> Bytes

    Serialize OpticalFlow into wire-ordered little-endian payload bytes.

    OpticalFlow::equal

    fn OpticalFlow::equal(OpticalFlow, OpticalFlow) -> Bool
    automatically derived

    OpticalFlow::max_payload_len

    fn OpticalFlow::max_payload_len() -> Int

    OpticalFlow::msg_id

    fn OpticalFlow::msg_id() -> UInt

    OpticalFlow::not_equal

    fn OpticalFlow::not_equal(x : OpticalFlow, y : OpticalFlow) -> Bool
    automatically derived

    OpticalFlow::to_repr

    automatically derived

    ParamAck

    pub(all) enum ParamAck {
    Accepted
    ValueUnsupported
    Failed
    InProgress
    } derive(Eq,
    Debug
    )

    Result from a MAVLink extended parameter transaction.

    ParamAck::equal

    fn ParamAck::equal(ParamAck, ParamAck) -> Bool
    automatically derived

    ParamAck::from_uint

    fn ParamAck::from_uint(v : UInt) -> ParamAck?

    Decode ParamAck from its raw MAVLink numeric value.

    ParamAck::not_equal

    fn ParamAck::not_equal(x : ParamAck, y : ParamAck) -> Bool
    automatically derived

    ParamAck::to_repr

    automatically derived

    ParamAck::to_uint

    fn ParamAck::to_uint(self : ParamAck) -> UInt

    Convert ParamAck to its raw MAVLink numeric value.

    ParamExtAck

    pub(all) struct ParamExtAck {
    param_id : String
    param_value : String
    param_type : Byte
    param_result : Byte
    } derive(Eq,
    Debug
    )

    Response from a PARAM_EXT_SET message.
    • MAVLink Message PARAM_EXT_ACK (ID: 324, CRC_EXTRA: 132, base_len: 146B, max_len: 146B)

    ParamExtAck::base_payload_len

    fn ParamExtAck::base_payload_len() -> Int

    ParamExtAck::crc_extra

    fn ParamExtAck::crc_extra() -> Byte

    ParamExtAck::decode_payload

    fn ParamExtAck::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[ParamExtAck, MavError]

    Deserialize ParamExtAck from wire-ordered little-endian payload bytes.

    ParamExtAck::encode_payload

    fn ParamExtAck::encode_payload(self : ParamExtAck, v2? : Bool) -> Bytes

    Serialize ParamExtAck into wire-ordered little-endian payload bytes.

    ParamExtAck::equal

    fn ParamExtAck::equal(ParamExtAck, ParamExtAck) -> Bool
    automatically derived

    ParamExtAck::max_payload_len

    fn ParamExtAck::max_payload_len() -> Int

    ParamExtAck::msg_id

    fn ParamExtAck::msg_id() -> UInt

    ParamExtAck::not_equal

    fn ParamExtAck::not_equal(x : ParamExtAck, y : ParamExtAck) -> Bool
    automatically derived

    ParamExtAck::to_repr

    automatically derived

    ParamExtRequestList

    pub(all) struct ParamExtRequestList {
    target_system : Byte
    target_component : Byte
    } derive(Eq,
    Debug
    )

    Request all parameters of this component.
    • MAVLink Message PARAM_EXT_REQUEST_LIST (ID: 321, CRC_EXTRA: 88, base_len: 2B, max_len: 2B)

    ParamExtRequestList::base_payload_len

    fn ParamExtRequestList::base_payload_len() -> Int

    ParamExtRequestList::crc_extra

    fn ParamExtRequestList::crc_extra() -> Byte

    ParamExtRequestList::decode_payload

    fn ParamExtRequestList::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[ParamExtRequestList, MavError]

    Deserialize ParamExtRequestList from wire-ordered little-endian payload bytes.

    ParamExtRequestList::encode_payload

    fn ParamExtRequestList::encode_payload(self : ParamExtRequestList, v2? : Bool) -> Bytes

    Serialize ParamExtRequestList into wire-ordered little-endian payload bytes.

    ParamExtRequestList::equal

    automatically derived

    ParamExtRequestList::max_payload_len

    fn ParamExtRequestList::max_payload_len() -> Int

    ParamExtRequestList::msg_id

    fn ParamExtRequestList::msg_id() -> UInt

    ParamExtRequestList::not_equal

    automatically derived

    ParamExtRequestList::to_repr

    automatically derived

    ParamExtRequestRead

    pub(all) struct ParamExtRequestRead {
    target_system : Byte
    target_component : Byte
    param_id : String
    param_index : Int
    } derive(Eq,
    Debug
    )

    Request to read the value of a parameter with either the param_id string id or param_index.
    • MAVLink Message PARAM_EXT_REQUEST_READ (ID: 320, CRC_EXTRA: 243, base_len: 20B, max_len: 20B)

    ParamExtRequestRead::base_payload_len

    fn ParamExtRequestRead::base_payload_len() -> Int

    ParamExtRequestRead::crc_extra

    fn ParamExtRequestRead::crc_extra() -> Byte

    ParamExtRequestRead::decode_payload

    fn ParamExtRequestRead::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[ParamExtRequestRead, MavError]

    Deserialize ParamExtRequestRead from wire-ordered little-endian payload bytes.

    ParamExtRequestRead::encode_payload

    fn ParamExtRequestRead::encode_payload(self : ParamExtRequestRead, v2? : Bool) -> Bytes

    Serialize ParamExtRequestRead into wire-ordered little-endian payload bytes.

    ParamExtRequestRead::equal

    automatically derived

    ParamExtRequestRead::max_payload_len

    fn ParamExtRequestRead::max_payload_len() -> Int

    ParamExtRequestRead::msg_id

    fn ParamExtRequestRead::msg_id() -> UInt

    ParamExtRequestRead::not_equal

    automatically derived

    ParamExtRequestRead::to_repr

    automatically derived

    ParamExtSet

    pub(all) struct ParamExtSet {
    target_system : Byte
    target_component : Byte
    param_id : String
    param_value : String
    param_type : Byte
    } derive(Eq,
    Debug
    )

    Set a parameter value.
    • MAVLink Message PARAM_EXT_SET (ID: 323, CRC_EXTRA: 78, base_len: 147B, max_len: 147B)

    ParamExtSet::base_payload_len

    fn ParamExtSet::base_payload_len() -> Int

    ParamExtSet::crc_extra

    fn ParamExtSet::crc_extra() -> Byte

    ParamExtSet::decode_payload

    fn ParamExtSet::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[ParamExtSet, MavError]

    Deserialize ParamExtSet from wire-ordered little-endian payload bytes.

    ParamExtSet::encode_payload

    fn ParamExtSet::encode_payload(self : ParamExtSet, v2? : Bool) -> Bytes

    Serialize ParamExtSet into wire-ordered little-endian payload bytes.

    ParamExtSet::equal

    fn ParamExtSet::equal(ParamExtSet, ParamExtSet) -> Bool
    automatically derived

    ParamExtSet::max_payload_len

    fn ParamExtSet::max_payload_len() -> Int

    ParamExtSet::msg_id

    fn ParamExtSet::msg_id() -> UInt

    ParamExtSet::not_equal

    fn ParamExtSet::not_equal(x : ParamExtSet, y : ParamExtSet) -> Bool
    automatically derived

    ParamExtSet::to_repr

    automatically derived

    ParamExtValue

    pub(all) struct ParamExtValue {
    param_id : String
    param_value : String
    param_type : Byte
    param_count : UInt
    param_index : UInt
    } derive(Eq,
    Debug
    )

    Emit the value of a parameter.
    • MAVLink Message PARAM_EXT_VALUE (ID: 322, CRC_EXTRA: 243, base_len: 149B, max_len: 149B)

    ParamExtValue::base_payload_len

    fn ParamExtValue::base_payload_len() -> Int

    ParamExtValue::crc_extra

    fn ParamExtValue::crc_extra() -> Byte

    ParamExtValue::decode_payload

    fn ParamExtValue::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[ParamExtValue, MavError]

    Deserialize ParamExtValue from wire-ordered little-endian payload bytes.

    ParamExtValue::encode_payload

    fn ParamExtValue::encode_payload(self : ParamExtValue, v2? : Bool) -> Bytes

    Serialize ParamExtValue into wire-ordered little-endian payload bytes.

    ParamExtValue::equal

    automatically derived

    ParamExtValue::max_payload_len

    fn ParamExtValue::max_payload_len() -> Int

    ParamExtValue::msg_id

    fn ParamExtValue::msg_id() -> UInt

    ParamExtValue::not_equal

    fn ParamExtValue::not_equal(x : ParamExtValue, y : ParamExtValue) -> Bool
    automatically derived

    ParamExtValue::to_repr

    automatically derived

    ParamRequestList

    pub(all) struct ParamRequestList {
    target_system : Byte
    target_component : Byte
    } derive(Eq,
    Debug
    )

    Request all parameters of this component.
    • MAVLink Message PARAM_REQUEST_LIST (ID: 21, CRC_EXTRA: 159, base_len: 2B, max_len: 2B)

    ParamRequestList::base_payload_len

    fn ParamRequestList::base_payload_len() -> Int

    ParamRequestList::crc_extra

    fn ParamRequestList::crc_extra() -> Byte

    ParamRequestList::decode_payload

    fn ParamRequestList::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[ParamRequestList, MavError]

    Deserialize ParamRequestList from wire-ordered little-endian payload bytes.

    ParamRequestList::encode_payload

    fn ParamRequestList::encode_payload(self : ParamRequestList, v2? : Bool) -> Bytes

    Serialize ParamRequestList into wire-ordered little-endian payload bytes.

    ParamRequestList::equal

    automatically derived

    ParamRequestList::max_payload_len

    fn ParamRequestList::max_payload_len() -> Int

    ParamRequestList::msg_id

    fn ParamRequestList::msg_id() -> UInt

    ParamRequestList::not_equal

    fn ParamRequestList::not_equal(x : ParamRequestList, y : ParamRequestList) -> Bool
    automatically derived

    ParamRequestList::to_repr

    automatically derived

    ParamRequestRead

    pub(all) struct ParamRequestRead {
    target_system : Byte
    target_component : Byte
    param_id : String
    param_index : Int
    } derive(Eq,
    Debug
    )

    Request to read the onboard parameter with the param_id string id.
    • MAVLink Message PARAM_REQUEST_READ (ID: 20, CRC_EXTRA: 214, base_len: 20B, max_len: 20B)

    ParamRequestRead::base_payload_len

    fn ParamRequestRead::base_payload_len() -> Int

    ParamRequestRead::crc_extra

    fn ParamRequestRead::crc_extra() -> Byte

    ParamRequestRead::decode_payload

    fn ParamRequestRead::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[ParamRequestRead, MavError]

    Deserialize ParamRequestRead from wire-ordered little-endian payload bytes.

    ParamRequestRead::encode_payload

    fn ParamRequestRead::encode_payload(self : ParamRequestRead, v2? : Bool) -> Bytes

    Serialize ParamRequestRead into wire-ordered little-endian payload bytes.

    ParamRequestRead::equal

    automatically derived

    ParamRequestRead::max_payload_len

    fn ParamRequestRead::max_payload_len() -> Int

    ParamRequestRead::msg_id

    fn ParamRequestRead::msg_id() -> UInt

    ParamRequestRead::not_equal

    fn ParamRequestRead::not_equal(x : ParamRequestRead, y : ParamRequestRead) -> Bool
    automatically derived

    ParamRequestRead::to_repr

    automatically derived

    ParamSet

    pub(all) struct ParamSet {
    target_system : Byte
    target_component : Byte
    param_id : String
    param_value : Float
    param_type : Byte
    } derive(Eq,
    Debug
    )

    Set a parameter value (write new value to permanent storage).
    • MAVLink Message PARAM_SET (ID: 23, CRC_EXTRA: 168, base_len: 23B, max_len: 23B)

    ParamSet::base_payload_len

    fn ParamSet::base_payload_len() -> Int

    ParamSet::crc_extra

    fn ParamSet::crc_extra() -> Byte

    ParamSet::decode_payload

    fn ParamSet::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[ParamSet, MavError]

    Deserialize ParamSet from wire-ordered little-endian payload bytes.

    ParamSet::encode_payload

    fn ParamSet::encode_payload(self : ParamSet, v2? : Bool) -> Bytes

    Serialize ParamSet into wire-ordered little-endian payload bytes.

    ParamSet::equal

    fn ParamSet::equal(ParamSet, ParamSet) -> Bool
    automatically derived

    ParamSet::max_payload_len

    fn ParamSet::max_payload_len() -> Int

    ParamSet::msg_id

    fn ParamSet::msg_id() -> UInt

    ParamSet::not_equal

    fn ParamSet::not_equal(x : ParamSet, y : ParamSet) -> Bool
    automatically derived

    ParamSet::to_repr

    automatically derived

    ParamSyncState

    pub(all) enum ParamSyncState {
    Idle
    ListingAll
    WritingParam(String, Float, Byte)
    Synced
    Failed(String)
    } derive(Eq,
    Debug
    )

    State of the ParameterClient synchronization state machine.

    ParamSyncState::equal

    automatically derived

    ParamSyncState::not_equal

    fn ParamSyncState::not_equal(x : ParamSyncState, y : ParamSyncState) -> Bool
    automatically derived

    ParamSyncState::to_repr

    automatically derived

    ParamValue

    pub(all) struct ParamValue {
    param_id : String
    param_value : Float
    param_type : Byte
    param_count : UInt
    param_index : UInt
    } derive(Eq,
    Debug
    )

    Emit the value of a onboard parameter.
    • MAVLink Message PARAM_VALUE (ID: 22, CRC_EXTRA: 220, base_len: 25B, max_len: 25B)

    ParamValue::base_payload_len

    fn ParamValue::base_payload_len() -> Int

    ParamValue::crc_extra

    fn ParamValue::crc_extra() -> Byte

    ParamValue::decode_payload

    fn ParamValue::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[ParamValue, MavError]

    Deserialize ParamValue from wire-ordered little-endian payload bytes.

    ParamValue::encode_payload

    fn ParamValue::encode_payload(self : ParamValue, v2? : Bool) -> Bytes

    Serialize ParamValue into wire-ordered little-endian payload bytes.

    ParamValue::equal

    fn ParamValue::equal(ParamValue, ParamValue) -> Bool
    automatically derived

    ParamValue::max_payload_len

    fn ParamValue::max_payload_len() -> Int

    ParamValue::msg_id

    fn ParamValue::msg_id() -> UInt

    ParamValue::not_equal

    fn ParamValue::not_equal(x : ParamValue, y : ParamValue) -> Bool
    automatically derived

    ParamValue::to_repr

    automatically derived

    ParameterClient

    pub(all) struct ParameterClient {
    target_system : Byte
    target_component : Byte
    timeout_ms : UInt64
    max_retries : Int
    state : ParamSyncState
    expected_count : Int
    last_action_ms : UInt64
    retries : Int
    params : Array[ParameterEntry]
    } derive(Eq,
    Debug
    )

    GCS-side MAVLink Parameter Protocol client supporting full list synchronization, missing index gap recovery, and verified PARAM_SET transactions.

    ParameterClient::equal

    automatically derived

    ParameterClient::get_param

    fn ParameterClient::get_param(self : ParameterClient, param_id : String) -> ParameterEntry?

    Look up a synchronized parameter by name.

    ParameterClient::missing_indices

    fn ParameterClient::missing_indices(self : ParameterClient) -> Array[Int]

    Return the list of missing parameter indices (0 .. expected_count - 1) during list synchronization.

    ParameterClient::new

    fn ParameterClient::new(target_system : Byte, target_component : Byte, timeout_ms? : UInt64, max_retries? : Int) -> ParameterClient

    Create a new ParameterClient targeting (target_system, target_component).

    ParameterClient::not_equal

    fn ParameterClient::not_equal(x : ParameterClient, y : ParameterClient) -> Bool
    automatically derived

    ParameterClient::on_param_value

    fn ParameterClient::on_param_value(self : ParameterClient, pv : ParamValue, now_ms : UInt64) -> Unit

    Process an incoming PARAM_VALUE (#22) message from the vehicle.

    ParameterClient::poll_timeout

    fn ParameterClient::poll_timeout(self : ParameterClient, now_ms : UInt64) -> MavMessage?

    Poll for timeout recovery. Emits targeted PARAM_REQUEST_READ (#20) for missing indices or retries PARAM_REQUEST_LIST / PARAM_SET up to max_retries.

    ParameterClient::start_list_sync

    fn ParameterClient::start_list_sync(self : ParameterClient, now_ms : UInt64) -> MavMessage

    Initiate a full parameter list download (PARAM_REQUEST_LIST #21).

    ParameterClient::start_param_set

    fn ParameterClient::start_param_set(self : ParameterClient, param_id : String, param_value : Float, param_type : Byte, now_ms : UInt64) -> MavMessage

    Initiate a verified parameter write transaction (PARAM_SET #23).

    ParameterClient::to_repr

    automatically derived

    ParameterEntry

    pub(all) struct ParameterEntry {
    param_id : String
    param_value : Float
    param_type : Byte
    param_index : UInt
    } derive(Eq,
    Debug
    )

    Onboard parameter entry stored in ParameterServer or ParameterClient.

    ParameterEntry::equal

    automatically derived

    ParameterEntry::not_equal

    fn ParameterEntry::not_equal(x : ParameterEntry, y : ParameterEntry) -> Bool
    automatically derived

    ParameterEntry::to_repr

    automatically derived

    ParameterServer

    pub(all) struct ParameterServer {
    sysid : Byte
    compid : Byte
    params : Array[ParameterEntry]
    } derive(Eq,
    Debug
    )

    Vehicle-side MAVLink Parameter Protocol server supporting PARAM_REQUEST_LIST, PARAM_REQUEST_READ (by index or ID), and PARAM_SET.

    ParameterServer::equal

    automatically derived

    ParameterServer::handle_message

    fn ParameterServer::handle_message(self : ParameterServer, msg : MavMessage) -> Array[MavMessage]

    Handle an incoming MAVLink parameter request message and return the response messages.

    ParameterServer::new

    fn ParameterServer::new(sysid : Byte, compid : Byte, initial_params : Array[(String, Float, Byte)]) -> ParameterServer

    Create a new ParameterServer initialized with a table of parameters.

    ParameterServer::not_equal

    fn ParameterServer::not_equal(x : ParameterServer, y : ParameterServer) -> Bool
    automatically derived

    ParameterServer::to_repr

    automatically derived

    ParseStreamEvent

    pub(all) enum ParseStreamEvent {
    FrameDecoded(MavFrame)
    FrameError(MavError)
    } derive(Eq,
    Debug
    )

    Streaming parser event emitted when feeding arbitrary byte chunks.

    ParseStreamEvent::equal

    automatically derived

    ParseStreamEvent::not_equal

    fn ParseStreamEvent::not_equal(x : ParseStreamEvent, y : ParseStreamEvent) -> Bool
    automatically derived

    ParseStreamEvent::to_repr

    automatically derived

    PayloadReader

    pub(all) struct PayloadReader {
    data : Bytes
    pos : Int
    zero_extend : Bool
    } derive(Eq,
    Debug
    )

    Little-endian binary reader for MAVLink payloads with automatic MAVLink v2 zero-extension for truncated trailing bytes and extension fields.

    PayloadReader::equal

    automatically derived

    PayloadReader::new

    fn PayloadReader::new(data : Bytes, zero_extend? : Bool) -> PayloadReader

    Create a new PayloadReader. When zero_extend is true (default for MAVLink v2), reads beyond data.length() transparently return 0x00.

    PayloadReader::not_equal

    fn PayloadReader::not_equal(x : PayloadReader, y : PayloadReader) -> Bool
    automatically derived

    PayloadReader::read_byte

    fn PayloadReader::read_byte(self : PayloadReader) -> Result[Byte, MavError]

    Read a single byte at the current cursor position.

    PayloadReader::read_char_array

    fn PayloadReader::read_char_array(self : PayloadReader, fixed_len : Int) -> Result[String, MavError]

    Read a fixed-length char[fixed_len] field, stopping string construction at the first NUL (0x00) while advancing the cursor by the full fixed_len bytes.

    PayloadReader::read_double

    fn PayloadReader::read_double(self : PayloadReader) -> Result[Double, MavError]

    Read an IEEE-754 64-bit floating-point number (double, little-endian).

    PayloadReader::read_float

    fn PayloadReader::read_float(self : PayloadReader) -> Result[Float, MavError]

    Read an IEEE-754 32-bit floating-point number (float, little-endian).

    PayloadReader::read_int16

    fn PayloadReader::read_int16(self : PayloadReader) -> Result[Int, MavError]

    Read a 16-bit signed integer (int16_t, little-endian) sign-extended to Int.

    PayloadReader::read_int32

    fn PayloadReader::read_int32(self : PayloadReader) -> Result[Int, MavError]

    Read a 32-bit signed integer (int32_t, little-endian).

    PayloadReader::read_int64

    fn PayloadReader::read_int64(self : PayloadReader) -> Result[Int64, MavError]

    Read a 64-bit signed integer (int64_t, little-endian).

    PayloadReader::read_int8

    fn PayloadReader::read_int8(self : PayloadReader) -> Result[Int, MavError]

    Read a signed 8-bit integer (int8_t) sign-extended to Int.

    PayloadReader::read_uint16

    fn PayloadReader::read_uint16(self : PayloadReader) -> Result[UInt, MavError]

    Read a 16-bit unsigned integer (uint16_t, little-endian).

    PayloadReader::read_uint32

    fn PayloadReader::read_uint32(self : PayloadReader) -> Result[UInt, MavError]

    Read a 32-bit unsigned integer (uint32_t, little-endian).

    PayloadReader::read_uint64

    fn PayloadReader::read_uint64(self : PayloadReader) -> Result[UInt64, MavError]

    Read a 64-bit unsigned integer (uint64_t, little-endian).

    PayloadReader::read_uint8

    fn PayloadReader::read_uint8(self : PayloadReader) -> Result[Byte, MavError]

    Read an unsigned 8-bit integer (uint8_t).

    PayloadReader::to_repr

    automatically derived

    PayloadWriter

    pub(all) struct PayloadWriter {
    buf : Array[Byte]
    } derive(Eq,
    Debug
    )

    Little-endian binary buffer builder for MAVLink message payloads.

    PayloadWriter::equal

    automatically derived

    PayloadWriter::length

    fn PayloadWriter::length(self : PayloadWriter) -> Int

    Current byte length written so far.

    PayloadWriter::new

    fn PayloadWriter::new(capacity? : Int) -> PayloadWriter

    Create a new payload writer with optional initial capacity.

    PayloadWriter::not_equal

    fn PayloadWriter::not_equal(x : PayloadWriter, y : PayloadWriter) -> Bool
    automatically derived

    PayloadWriter::to_bytes

    fn PayloadWriter::to_bytes(self : PayloadWriter) -> Bytes

    Convert the buffer into raw Bytes without MAVLink v2 zero-truncation.

    PayloadWriter::to_repr

    automatically derived

    PayloadWriter::to_wire_bytes

    fn PayloadWriter::to_wire_bytes(self : PayloadWriter, truncate_zeros? : Bool) -> Bytes

    Convert the buffer into Bytes, applying MAVLink v2 trailing zero-byte truncation when truncate_zeros is true.

    Per official MAVLink v2 specification:
    • Trailing 0x00 bytes at the end of the serialized payload are stripped.
    • The very first byte of a non-empty payload is NEVER removed, even if all bytes are 0x00.

    PayloadWriter::write_bytes

    fn PayloadWriter::write_bytes(self : PayloadWriter, data : Bytes) -> Unit

    Write raw bytes directly into the payload buffer.

    PayloadWriter::write_char_array

    fn PayloadWriter::write_char_array(self : PayloadWriter, s : String, fixed_len : Int) -> Unit

    Write a fixed-length char[fixed_len] field, padding with trailing 0x00 bytes or truncating if s exceeds fixed_len bytes.

    PayloadWriter::write_double

    fn PayloadWriter::write_double(self : PayloadWriter, v : Double) -> Unit

    Write an IEEE-754 64-bit floating-point number (double, little-endian).

    PayloadWriter::write_float

    fn PayloadWriter::write_float(self : PayloadWriter, v : Float) -> Unit

    Write an IEEE-754 32-bit floating-point number (float, little-endian).

    PayloadWriter::write_int16

    fn PayloadWriter::write_int16(self : PayloadWriter, v : Int) -> Unit

    Write a 16-bit signed integer (int16_t represented as Int, little-endian).

    PayloadWriter::write_int32

    fn PayloadWriter::write_int32(self : PayloadWriter, v : Int) -> Unit

    Write a 32-bit signed integer (int32_t, little-endian).

    PayloadWriter::write_int64

    fn PayloadWriter::write_int64(self : PayloadWriter, v : Int64) -> Unit

    Write a 64-bit signed integer (int64_t, little-endian).

    PayloadWriter::write_int8

    fn PayloadWriter::write_int8(self : PayloadWriter, v : Int) -> Unit

    Write a single signed 8-bit integer (int8_t represented as Int).

    PayloadWriter::write_uint16

    fn PayloadWriter::write_uint16(self : PayloadWriter, v : UInt) -> Unit

    Write a 16-bit unsigned integer (uint16_t, little-endian).

    PayloadWriter::write_uint24

    fn PayloadWriter::write_uint24(self : PayloadWriter, v : UInt) -> Unit

    Write a 24-bit unsigned integer (uint24_t, used for MAVLink v2 message IDs, little-endian).

    PayloadWriter::write_uint32

    fn PayloadWriter::write_uint32(self : PayloadWriter, v : UInt) -> Unit

    Write a 32-bit unsigned integer (uint32_t, little-endian).

    PayloadWriter::write_uint64

    fn PayloadWriter::write_uint64(self : PayloadWriter, v : UInt64) -> Unit

    Write a 64-bit unsigned integer (uint64_t, little-endian).

    PayloadWriter::write_uint8

    fn PayloadWriter::write_uint8(self : PayloadWriter, v : Byte) -> Unit

    Write a single unsigned 8-bit integer (uint8_t).

    Ping

    pub(all) struct Ping {
    time_usec : UInt64
    seq : UInt
    target_system : Byte
    target_component : Byte
    } derive(Eq,
    Debug
    )

    A ping message either requesting or responding to a ping.
    • MAVLink Message PING (ID: 4, CRC_EXTRA: 237, base_len: 14B, max_len: 14B)

    Ping::base_payload_len

    fn Ping::base_payload_len() -> Int

    Ping::crc_extra

    fn Ping::crc_extra() -> Byte

    Ping::decode_payload

    fn Ping::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[Ping, MavError]

    Deserialize Ping from wire-ordered little-endian payload bytes.

    Ping::encode_payload

    fn Ping::encode_payload(self : Ping, v2? : Bool) -> Bytes

    Serialize Ping into wire-ordered little-endian payload bytes.

    Ping::equal

    fn Ping::equal(Ping, Ping) -> Bool
    automatically derived

    Ping::max_payload_len

    fn Ping::max_payload_len() -> Int

    Ping::msg_id

    fn Ping::msg_id() -> UInt

    Ping::not_equal

    fn Ping::not_equal(x : Ping, y : Ping) -> Bool
    automatically derived

    Ping::to_repr

    automatically derived

    PositionTargetLocalNed

    pub(all) struct PositionTargetLocalNed {
    time_boot_ms : UInt
    coordinate_frame : Byte
    type_mask : UInt
    x : Float
    y : Float
    z : Float
    vx : Float
    vy : Float
    vz : Float
    afx : Float
    afy : Float
    afz : Float
    yaw : Float
    yaw_rate : Float
    } derive(Eq,
    Debug
    )

    Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot.
    • MAVLink Message POSITION_TARGET_LOCAL_NED (ID: 85, CRC_EXTRA: 140, base_len: 51B, max_len: 51B)

    PositionTargetLocalNed::base_payload_len

    fn PositionTargetLocalNed::base_payload_len() -> Int

    PositionTargetLocalNed::crc_extra

    fn PositionTargetLocalNed::crc_extra() -> Byte

    PositionTargetLocalNed::decode_payload

    fn PositionTargetLocalNed::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[PositionTargetLocalNed, MavError]

    Deserialize PositionTargetLocalNed from wire-ordered little-endian payload bytes.

    PositionTargetLocalNed::encode_payload

    fn PositionTargetLocalNed::encode_payload(self : PositionTargetLocalNed, v2? : Bool) -> Bytes

    Serialize PositionTargetLocalNed into wire-ordered little-endian payload bytes.

    PositionTargetLocalNed::equal

    automatically derived

    PositionTargetLocalNed::max_payload_len

    fn PositionTargetLocalNed::max_payload_len() -> Int

    PositionTargetLocalNed::msg_id

    fn PositionTargetLocalNed::msg_id() -> UInt

    PositionTargetLocalNed::not_equal

    automatically derived

    PositionTargetLocalNed::to_repr

    automatically derived

    PositionTargetTypemask

    pub(all) enum PositionTargetTypemask {
    XIgnore
    YIgnore
    ZIgnore
    VxIgnore
    VyIgnore
    VzIgnore
    AxIgnore
    AyIgnore
    AzIgnore
    ForceSet
    YawIgnore
    YawRateIgnore
    } derive(Eq,
    Debug
    )

    Bitmap to indicate which dimensions should be ignored by the vehicle.

    PositionTargetTypemask::equal

    automatically derived

    PositionTargetTypemask::from_uint

    Decode PositionTargetTypemask from its raw MAVLink numeric value.

    PositionTargetTypemask::not_equal

    automatically derived

    PositionTargetTypemask::to_repr

    automatically derived

    PositionTargetTypemask::to_uint

    Convert PositionTargetTypemask to its raw MAVLink numeric value.

    ProtocolComparisonReport

    pub(all) struct ProtocolComparisonReport {
    total_frames : Int
    v1_total_wire_bytes : Int
    v2_total_wire_bytes : Int
    net_v2_wire_saved_bytes : Int
    v2_vs_v1_reduction_pct : Double
    } derive(Eq,
    Debug
    )

    Quantitative wire comparison between MAVLink v1 (0xFE, 6B header, untrimmed base payload) and MAVLink v2 (0xFD, 10B header, zero-trimmed payload).

    ProtocolComparisonReport::equal

    automatically derived

    ProtocolComparisonReport::not_equal

    automatically derived

    ProtocolComparisonReport::to_repr

    automatically derived

    ProtocolVersion

    pub(all) enum ProtocolVersion {
    V1
    V2
    } derive(Eq,
    Debug
    )

    Protocol wire version selector.

    ProtocolVersion::equal

    automatically derived

    ProtocolVersion::not_equal

    fn ProtocolVersion::not_equal(x : ProtocolVersion, y : ProtocolVersion) -> Bool
    automatically derived

    ProtocolVersion::to_repr

    automatically derived

    RawImu

    pub(all) struct RawImu {
    time_usec : UInt64
    xacc : Int
    yacc : Int
    zacc : Int
    xgyro : Int
    ygyro : Int
    zgyro : Int
    xmag : Int
    ymag : Int
    zmag : Int
    id : Byte
    temperature : Int
    } derive(Eq,
    Debug
    )

    The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1).
    • MAVLink Message RAW_IMU (ID: 27, CRC_EXTRA: 144, base_len: 26B, max_len: 29B)

    RawImu::base_payload_len

    fn RawImu::base_payload_len() -> Int

    RawImu::crc_extra

    fn RawImu::crc_extra() -> Byte

    RawImu::decode_payload

    fn RawImu::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[RawImu, MavError]

    Deserialize RawImu from wire-ordered little-endian payload bytes.

    RawImu::encode_payload

    fn RawImu::encode_payload(self : RawImu, v2? : Bool) -> Bytes

    Serialize RawImu into wire-ordered little-endian payload bytes.

    RawImu::equal

    fn RawImu::equal(RawImu, RawImu) -> Bool
    automatically derived

    RawImu::max_payload_len

    fn RawImu::max_payload_len() -> Int

    RawImu::msg_id

    fn RawImu::msg_id() -> UInt

    RawImu::not_equal

    fn RawImu::not_equal(x : RawImu, y : RawImu) -> Bool
    automatically derived

    RawImu::to_repr

    automatically derived

    RcChannels

    pub(all) struct RcChannels {
    time_boot_ms : UInt
    chancount : Byte
    chan1_raw : UInt
    chan2_raw : UInt
    chan3_raw : UInt
    chan4_raw : UInt
    chan5_raw : UInt
    chan6_raw : UInt
    chan7_raw : UInt
    chan8_raw : UInt
    chan9_raw : UInt
    chan10_raw : UInt
    chan11_raw : UInt
    chan12_raw : UInt
    chan13_raw : UInt
    chan14_raw : UInt
    chan15_raw : UInt
    chan16_raw : UInt
    chan17_raw : UInt
    chan18_raw : UInt
    rssi : Byte
    } derive(Eq,
    Debug
    )

    The PPM values of the RC channels received.
    • MAVLink Message RC_CHANNELS (ID: 65, CRC_EXTRA: 118, base_len: 42B, max_len: 42B)

    RcChannels::base_payload_len

    fn RcChannels::base_payload_len() -> Int

    RcChannels::crc_extra

    fn RcChannels::crc_extra() -> Byte

    RcChannels::decode_payload

    fn RcChannels::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[RcChannels, MavError]

    Deserialize RcChannels from wire-ordered little-endian payload bytes.

    RcChannels::encode_payload

    fn RcChannels::encode_payload(self : RcChannels, v2? : Bool) -> Bytes

    Serialize RcChannels into wire-ordered little-endian payload bytes.

    RcChannels::equal

    fn RcChannels::equal(RcChannels, RcChannels) -> Bool
    automatically derived

    RcChannels::max_payload_len

    fn RcChannels::max_payload_len() -> Int

    RcChannels::msg_id

    fn RcChannels::msg_id() -> UInt

    RcChannels::not_equal

    fn RcChannels::not_equal(x : RcChannels, y : RcChannels) -> Bool
    automatically derived

    RcChannels::to_repr

    automatically derived

    RcChannelsRaw

    pub(all) struct RcChannelsRaw {
    time_boot_ms : UInt
    port : Byte
    chan1_raw : UInt
    chan2_raw : UInt
    chan3_raw : UInt
    chan4_raw : UInt
    chan5_raw : UInt
    chan6_raw : UInt
    chan7_raw : UInt
    chan8_raw : UInt
    rssi : Byte
    } derive(Eq,
    Debug
    )

    The RAW values of the RC channels received.
    • MAVLink Message RC_CHANNELS_RAW (ID: 35, CRC_EXTRA: 244, base_len: 22B, max_len: 22B)

    RcChannelsRaw::base_payload_len

    fn RcChannelsRaw::base_payload_len() -> Int

    RcChannelsRaw::crc_extra

    fn RcChannelsRaw::crc_extra() -> Byte

    RcChannelsRaw::decode_payload

    fn RcChannelsRaw::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[RcChannelsRaw, MavError]

    Deserialize RcChannelsRaw from wire-ordered little-endian payload bytes.

    RcChannelsRaw::encode_payload

    fn RcChannelsRaw::encode_payload(self : RcChannelsRaw, v2? : Bool) -> Bytes

    Serialize RcChannelsRaw into wire-ordered little-endian payload bytes.

    RcChannelsRaw::equal

    automatically derived

    RcChannelsRaw::max_payload_len

    fn RcChannelsRaw::max_payload_len() -> Int

    RcChannelsRaw::msg_id

    fn RcChannelsRaw::msg_id() -> UInt

    RcChannelsRaw::not_equal

    fn RcChannelsRaw::not_equal(x : RcChannelsRaw, y : RcChannelsRaw) -> Bool
    automatically derived

    RcChannelsRaw::to_repr

    automatically derived

    RouteEntry

    pub(all) struct RouteEntry {
    sysid : Byte
    compid : Byte
    port_id : Int
    frames_routed : Int
    } derive(Eq,
    Debug
    )

    Learned routing table entry mapping a MAVLink (sysid, compid) address to a physical/logical link port.

    RouteEntry::equal

    fn RouteEntry::equal(RouteEntry, RouteEntry) -> Bool
    automatically derived

    RouteEntry::not_equal

    fn RouteEntry::not_equal(x : RouteEntry, y : RouteEntry) -> Bool
    automatically derived

    RouteEntry::to_repr

    automatically derived

    ScaledImu

    pub(all) struct ScaledImu {
    time_boot_ms : UInt
    xacc : Int
    yacc : Int
    zacc : Int
    xgyro : Int
    ygyro : Int
    zgyro : Int
    xmag : Int
    ymag : Int
    zmag : Int
    temperature : Int
    } derive(Eq,
    Debug
    )

    The RAW IMU readings for the usual 9DOF sensor setup (scaled to milli-g / millirad/s).
    • MAVLink Message SCALED_IMU (ID: 26, CRC_EXTRA: 170, base_len: 22B, max_len: 24B)

    ScaledImu::base_payload_len

    fn ScaledImu::base_payload_len() -> Int

    ScaledImu::crc_extra

    fn ScaledImu::crc_extra() -> Byte

    ScaledImu::decode_payload

    fn ScaledImu::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[ScaledImu, MavError]

    Deserialize ScaledImu from wire-ordered little-endian payload bytes.

    ScaledImu::encode_payload

    fn ScaledImu::encode_payload(self : ScaledImu, v2? : Bool) -> Bytes

    Serialize ScaledImu into wire-ordered little-endian payload bytes.

    ScaledImu::equal

    fn ScaledImu::equal(ScaledImu, ScaledImu) -> Bool
    automatically derived

    ScaledImu::max_payload_len

    fn ScaledImu::max_payload_len() -> Int

    ScaledImu::msg_id

    fn ScaledImu::msg_id() -> UInt

    ScaledImu::not_equal

    fn ScaledImu::not_equal(x : ScaledImu, y : ScaledImu) -> Bool
    automatically derived

    ScaledImu::to_repr

    automatically derived

    ScaledPressure

    pub(all) struct ScaledPressure {
    time_boot_ms : UInt
    press_abs : Float
    press_diff : Float
    temperature : Int
    temperature_press_diff : Int
    } derive(Eq,
    Debug
    )

    The pressure readings for the typical setup of one absolute and differential pressure sensor.
    • MAVLink Message SCALED_PRESSURE (ID: 29, CRC_EXTRA: 115, base_len: 14B, max_len: 16B)

    ScaledPressure::base_payload_len

    fn ScaledPressure::base_payload_len() -> Int

    ScaledPressure::crc_extra

    fn ScaledPressure::crc_extra() -> Byte

    ScaledPressure::decode_payload

    fn ScaledPressure::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[ScaledPressure, MavError]

    Deserialize ScaledPressure from wire-ordered little-endian payload bytes.

    ScaledPressure::encode_payload

    fn ScaledPressure::encode_payload(self : ScaledPressure, v2? : Bool) -> Bytes

    Serialize ScaledPressure into wire-ordered little-endian payload bytes.

    ScaledPressure::equal

    automatically derived

    ScaledPressure::max_payload_len

    fn ScaledPressure::max_payload_len() -> Int

    ScaledPressure::msg_id

    fn ScaledPressure::msg_id() -> UInt

    ScaledPressure::not_equal

    fn ScaledPressure::not_equal(x : ScaledPressure, y : ScaledPressure) -> Bool
    automatically derived

    ScaledPressure::to_repr

    automatically derived

    ServoOutputRaw

    pub(all) struct ServoOutputRaw {
    time_usec : UInt
    port : Byte
    servo1_raw : UInt
    servo2_raw : UInt
    servo3_raw : UInt
    servo4_raw : UInt
    servo5_raw : UInt
    servo6_raw : UInt
    servo7_raw : UInt
    servo8_raw : UInt
    servo9_raw : UInt
    servo10_raw : UInt
    servo11_raw : UInt
    servo12_raw : UInt
    servo13_raw : UInt
    servo14_raw : UInt
    servo15_raw : UInt
    servo16_raw : UInt
    } derive(Eq,
    Debug
    )

    The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages).
    • MAVLink Message SERVO_OUTPUT_RAW (ID: 36, CRC_EXTRA: 222, base_len: 21B, max_len: 37B)

    ServoOutputRaw::base_payload_len

    fn ServoOutputRaw::base_payload_len() -> Int

    ServoOutputRaw::crc_extra

    fn ServoOutputRaw::crc_extra() -> Byte

    ServoOutputRaw::decode_payload

    fn ServoOutputRaw::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[ServoOutputRaw, MavError]

    Deserialize ServoOutputRaw from wire-ordered little-endian payload bytes.

    ServoOutputRaw::encode_payload

    fn ServoOutputRaw::encode_payload(self : ServoOutputRaw, v2? : Bool) -> Bytes

    Serialize ServoOutputRaw into wire-ordered little-endian payload bytes.

    ServoOutputRaw::equal

    automatically derived

    ServoOutputRaw::max_payload_len

    fn ServoOutputRaw::max_payload_len() -> Int

    ServoOutputRaw::msg_id

    fn ServoOutputRaw::msg_id() -> UInt

    ServoOutputRaw::not_equal

    fn ServoOutputRaw::not_equal(x : ServoOutputRaw, y : ServoOutputRaw) -> Bool
    automatically derived

    ServoOutputRaw::to_repr

    automatically derived

    SetAttitudeTarget

    pub(all) struct SetAttitudeTarget {
    time_boot_ms : UInt
    target_system : Byte
    target_component : Byte
    type_mask : Byte
    q : FixedArray[Float]
    body_roll_rate : Float
    body_pitch_rate : Float
    body_yaw_rate : Float
    thrust : Float
    } derive(Eq,
    Debug
    )

    Sets a desired vehicle attitude. Used by an external controller to command the vehicle.
    • MAVLink Message SET_ATTITUDE_TARGET (ID: 82, CRC_EXTRA: 49, base_len: 39B, max_len: 39B)

    SetAttitudeTarget::base_payload_len

    fn SetAttitudeTarget::base_payload_len() -> Int

    SetAttitudeTarget::crc_extra

    fn SetAttitudeTarget::crc_extra() -> Byte

    SetAttitudeTarget::decode_payload

    fn SetAttitudeTarget::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[SetAttitudeTarget, MavError]

    Deserialize SetAttitudeTarget from wire-ordered little-endian payload bytes.

    SetAttitudeTarget::encode_payload

    fn SetAttitudeTarget::encode_payload(self : SetAttitudeTarget, v2? : Bool) -> Bytes

    Serialize SetAttitudeTarget into wire-ordered little-endian payload bytes.

    SetAttitudeTarget::equal

    automatically derived

    SetAttitudeTarget::max_payload_len

    fn SetAttitudeTarget::max_payload_len() -> Int

    SetAttitudeTarget::msg_id

    fn SetAttitudeTarget::msg_id() -> UInt

    SetAttitudeTarget::not_equal

    fn SetAttitudeTarget::not_equal(x : SetAttitudeTarget, y : SetAttitudeTarget) -> Bool
    automatically derived

    SetAttitudeTarget::to_repr

    automatically derived

    SetMode

    pub(all) struct SetMode {
    target_system : Byte
    base_mode : Byte
    custom_mode : UInt
    } derive(Eq,
    Debug
    )

    Set the system mode, as defined by enum MAV_MODE.
    • MAVLink Message SET_MODE (ID: 11, CRC_EXTRA: 89, base_len: 6B, max_len: 6B)

    SetMode::base_payload_len

    fn SetMode::base_payload_len() -> Int

    SetMode::crc_extra

    fn SetMode::crc_extra() -> Byte

    SetMode::decode_payload

    fn SetMode::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[SetMode, MavError]

    Deserialize SetMode from wire-ordered little-endian payload bytes.

    SetMode::encode_payload

    fn SetMode::encode_payload(self : SetMode, v2? : Bool) -> Bytes

    Serialize SetMode into wire-ordered little-endian payload bytes.

    SetMode::equal

    fn SetMode::equal(SetMode, SetMode) -> Bool
    automatically derived

    SetMode::max_payload_len

    fn SetMode::max_payload_len() -> Int

    SetMode::msg_id

    fn SetMode::msg_id() -> UInt

    SetMode::not_equal

    fn SetMode::not_equal(x : SetMode, y : SetMode) -> Bool
    automatically derived

    SetMode::to_repr

    automatically derived

    SetPositionTargetLocalNed

    pub(all) struct SetPositionTargetLocalNed {
    time_boot_ms : UInt
    target_system : Byte
    target_component : Byte
    coordinate_frame : Byte
    type_mask : UInt
    x : Float
    y : Float
    z : Float
    vx : Float
    vy : Float
    vz : Float
    afx : Float
    afy : Float
    afz : Float
    yaw : Float
    yaw_rate : Float
    } derive(Eq,
    Debug
    )

    Sets a desired vehicle position in a local north-east-down coordinate frame.
    • MAVLink Message SET_POSITION_TARGET_LOCAL_NED (ID: 84, CRC_EXTRA: 143, base_len: 53B, max_len: 53B)

    SetPositionTargetLocalNed::base_payload_len

    fn SetPositionTargetLocalNed::base_payload_len() -> Int

    SetPositionTargetLocalNed::crc_extra

    fn SetPositionTargetLocalNed::crc_extra() -> Byte

    SetPositionTargetLocalNed::decode_payload

    fn SetPositionTargetLocalNed::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[SetPositionTargetLocalNed, MavError]

    Deserialize SetPositionTargetLocalNed from wire-ordered little-endian payload bytes.

    SetPositionTargetLocalNed::encode_payload

    fn SetPositionTargetLocalNed::encode_payload(self : SetPositionTargetLocalNed, v2? : Bool) -> Bytes

    Serialize SetPositionTargetLocalNed into wire-ordered little-endian payload bytes.

    SetPositionTargetLocalNed::equal

    automatically derived

    SetPositionTargetLocalNed::max_payload_len

    fn SetPositionTargetLocalNed::max_payload_len() -> Int

    SetPositionTargetLocalNed::msg_id

    fn SetPositionTargetLocalNed::msg_id() -> UInt

    SetPositionTargetLocalNed::not_equal

    automatically derived

    SetPositionTargetLocalNed::to_repr

    automatically derived

    SigningContext

    pub(all) struct SigningContext {
    secret_key : FixedArray[Byte]
    link_id : Byte
    timestamp : UInt64
    } derive(Eq,
    Debug
    )

    Stateful MAVLink v2 packet signing and verification context.

    Per the MAVLink v2 Packet Signing specification:
    • secret_key is a 32-byte shared secret.
    • link_id identifies the communication link (0..255).
    • timestamp is a 48-bit monotonically increasing counter in 10-microsecond units since 2015-01-01.
    • Signature is the first 6 bytes of SHA256(secret_key || frame_without_sig || link_id || timestamp_le6).

    SigningContext::equal

    automatically derived

    SigningContext::new

    fn SigningContext::new(secret_key : Bytes, link_id? : Byte, initial_timestamp? : UInt64) -> Result[SigningContext, MavError]

    Create a new SigningContext with a 32-byte secret key, link_id, and initial 48-bit timestamp.

    SigningContext::not_equal

    fn SigningContext::not_equal(x : SigningContext, y : SigningContext) -> Bool
    automatically derived

    SigningContext::sign_frame_bytes

    fn SigningContext::sign_frame_bytes(self : SigningContext, unsigned_frame_bytes : Bytes) -> MavSignature

    Generate the next MavSignature for an outgoing MAVLink v2 frame and increment the context timestamp.

    SigningContext::to_repr

    automatically derived

    SigningContext::verify_frame_signature

    fn SigningContext::verify_frame_signature(self : SigningContext, unsigned_frame_bytes : Bytes, sig : MavSignature, enforce_replay_protection? : Bool) -> Result[Unit, MavError]

    Verify an incoming MAVLink v2 frame signature and enforce monotonic timestamp replay protection.

    SigningSecurityAuditReport

    pub(all) struct SigningSecurityAuditReport {
    valid_signed_transmitted : Int
    valid_signed_accepted : Int
    attack_frames_injected : Int
    attack_frames_rejected : Int
    unsigned_wire_bytes : Int
    signed_wire_bytes : Int
    signing_overhead_pct : Double
    } derive(Eq,
    Debug
    )

    Cryptographic packet signing and anti-replay attack audit report.

    SigningSecurityAuditReport::equal

    automatically derived

    SigningSecurityAuditReport::not_equal

    automatically derived

    SigningSecurityAuditReport::to_repr

    automatically derived

    Statustext

    pub(all) struct Statustext {
    severity : Byte
    text : String
    id : UInt
    chunk_seq : Byte
    } derive(Eq,
    Debug
    )

    Status text message.
    • MAVLink Message STATUSTEXT (ID: 253, CRC_EXTRA: 83, base_len: 51B, max_len: 54B)

    Statustext::base_payload_len

    fn Statustext::base_payload_len() -> Int

    Statustext::crc_extra

    fn Statustext::crc_extra() -> Byte

    Statustext::decode_payload

    fn Statustext::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[Statustext, MavError]

    Deserialize Statustext from wire-ordered little-endian payload bytes.

    Statustext::encode_payload

    fn Statustext::encode_payload(self : Statustext, v2? : Bool) -> Bytes

    Serialize Statustext into wire-ordered little-endian payload bytes.

    Statustext::equal

    fn Statustext::equal(Statustext, Statustext) -> Bool
    automatically derived

    Statustext::max_payload_len

    fn Statustext::max_payload_len() -> Int

    Statustext::msg_id

    fn Statustext::msg_id() -> UInt

    Statustext::not_equal

    fn Statustext::not_equal(x : Statustext, y : Statustext) -> Bool
    automatically derived

    Statustext::to_repr

    automatically derived

    SysStatus

    pub(all) struct SysStatus {
    onboard_control_sensors_present : UInt
    onboard_control_sensors_enabled : UInt
    onboard_control_sensors_health : UInt
    load : UInt
    voltage_battery : UInt
    current_battery : Int
    battery_remaining : Int
    drop_rate_comm : UInt
    errors_comm : UInt
    errors_count1 : UInt
    errors_count2 : UInt
    errors_count3 : UInt
    errors_count4 : UInt
    } derive(Eq,
    Debug
    )

    The general system state.
    • MAVLink Message SYS_STATUS (ID: 1, CRC_EXTRA: 124, base_len: 31B, max_len: 31B)

    SysStatus::base_payload_len

    fn SysStatus::base_payload_len() -> Int

    SysStatus::crc_extra

    fn SysStatus::crc_extra() -> Byte

    SysStatus::decode_payload

    fn SysStatus::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[SysStatus, MavError]

    Deserialize SysStatus from wire-ordered little-endian payload bytes.

    SysStatus::encode_payload

    fn SysStatus::encode_payload(self : SysStatus, v2? : Bool) -> Bytes

    Serialize SysStatus into wire-ordered little-endian payload bytes.

    SysStatus::equal

    fn SysStatus::equal(SysStatus, SysStatus) -> Bool
    automatically derived

    SysStatus::max_payload_len

    fn SysStatus::max_payload_len() -> Int

    SysStatus::msg_id

    fn SysStatus::msg_id() -> UInt

    SysStatus::not_equal

    fn SysStatus::not_equal(x : SysStatus, y : SysStatus) -> Bool
    automatically derived

    SysStatus::to_repr

    automatically derived

    SystemTime

    pub(all) struct SystemTime {
    time_unix_usec : UInt64
    time_boot_ms : UInt
    } derive(Eq,
    Debug
    )

    The system time is the time of the master clock, typically the computer clock of the main onboard computer.
    • MAVLink Message SYSTEM_TIME (ID: 2, CRC_EXTRA: 137, base_len: 12B, max_len: 12B)

    SystemTime::base_payload_len

    fn SystemTime::base_payload_len() -> Int

    SystemTime::crc_extra

    fn SystemTime::crc_extra() -> Byte

    SystemTime::decode_payload

    fn SystemTime::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[SystemTime, MavError]

    Deserialize SystemTime from wire-ordered little-endian payload bytes.

    SystemTime::encode_payload

    fn SystemTime::encode_payload(self : SystemTime, v2? : Bool) -> Bytes

    Serialize SystemTime into wire-ordered little-endian payload bytes.

    SystemTime::equal

    fn SystemTime::equal(SystemTime, SystemTime) -> Bool
    automatically derived

    SystemTime::max_payload_len

    fn SystemTime::max_payload_len() -> Int

    SystemTime::msg_id

    fn SystemTime::msg_id() -> UInt

    SystemTime::not_equal

    fn SystemTime::not_equal(x : SystemTime, y : SystemTime) -> Bool
    automatically derived

    SystemTime::to_repr

    automatically derived

    TelemetryRateTracker

    pub(all) struct TelemetryRateTracker {
    total_frames : Int
    total_wire_bytes : Int
    stats : Array[MessageRateStat]
    } derive(Eq,
    Debug
    )

    Telemetry stream analyzer for computing per-message Hz frequency and link bandwidth utilization.

    TelemetryRateTracker::equal

    automatically derived

    TelemetryRateTracker::message_rate_hz

    fn TelemetryRateTracker::message_rate_hz(self : TelemetryRateTracker, msgid : UInt, window_ms : UInt64) -> Double

    Compute the average message rate in Hz for msgid over a duration of window_ms milliseconds.

    TelemetryRateTracker::new

    Create a new TelemetryRateTracker.

    TelemetryRateTracker::not_equal

    automatically derived

    TelemetryRateTracker::record_frame

    fn TelemetryRateTracker::record_frame(self : TelemetryRateTracker, frame : MavFrame, wire_len : Int) -> Unit

    Record a received MavFrame and its total wire byte length.

    TelemetryRateTracker::to_repr

    automatically derived

    TelemetryRateTracker::total_bandwidth_bytes_per_sec

    fn TelemetryRateTracker::total_bandwidth_bytes_per_sec(self : TelemetryRateTracker, window_ms : UInt64) -> Double

    Compute total link bandwidth in Bytes/second over window_ms milliseconds.

    Timesync

    pub(all) struct Timesync {
    tc1 : Int64
    ts1 : Int64
    target_system : Byte
    target_component : Byte
    } derive(Eq,
    Debug
    )

    Time synchronization message.
    • MAVLink Message TIMESYNC (ID: 111, CRC_EXTRA: 34, base_len: 16B, max_len: 18B)

    Timesync::base_payload_len

    fn Timesync::base_payload_len() -> Int

    Timesync::crc_extra

    fn Timesync::crc_extra() -> Byte

    Timesync::decode_payload

    fn Timesync::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[Timesync, MavError]

    Deserialize Timesync from wire-ordered little-endian payload bytes.

    Timesync::encode_payload

    fn Timesync::encode_payload(self : Timesync, v2? : Bool) -> Bytes

    Serialize Timesync into wire-ordered little-endian payload bytes.

    Timesync::equal

    fn Timesync::equal(Timesync, Timesync) -> Bool
    automatically derived

    Timesync::max_payload_len

    fn Timesync::max_payload_len() -> Int

    Timesync::msg_id

    fn Timesync::msg_id() -> UInt

    Timesync::not_equal

    fn Timesync::not_equal(x : Timesync, y : Timesync) -> Bool
    automatically derived

    Timesync::to_repr

    automatically derived

    TimesyncEstimator

    pub(all) struct TimesyncEstimator {
    sample_count : Int
    min_rtt_ns : Int64
    ema_rtt_ns : Int64
    ema_offset_ns : Int64
    } derive(Eq,
    Debug
    )

    Two-way MAVLink TIMESYNC (#111) clock offset and round-trip latency estimator with exponential moving average (EMA) jitter smoothing.

    TimesyncEstimator::create_probe

    fn TimesyncEstimator::create_probe(local_time_ns : Int64, target_system? : Byte, target_component? : Byte) -> MavMessage

    Create an outbound TIMESYNC (#111) probe request (tc1 = 0, ts1 = local_time_ns).

    TimesyncEstimator::equal

    automatically derived

    TimesyncEstimator::new

    Create a new TimesyncEstimator.

    TimesyncEstimator::not_equal

    fn TimesyncEstimator::not_equal(x : TimesyncEstimator, y : TimesyncEstimator) -> Bool
    automatically derived

    TimesyncEstimator::on_probe_return

    fn TimesyncEstimator::on_probe_return(self : TimesyncEstimator, incoming : Timesync, rx_time_ns : Int64) -> TimesyncSample?

    Process a returned TIMESYNC probe (tc1 != 0) at local receive timestamp rx_time_ns, updating RTT and clock offset estimates.

    TimesyncEstimator::respond_to_probe

    fn TimesyncEstimator::respond_to_probe(incoming : Timesync, local_time_ns : Int64, sender_sysid : Byte, sender_compid : Byte) -> MavMessage?

    Respond to an incoming TIMESYNC probe request (tc1 == 0) by stamping tc1 = local_time_ns.

    TimesyncEstimator::to_repr

    automatically derived

    TimesyncSample

    pub(all) struct TimesyncSample {
    rtt_ns : Int64
    clock_offset_ns : Int64
    } derive(Eq,
    Debug
    )

    Result of a completed two-way TIMESYNC (#111) probe.

    TimesyncSample::equal

    automatically derived

    TimesyncSample::not_equal

    fn TimesyncSample::not_equal(x : TimesyncSample, y : TimesyncSample) -> Bool
    automatically derived

    TimesyncSample::to_repr

    automatically derived

    TlogEntry

    pub(all) struct TlogEntry {
    timestamp_usec : UInt64
    frame : MavFrame
    } derive(Eq,
    Debug
    )

    Single timestamped MAVLink frame entry from a QGroundControl / MissionPlanner .tlog telemetry log.

    TlogEntry::equal

    fn TlogEntry::equal(TlogEntry, TlogEntry) -> Bool
    automatically derived

    TlogEntry::not_equal

    fn TlogEntry::not_equal(x : TlogEntry, y : TlogEntry) -> Bool
    automatically derived

    TlogEntry::to_repr

    automatically derived

    TlogRecorder

    pub(all) struct TlogRecorder {
    buf : Array[Byte]
    entry_count : Int
    } derive(Eq,
    Debug
    )

    Stateful QGroundControl .tlog binary telemetry recorder.

    TlogRecorder::equal

    automatically derived

    TlogRecorder::new

    Create a new TlogRecorder.

    TlogRecorder::not_equal

    fn TlogRecorder::not_equal(x : TlogRecorder, y : TlogRecorder) -> Bool
    automatically derived

    TlogRecorder::record_message

    fn TlogRecorder::record_message(self : TlogRecorder, timestamp_usec : UInt64, msg : MavMessage, seq~ : Byte, sysid~ : Byte, compid~ : Byte, version? : ProtocolVersion, signing? : SigningContext?) -> Result[Unit, MavError]

    Encode a MavMessage and append it to the .tlog buffer with timestamp_usec.

    TlogRecorder::record_wire_frame

    fn TlogRecorder::record_wire_frame(self : TlogRecorder, timestamp_usec : UInt64, wire_frame : Bytes) -> Unit

    Append an already-encoded MAVLink wire frame with a 64-bit microsecond UNIX timestamp.

    TlogRecorder::to_bytes

    fn TlogRecorder::to_bytes(self : TlogRecorder) -> Bytes

    Export the accumulated .tlog binary stream as Bytes.

    TlogRecorder::to_repr

    automatically derived

    VfrHud

    pub(all) struct VfrHud {
    airspeed : Float
    groundspeed : Float
    heading : Int
    throttle : UInt
    alt : Float
    climb : Float
    } derive(Eq,
    Debug
    )

    Metrics typically displayed on a HUD for fixed wing aircraft.
    • MAVLink Message VFR_HUD (ID: 74, CRC_EXTRA: 20, base_len: 20B, max_len: 20B)

    VfrHud::base_payload_len

    fn VfrHud::base_payload_len() -> Int

    VfrHud::crc_extra

    fn VfrHud::crc_extra() -> Byte

    VfrHud::decode_payload

    fn VfrHud::decode_payload(payload_ : Bytes, v2? : Bool) -> Result[VfrHud, MavError]

    Deserialize VfrHud from wire-ordered little-endian payload bytes.

    VfrHud::encode_payload

    fn VfrHud::encode_payload(self : VfrHud, v2? : Bool) -> Bytes

    Serialize VfrHud into wire-ordered little-endian payload bytes.

    VfrHud::equal

    fn VfrHud::equal(VfrHud, VfrHud) -> Bool
    automatically derived

    VfrHud::max_payload_len

    fn VfrHud::max_payload_len() -> Int

    VfrHud::msg_id

    fn VfrHud::msg_id() -> UInt

    VfrHud::not_equal

    fn VfrHud::not_equal(x : VfrHud, y : VfrHud) -> Bool
    automatically derived

    VfrHud::to_repr

    automatically derived

    X25Crc

    pub(all) struct X25Crc {
    value : UInt
    } derive(Eq,
    Debug
    )

    Stateful X.25 CRC-16-MCRF4XX accumulator used by MAVLink v1 and v2.

    X25Crc::accumulate_ascii

    fn X25Crc::accumulate_ascii(self : X25Crc, text : String) -> Unit

    Accumulate an ASCII string into the X.25 CRC-16 state.

    X25Crc::accumulate_byte

    fn X25Crc::accumulate_byte(self : X25Crc, b : Byte) -> Unit

    Accumulate a single byte into the X.25 CRC-16 state.

    X25Crc::accumulate_bytes

    fn X25Crc::accumulate_bytes(self : X25Crc, data : Bytes, start? : Int, len? : Int) -> Unit

    Accumulate a slice of bytes into the X.25 CRC-16 state.

    X25Crc::equal

    fn X25Crc::equal(X25Crc, X25Crc) -> Bool
    automatically derived

    X25Crc::high_byte

    fn X25Crc::high_byte(self : X25Crc) -> Byte

    Return the high byte of the 16-bit CRC.

    X25Crc::low_byte

    fn X25Crc::low_byte(self : X25Crc) -> Byte

    Return the low byte of the 16-bit CRC.

    X25Crc::new

    fn X25Crc::new() -> X25Crc

    Create a new X.25 CRC accumulator initialized to 0xFFFF.

    X25Crc::not_equal

    fn X25Crc::not_equal(x : X25Crc, y : X25Crc) -> Bool
    automatically derived

    X25Crc::reset

    fn X25Crc::reset(self : X25Crc) -> Unit

    Reset the accumulator to 0xFFFF.

    X25Crc::to_crc_extra

    fn X25Crc::to_crc_extra(self : X25Crc) -> Byte

    Fold the 16-bit CRC into a 1-byte CRC_EXTRA value: (crc & 0xFF) ^ (crc >> 8).

    X25Crc::to_repr

    automatically derived

    XmlEnumDef

    pub(all) struct XmlEnumDef {
    name : String
    bitmask : Bool
    description : String
    entries : Array[XmlEnumEntry]
    } derive(Eq,
    Debug
    )

    Parsed <enum> definition from a MAVLink XML file.

    XmlEnumDef::equal

    fn XmlEnumDef::equal(XmlEnumDef, XmlEnumDef) -> Bool
    automatically derived

    XmlEnumDef::not_equal

    fn XmlEnumDef::not_equal(x : XmlEnumDef, y : XmlEnumDef) -> Bool
    automatically derived

    XmlEnumDef::to_repr

    automatically derived

    XmlEnumEntry

    pub(all) struct XmlEnumEntry {
    name : String
    value : UInt
    description : String
    } derive(Eq,
    Debug
    )

    Single <entry> inside a MAVLink <enum>.

    XmlEnumEntry::equal

    automatically derived

    XmlEnumEntry::not_equal

    fn XmlEnumEntry::not_equal(x : XmlEnumEntry, y : XmlEnumEntry) -> Bool
    automatically derived

    XmlEnumEntry::to_repr

    automatically derived

    XmlFieldDef

    pub(all) struct XmlFieldDef {
    wire_type : String
    parsed_type : MavFieldType
    name : String
    enum_name : String?
    units : String?
    description : String
    is_extension : Bool
    wire_offset : Int
    } derive(Eq,
    Debug
    )

    Parsed <field> definition inside a MAVLink <message>, enriched with wire layout metadata.

    XmlFieldDef::equal

    fn XmlFieldDef::equal(XmlFieldDef, XmlFieldDef) -> Bool
    automatically derived

    XmlFieldDef::not_equal

    fn XmlFieldDef::not_equal(x : XmlFieldDef, y : XmlFieldDef) -> Bool
    automatically derived

    XmlFieldDef::to_repr

    automatically derived

    XmlMessageDef

    pub(all) struct XmlMessageDef {
    id : UInt
    name : String
    description : String
    fields : Array[XmlFieldDef]
    wire_ordered_fields : Array[XmlFieldDef]
    base_payload_len : Int
    max_payload_len : Int
    crc_extra : Byte
    } derive(Eq,
    Debug
    )

    Parsed <message> definition from a MAVLink XML file, including wire-reordered fields and precomputed crc_extra, base_payload_len, and max_payload_len.

    XmlMessageDef::equal

    automatically derived

    XmlMessageDef::not_equal

    fn XmlMessageDef::not_equal(x : XmlMessageDef, y : XmlMessageDef) -> Bool
    automatically derived

    XmlMessageDef::to_repr

    automatically derived

    ZeroTrimmingBandwidthReport

    pub(all) struct ZeroTrimmingBandwidthReport {
    total_frames : Int
    untrimmed_payload_bytes : Int
    trimmed_payload_bytes : Int
    untrimmed_wire_bytes : Int
    trimmed_wire_bytes : Int
    saved_bytes : Int
    payload_saving_pct : Double
    wire_saving_pct : Double
    } derive(Eq,
    Debug
    )

    Quantitative bandwidth reduction report comparing untrimmed payloads vs MAVLink v2 zero-trimmed frames.

    ZeroTrimmingBandwidthReport::equal

    automatically derived

    ZeroTrimmingBandwidthReport::not_equal

    automatically derived

    ZeroTrimmingBandwidthReport::to_repr

    automatically derived

    IFLAG_SIGNED

    let IFLAG_SIGNED : Byte

    MAVLink v2 incompatibility flag indicating the frame carries a 13-byte signature trailer.
    let MAVLINK_STX_V1 : Byte

    MAVLink v1 start-of-text magic marker (0xFE).
    let MAVLINK_STX_V2 : Byte

    MAVLink v2 start-of-text magic marker (0xFD).

    MAX_PAYLOAD_LEN

    let MAX_PAYLOAD_LEN : Int

    Maximum payload length in bytes for both MAVLink v1 and v2 frames.

    V1_HEADER_LEN

    let V1_HEADER_LEN : Int

    MAVLink v1 header length in bytes (len, seq, sysid, compid, msgid).

    V2_HEADER_LEN

    let V2_HEADER_LEN : Int

    MAVLink v2 header length in bytes (len, incompat_flags, compat_flags, seq, sysid, compid, msgid[3]).

    V2_SIGNATURE_LEN

    let V2_SIGNATURE_LEN : Int

    MAVLink v2 packet signature length in bytes (link_id[1] + timestamp[6] + signature[6]).

    X25_INIT_CRC

    let X25_INIT_CRC : UInt

    Initial seed value for MAVLink X.25 CRC-16-MCRF4XX calculation.

    builtin_xml_resolver

    fn builtin_xml_resolver(file_name : String) -> String?

    Built-in XML file resolver for <include> directives ("minimal.xml", "common.xml", "standard.xml").

    compute_crc_extra

    fn compute_crc_extra(message_name : String, fields : Array[CrcFieldSpec]) -> Result[Byte, MavError]

    Calculate the official MAVLink CRC_EXTRA seed byte for a message definition.

    Follows the official MAVLink specification:
    1. Only non-extension fields (is_extension == false) are included.
    2. Fields are stably sorted in descending order of their primitive element byte width (8, 4, 2, 1).
    3. The message name (uppercase + trailing space) is accumulated first.
    4. Each sorted field accumulates "<normalized_base_type> <field_name> ", followed by array_length as a single byte if the field is a fixed-length array.
    5. The resulting 16-bit X.25 CRC is folded via (crc & 0xFF) ^ (crc >> 8).

    compute_v2_signature_bytes

    fn compute_v2_signature_bytes(secret_key : FixedArray[Byte], unsigned_frame_bytes : Bytes, link_id : Byte, timestamp : UInt64) -> FixedArray[Byte]

    Compute the 6-byte truncated SHA-256 signature for the given unsigned frame bytes (STX through CRC, inclusive), link_id, and 48-bit timestamp.

    crc16_calculate

    fn crc16_calculate(data : Bytes) -> UInt

    Compute the X.25 CRC-16 over a byte buffer.

    crc16_calculate_with_extra

    fn crc16_calculate_with_extra(data : Bytes, crc_extra : Byte) -> UInt

    Compute the MAVLink frame checksum over header/payload bytes plus the message crc_extra byte.

    decode_frame

    fn decode_frame(wire : Bytes, crc_extra_lookup : (UInt) -> Byte?, start? : Int, signing? : SigningContext?) -> Result[(MavFrame, Int), MavError]

    Decode a single MAVLink v1 or v2 frame from wire starting at byte offset start. Returns (decoded_frame, bytes_consumed) on success.

    decode_tlog_stream

    fn decode_tlog_stream(data : Bytes, crc_extra_lookup : (UInt) -> Byte?, signing? : SigningContext?) -> Result[Array[TlogEntry], MavError]

    Decode a complete QGroundControl / MissionPlanner .tlog binary byte stream into an ordered array of TlogEntry records.

    encode_frame

    fn encode_frame(header : MavHeader, raw_payload : Bytes, crc_extra : Byte, truncate_v2_zeros? : Bool, signing? : SigningContext?) -> Result[(Bytes, MavFrame), MavError]

    Encode a MAVLink v1 or v2 packet into wire bytes, computing the X.25 CRC-16 with crc_extra and optionally appending a 13-byte MAVLink v2 signature when signing is provided.

    encode_tlog_entry

    fn encode_tlog_entry(timestamp_usec : UInt64, wire_frame : Bytes) -> Bytes

    Encode a single QGroundControl .tlog binary record: 8-byte Big-Endian UNIX timestamp in microseconds (uint64_t BE) followed by the raw MAVLink wire frame.

    enum_entry_variant_name

    fn enum_entry_variant_name(enum_name : String, entry_name : String) -> String

    Convert an enum entry name into a clean PascalCase variant name by stripping a redundant ENUM_NAME_ prefix when present.

    evaluate_noisy_stream_recovery

    fn evaluate_noisy_stream_recovery(frame_count : Int, noise_bytes_per_frame : Int, max_chunk_size : Int) -> NoisyStreamStressReport

    Run a deterministic streaming stress benchmark on FrameParser with inter-frame noise bursts (including false 0xFD/0xFE magic bytes), simulated packet drops, and variable chunk fragmentation.

    evaluate_signing_security_audit

    fn evaluate_signing_security_audit() -> SigningSecurityAuditReport

    Run a 100-frame FIPS 180-4 SHA-256 signing session and inject 50 adversarial attack frames (15 replay attacks, 15 timestamp rollback attacks, 10 wrong-key attacks, 10 payload-tamper attacks).

    evaluate_v1_vs_v2_efficiency

    fn evaluate_v1_vs_v2_efficiency() -> ProtocolComparisonReport

    Compare MAVLink v1 vs MAVLink v2 wire footprint across a 100-frame flight control batch (showing that v2 trailing-zero truncation overcomes the +4B v2 header overhead).

    evaluate_zero_trimming_bandwidth

    fn evaluate_zero_trimming_bandwidth() -> ZeroTrimmingBandwidthReport

    Run a deterministic 10-second PX4 flight telemetry benchmark to measure exact MAVLink v2 trailing-zero truncation bandwidth savings across realistic message distributions.

    extract_message_target

    fn extract_message_target(msg : MavMessage) -> (Byte, Byte)?

    Extract the destination (target_system, target_component) pair from a MavMessage if the message type carries explicit target addressing; returns None for broadcast telemetry messages (such as HEARTBEAT, ATTITUDE, GPS_RAW_INT, STATUSTEXT).

    field_moonbit_type

    fn field_moonbit_type(ft : MavFieldType) -> String

    Map a MavFieldType to its idiomatic MoonBit type annotation.

    filter_tlog_by_msgid

    fn filter_tlog_by_msgid(entries : Array[TlogEntry], msgid : UInt) -> Array[TlogEntry]

    Filter .tlog entries matching a specific 24-bit MAVLink msgid.

    filter_tlog_by_time_range

    fn filter_tlog_by_time_range(entries : Array[TlogEntry], start_usec : UInt64, end_usec : UInt64) -> Array[TlogEntry]

    Filter .tlog entries within the inclusive timestamp interval [start_usec, end_usec].

    generate_moonbit_code

    fn generate_moonbit_code(schema : DialectSchema) -> String

    Generate complete, self-contained MoonBit source code (.mbt) for a DialectSchema, including strongly typed enums, message structs, wire-reordered payload encoders/decoders, CRC_EXTRA lookup table, and top-level MavMessage frame router.

    generate_moonbit_from_xml

    fn generate_moonbit_from_xml(xml_text : String) -> Result[(DialectSchema, String), MavError]

    Parse an official MAVLink XML string and generate MoonBit source code in one step.

    generate_moonbit_from_xml_with_includes

    fn generate_moonbit_from_xml_with_includes(root_file_name : String, xml_resolver : (String) -> String?) -> Result[(DialectSchema, String), MavError]

    Recursively parse a root MAVLink XML dialect and all transitive <include> files, then generate complete MoonBit source code for the unified dialect.

    lookup_message_crc_extra

    fn lookup_message_crc_extra(msgid : UInt) -> Byte?

    Look up the precomputed CRC_EXTRA byte for a known MAVLink message ID.

    lookup_message_name

    fn lookup_message_name(msgid : UInt) -> String?

    Look up the official MAVLink message name for a known message ID.

    merge_dialect_schemas

    fn merge_dialect_schemas(base : DialectSchema, child : DialectSchema) -> Result[DialectSchema, MavError]

    Merge an included base DialectSchema with an extending child DialectSchema according to the official MAVLink <include> inheritance rules:
    • Enums with the same name have their entries merged; conflicting entry values with different names return Err(SchemaError(_)).
    • Messages from base and child are combined; duplicate message IDs across files return Err(SchemaError(_)).

    official_45_golden_table

    fn official_45_golden_table() -> Array[GoldenDialectEntry]

    Official C c_library_v2 / pymavlink golden metadata table for all 45 built-in messages.

    official_60_golden_table

    fn official_60_golden_table() -> Array[GoldenDialectEntry]

    Official C c_library_v2 / pymavlink golden metadata table for all 60 built-in messages.

    official_minimal_xml

    let official_minimal_xml : String

    Official MAVLink v2 minimal.xml specification (Enums + HEARTBEAT #0), used for <include>minimal.xml</include> multi-file dialect resolution tests.

    official_standard_xml

    let official_standard_xml : String

    Official MAVLink v2 standard XML message definitions (minimal.xml + common.xml 18 enums and 45 core messages) used both for code generation (standard_dialect.mbt) and runtime self-hosting verification.

    parse_dialect_xml

    fn parse_dialect_xml(xml_text : String) -> Result[DialectSchema, MavError]

    Parse an official MAVLink XML message definition document (<mavlink>...</mavlink>) into a validated DialectSchema.

    parse_dialect_xml_with_includes

    fn parse_dialect_xml_with_includes(root_file_name : String, xml_resolver : (String) -> String?) -> Result[DialectSchema, MavError]

    Recursively parse a root MAVLink XML dialect and all transitive <include> files using xml_resolver(file_name) -> String?.

    Features:
    • Depth-first topological <include> resolution (e.g. ardupilotmega.xml -> common.xml -> minimal.xml)
    • Diamond dependency deduplication (shared base files like minimal.xml are merged only once)
    • Deterministic cycle detection (a.xml -> b.xml -> a.xml returns Err(SchemaError(_)))

    parse_mav_field_type

    fn parse_mav_field_type(wire_type : String) -> Result[MavFieldType, MavError]

    Parse a MAVLink XML type attribute string into MavFieldType.

    parse_wire_type_spec

    fn parse_wire_type_spec(wire_type : String) -> Result[(String, Int, Int), MavError]

    Parse a MAVLink type string (e.g. "uint16_t[4]" or "uint8_t_mavlink_version") into (normalized_base_type, element_size_bytes, array_len). For scalar fields, array_len is 0.

    primitive_moonbit_type

    fn primitive_moonbit_type(prim : MavPrimitiveType) -> String

    Map a MavPrimitiveType to its MoonBit scalar type name.

    primitive_type_size

    fn primitive_type_size(base_type : String) -> Result[Int, MavError]

    Return the element byte width of a MAVLink primitive type name.

    resolve_message_layout

    fn resolve_message_layout(id : UInt, name : String, description : String, raw_fields : Array[XmlFieldDef]) -> Result[XmlMessageDef, MavError]

    Resolve the MAVLink wire layout, field offsets, payload lengths, and CRC_EXTRA for a message definition.

    sanitize_field_name

    fn sanitize_field_name(name : String) -> String

    Sanitize a MAVLink XML field name so that MoonBit reserved keywords (such as type) become valid struct field identifiers.

    sanitize_type_name

    fn sanitize_type_name(pascal_name : String) -> String

    Ensure generated enum or message struct names do not collide with core protocol types or standard library trait/type identifiers (such as Debug from MAVLink DEBUG #254).

    sha256_digest

    fn sha256_digest(input : Bytes) -> FixedArray[Byte]

    Compute the 32-byte SHA-256 digest of input (FIPS 180-4).

    to_pascal_case

    fn to_pascal_case(raw : String) -> String

    Convert an UPPER_SNAKE_CASE or snake_case identifier to PascalCase.

    truncate_trailing_zeros

    fn truncate_trailing_zeros(payload : Bytes) -> Bytes

    Apply MAVLink v2 trailing zero-byte truncation to an existing Bytes payload.