mavlink-message-definitions 0.6.7

MAVLink message definitions in MAVInspect format
Documentation
<?xml version="1.0"?>
<mavlink>
    <include>../standard/minimal.xml</include>
    <version>0</version>
    <dialect>0</dialect>
    <!-- ######################################################################
                                    Enums
    ####################################################################### -->
    <enums>
        <!-- ==================================================================
                                    Standard enums
        =================================================================== -->
        <enum name="SMALL_ENUM">
            <description>Small enum that fits into `u8`.</description>
            <entry name="SMALL_ENUM_FIRST" value="0">
                <description>First entry</description>
            </entry>
            <entry name="SMALL_ENUM_SECOND" value="1">
                <description>Second entry</description>
            </entry>
            <entry name="SMALL_ENUM_THIRD" value="2">
                <description>Third entry</description>
            </entry>
            <entry name="SMALL_ENUM_FOURTH" value="3">
                <description>Fourth entry</description>
            </entry>
        </enum>
        <enum name="LARGE_ENUM">
            <description>Large enum that requires larger container type size.</description>
            <entry name="SMALL_ENUM_FIRST" value="0">
                <description>First entry</description>
            </entry>
            <entry name="SMALL_ENUM_SECOND" value="256">
                <description>Second entry</description>
            </entry>
            <entry name="SMALL_ENUM_THIRD" value="65536">
                <description>Third entry</description>
            </entry>
            <entry name="SMALL_ENUM_FOURTH" value="4294967295">
                <description>Fourth entry</description>
            </entry>
        </enum>
        <!-- ==================================================================
                                    Bitmasks
        =================================================================== -->
        <enum name="SMALL_BITMASK" bitmask="true">
            <description>Small bitmask that fits into `u8`.</description>
            <entry name="SMALL_BITMASK_FIRST" value="1">
                <description>8th bit: 00000001.</description>
            </entry>
            <entry name="SMALL_BITMASK_SECOND" value="2">
                <description>7th bit: 00000010.</description>
            </entry>
            <entry name="SMALL_BITMASK_THIRD" value="4">
                <description>6th bit: 00000100.</description>
            </entry>
            <entry name="SMALL_BITMASK_FOURTH" value="8">
                <description>5th bit: 00001000.</description>
            </entry>
        </enum>
        <enum name="LARGE_BITMASK" bitmask="true">
            <description>Large bitmask that requires larger container type size.</description>
            <entry name="LARGE_BITMASK_FIRST" value="1">
                <description>32nd bit: 00000000 00000000 00000000 00000001.</description>
            </entry>
            <entry name="LARGE_BITMASK_SECOND" value="256">
                <description>24rd bit: 00000000 00000000 00000001 00000000.</description>
            </entry>
            <entry name="LARGE_BITMASK_THIRD" value="65536">
                <description>16th bit: 00000000 00000001 00000000 00000000.</description>
            </entry>
            <entry name="LARGE_BITMASK_FOURTH" value="16777216">
                <description>8th bit: 00000001 00000000 00000000 00000000.</description>
            </entry>
        </enum>
        <!-- ==================================================================
                        Enums with names that start with digit
        =================================================================== -->
        <enum name="1ST_CLASS_CITIZEN">
            <description>Enum with a peculiar name that starts with a numeric character.</description>
            <entry name="1ST_CLASS_CITIZEN_1ST_OPTION" value="0">
                <description>Enum entry that starts with a numeric character</description>
            </entry>
        </enum>
        <enum name="2ND_CHANCE_FLAGS" bitmask="true">
            <description>Bitmask with a peculiar name that starts with a numeric character.</description>
            <entry name="2ND_CHANCE_FLAGS_1ST_FLAG" value="1">
                <description>Bitmask flag that starts with a numeric character</description>
            </entry>
        </enum>
        <!-- ==================================================================
                            Enums to test naming collisions
        =================================================================== -->
        <enum name="DEBUG">
            <description>Enum to test collision with `Debug`.</description>
            <entry name="DEBUG_DEBUG" value="0">
                <description>Enum entry to test collision with `Debug`</description>
            </entry>
            <entry name="DEBUG_CLONE" value="1">
                <description>Enum entry to test collision with `Clone`</description>
            </entry>
            <entry name="DEBUG_DEFAULT" value="2">
                <description>Enum entry to test collision with `Default`</description>
            </entry>
        </enum>
        <enum name="CLONE" bitmask="true">
            <description>Bitmask to test collision with `Clone`.</description>
            <entry name="CLONE_FLAG_1" value="1">
                <description>First flag</description>
            </entry>
        </enum>
        <enum name="COPY" bitmask="true">
            <description>Bitmask to test collision with `Copy`.</description>
            <entry name="COPY_FLAG_1" value="1">
                <description>First flag</description>
            </entry>
        </enum>
        <enum name="DEFAULT" bitmask="true">
            <description>Bitmask to test collision with `Default`.</description>
            <entry name="DEFAULT_FLAG_1" value="1">
                <description>First flag</description>
            </entry>
        </enum>
        <enum name="FROM">
            <description>Enum to test collision with `From`.</description>
            <entry name="FROM_FLAG_1" value="1">
                <description>First flag</description>
            </entry>
        </enum>
        <enum name="TRY_FROM">
            <description>Enum to test collision with `TryFrom`.</description>
            <entry name="TRY_FROM_FLAG_1" value="1">
                <description>First flag</description>
            </entry>
        </enum>
        <enum name="INTO">
            <description>Enum to test collision with `Into`.</description>
            <entry name="INTO_FLAG_1" value="1">
                <description>First flag</description>
            </entry>
        </enum>
        <enum name="TRY_INTO">
            <description>Enum to test collision with `TryInto`.</description>
            <entry name="TRY_INTO_FLAG_1" value="1">
                <description>First flag</description>
            </entry>
        </enum>
    </enums>
    <!-- ######################################################################
                                    Messages
    ####################################################################### -->
    <messages>
        <!-- ==================================================================
                                MAVLink 1 message
        =================================================================== -->
        <message id="255" name="MAV_INSPECT_V1">
            <description>MAVInspect message compatible with MAVLink 1</description>
            <field type="uint8_t" name="plain_uint8">Plain `uint8_t` value.</field>
            <field type="int16_t" name="plain_int16">Plain `int16_t` value.</field>
            <field type="uint16_t[4]" name="small_array">Array of 4 `uint16_t`.</field>
            <field type="uint16_t[40]" name="large_array">Array of 4 `uint16_t`.</field>
            <!-- Enums -->
            <field type="uint8_t" name="small_enum_native" enum="SMALL_ENUM">Small enum in native container type.
            </field>
            <field type="int8_t" name="small_enum_signed" enum="SMALL_ENUM">Small enum in signed container of native
                size.
            </field>
            <field type="uint32_t" name="small_enum_scaled" enum="SMALL_ENUM">Small enum in larger container type.
            </field>
            <field type="int32_t" name="small_enum_scaled_signed" enum="SMALL_ENUM">Small enum in larger signed
                container type.
            </field>
            <field type="uint8_t[2]" name="small_enum_small_array" enum="SMALL_ENUM">Small enum in small array.</field>
            <field type="uint16_t[2]" name="small_enum_small_array_scaled" enum="SMALL_ENUM">Small enum in small array
                of larger container types.
            </field>
            <field type="uint8_t[40]" name="small_enum_large_array" enum="SMALL_ENUM">Small enum in large array.</field>
            <field type="uint32_t" name="large_enum" enum="LARGE_ENUM">Large enum.</field>
            <field type="uint32_t[2]" name="large_enum_array" enum="LARGE_ENUM">Large enum array.</field>
            <!-- Bitmasks -->
            <field type="uint8_t" name="small_bitmask_native" enum="SMALL_BITMASK">Small bitmask in native container
                type.
            </field>
            <field type="int8_t" name="small_bitmask_signed" enum="SMALL_BITMASK">Small bitmask in signed container of
                native size.
            </field>
            <field type="uint32_t" name="small_bitmask_scaled" enum="SMALL_BITMASK">Small bitmask in larger container
                type.
            </field>
            <field type="int32_t" name="small_bitmask_scaled_signed" enum="SMALL_BITMASK">Small bitmask in larger signed
                container type.
            </field>
            <field type="uint8_t[2]" name="small_bitmask_small_array" enum="SMALL_BITMASK">Small bitmask in small
                array.
            </field>
            <field type="uint8_t[40]" name="small_bitmask_large_array" enum="SMALL_BITMASK">Small bitmask in large
                array.
            </field>
            <field type="uint32_t" name="large_bitmask" enum="LARGE_BITMASK">Large bitmask.</field>
            <!-- Naming edge cases -->
            <field type="uint8_t" name="1st_class_citizen" enum="1ST_CLASS_CITIZEN">Field that starts with a numeric
                character (enum).
            </field>
            <field type="uint8_t" name="2nd_chance_flags" enum="2ND_CHANCE_FLAGS">Field that starts with a numeric
                character (bitmask).
            </field>
            <field type="uint8_t" name="type">Field has a Rust keyword name.</field>
            <extensions/>
            <field type="uint8_t" name="extension_uint8">Extension with primitive type `uint8_t`.</field>
            <field type="uint16_t[4]" name="extension_uint16_4" enum="SMALL_ENUM">Extension with array type
                `uint16_t[4]`.
            </field>
        </message>
        <!-- ==================================================================
                                MAVLink 2 message
        =================================================================== -->
        <message id="40042" name="MAV_INSPECT_V2">
            <description>MAVInspect message compatible with MAVLink 2</description>
            <field type="uint8_t" name="plain_uint8">Plain `uint8_t` value.</field>
            <field type="int16_t" name="plain_int16">Plain `int16_t` value.</field>
            <field type="uint16_t[4]" name="small_array">Array of 4 `uint16_t`.</field>
            <field type="uint16_t[40]" name="large_array">Array of 4 `uint16_t`.</field>
            <!-- Enums -->
            <field type="uint8_t" name="small_enum_native" enum="SMALL_ENUM">Small enum in native container type.
            </field>
            <field type="int8_t" name="small_enum_signed" enum="SMALL_ENUM">Small enum in signed container of native
                size.
            </field>
            <field type="uint32_t" name="small_enum_scaled" enum="SMALL_ENUM">Small enum in larger container type.
            </field>
            <field type="int32_t" name="small_enum_scaled_signed" enum="SMALL_ENUM">Small enum in larger signed
                container type.
            </field>
            <field type="uint8_t[2]" name="small_enum_small_array" enum="SMALL_ENUM">Small enum in small array.</field>
            <field type="uint16_t[2]" name="small_enum_small_array_scaled" enum="SMALL_ENUM">Small enum in small array
                of larger container types.
            </field>
            <field type="uint8_t[40]" name="small_enum_large_array" enum="SMALL_ENUM">Small enum in large array.</field>
            <field type="uint32_t" name="large_enum" enum="LARGE_ENUM">Large enum.</field>
            <field type="uint32_t[2]" name="large_enum_array" enum="LARGE_ENUM">Large enum array.</field>
            <!-- Bitmasks -->
            <field type="uint8_t" name="small_bitmask_native" enum="SMALL_BITMASK">Small bitmask in native container
                type.
            </field>
            <field type="int8_t" name="small_bitmask_signed" enum="SMALL_BITMASK">Small bitmask in signed container of
                native size.
            </field>
            <field type="uint32_t" name="small_bitmask_scaled" enum="SMALL_BITMASK">Small bitmask in larger container
                type.
            </field>
            <field type="int32_t" name="small_bitmask_scaled_signed" enum="SMALL_BITMASK">Small bitmask in larger signed
                container type.
            </field>
            <field type="uint8_t[2]" name="small_bitmask_small_array" enum="SMALL_BITMASK">Small bitmask in small
                array.
            </field>
            <field type="uint8_t[40]" name="small_bitmask_large_array" enum="SMALL_BITMASK">Small bitmask in large
                array.
            </field>
            <field type="uint32_t" name="large_bitmask" enum="LARGE_BITMASK">Large bitmask.</field>
            <!-- Naming edge cases -->
            <field type="uint8_t" name="1st_class_citizen" enum="1ST_CLASS_CITIZEN">Field that starts with a numeric
                character (enum).
            </field>
            <field type="uint8_t" name="2nd_chance_flags" enum="2ND_CHANCE_FLAGS">Field that starts with a numeric
                character (bitmask).
            </field>
            <field type="uint8_t" name="type">Field has a Rust keyword name.</field>
            <extensions/>
            <field type="uint8_t" name="extension_uint8">Extension with primitive type `uint8_t`.</field>
            <field type="uint16_t[4]" name="extension_uint16_4" enum="SMALL_ENUM">Extension with array type
                `uint16_t[4]`.
            </field>
        </message>
        <!-- ==================================================================
                         Messages to test naming collisions
        =================================================================== -->
        <message id="254" name="DEBUG">
            <description>MAVInspect message to test collision with `Debug`</description>
            <field type="uint8_t" name="debug" enum="DEBUG">Field that refers to reserved `Debug` name.</field>
            <field type="uint8_t" name="clone" enum="CLONE">Field that refers to reserved `Clone` name.</field>
            <field type="uint8_t" name="copy" enum="COPY">Field that refers to reserved `Copy` name.</field>
            <field type="uint8_t" name="default" enum="DEFAULT">Field that refers to reserved `Clone` name.</field>
            <field type="uint8_t" name="from" enum="FROM">Field that refers to reserved `From` name.</field>
            <field type="uint8_t" name="try_from" enum="TRY_FROM">Field that refers to reserved `TryFrom` name.</field>
            <field type="uint8_t" name="into" enum="INTO">Field that refers to reserved `Into` name.</field>
            <field type="uint8_t" name="try_into" enum="TRY_INTO">Field that refers to reserved `TryInto` name.</field>
        </message>
        <message id="253" name="CLONE">
            <description>MAVInspect message to test collision with `Clone`</description>
            <field type="uint8_t" name="clone" enum="CLONE">Field that refers to reserved `Clone` name.</field>
        </message>
        <message id="252" name="DEFAULT">
            <description>MAVInspect message to test collision with `Clone`</description>
            <field type="uint8_t" name="default" enum="DEFAULT">Field that refers to reserved `Clone` name.</field>
        </message>
        <message id="251" name="FROM">
            <description>MAVInspect message to test collision with `From`</description>
            <field type="uint8_t" name="from" enum="FROM">Field that refers to reserved `From` name.</field>
        </message>
        <message id="250" name="TRY_FROM">
            <description>MAVInspect message to test collision with `TryFrom`</description>
            <field type="uint8_t" name="try_from" enum="TRY_FROM">Field that refers to reserved `TryFrom` name.</field>
        </message>
        <message id="249" name="INTO">
            <description>MAVInspect message to test collision with `Into`</description>
            <field type="uint8_t" name="into" enum="INTO">Field that refers to reserved `Into` name.</field>
        </message>
        <message id="248" name="TRY_INTO">
            <description>MAVInspect message to test collision with `TryInto`</description>
            <field type="uint8_t" name="try_into" enum="TRY_INTO">Field that refers to reserved `TryInto` name.</field>
        </message>
        <message id="247" name="COPY">
            <description>MAVInspect message to test collision with `Copy`</description>
            <field type="uint8_t" name="copy" enum="COPY">Field that refers to reserved `Copy` name.</field>
        </message>
        <message id="246" name="1ST_CLASS_MESSAGE">
            <description>MAVInspect message to test messages which starts from numeric character</description>
            <field type="uint8_t" name="1st_class_citizen" enum="1ST_CLASS_CITIZEN">Field that starts from numeric
                character.
            </field>
        </message>
    </messages>
</mavlink>