Skip to content
Hamish Willee edited this page Jun 8, 2023 · 1 revision

Schema Overview

This provides an overview of the structure of a MAVLink XML file.

Next to the tag or attribute name, the superscript is a regular expression that indicates how many elements might be present. For example * means "0 or more", + means "1 or more", {m,n} indicates either in the range of m and n elements, {m} indicates "m" elements required.

The high level stucture of MAVLink XML is:

  • mavlink
    • include*: Files build into library with this file.
    • version{0,1}: Common message version number
    • dialect{0,1}: Dialect version number
    • enums{0,1}
      • enum* (The MAV_CMDenum defines commands and mission items as entry values)
        • entry*
          • param* (only in MAV_CMD enum)
    • messages{0,1}
      • message*

Enums can have the following attributes and entries. Note that only the enum with name MAV_CMD has entry values that have param values, so they are not shown.

  • enum
    • (attributes):
      • name{1}
      • bitmask{0,1} (true | false)
    • (wip | deprecated) {0,1}
    • description
    • entry*
      • (attributes):
        • value{1} (id)
        • name{1}
      • description{0,1}
      • (wip | deprecated){0,1}:

MAV_CMD are defined in an enum with name="MAV_CMD" and value="16". Each MAV_CMD is its own entry.

entry:

  • (attributes)

    • value{1} (an id number)
    • name{1}
    • (hasLocation | isDestination) {0,1}
  • (wip | deprecated) {0,1}

  • description {1}

  • param {0,7}

    • description {1}
    • attributes
      • index{1} [1-7]
      • label{0,1}
      • units{0,1}
      • enum{0,1}
      • decimalPlaces{0,1}
      • increment{0,1}
      • minValue{0,1}
      • maxValue{0,1}
      • reserved{0,1} (for future use, default false)
      • default{0,1} (default value of 0 or NaN, intended for reserved params).

Each message has the following form.

  • message*
    • (attributes)
      • id{1}
      • name{0,1}
    • (wip | deprecated) {0,1}
    • description{1}
    • field+
      • (attributes)
        • type{1}
        • name{1}
        • enum{0,1} (or units)
        • display{0,1} ('bitmask')
        • units{0,1}
        • print_format{0,1} (?)
        • default{0,1} (?)
        • instance{0,1}
        • invalid{0,1}
      • (tag content) A description
Clone this wiki locally