import latest MAVLink 1.0 headers and XML

This commit is contained in:
Andrew Tridgell 2011-10-24 12:20:46 +11:00
parent 0c672d6885
commit 14f8c71932
13 changed files with 103 additions and 27 deletions

View File

@ -5,7 +5,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Mon Oct 24 09:45:38 2011"
#define MAVLINK_BUILD_DATE "Mon Oct 24 11:51:38 2011"
#define MAVLINK_WIRE_PROTOCOL_VERSION "1.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 101

View File

@ -300,6 +300,51 @@ enum MAV_CMD_ACK
MAV_CMD_ACK_ENUM_END=10, /* | */
};
/** @brief type of a mavlink parameter */
enum MAV_VAR
{
MAV_VAR_FLOAT=0, /* 32 bit float | */
MAV_VAR_UINT8=1, /* 8 bit unsigned integer | */
MAV_VAR_INT8=2, /* 8 bit signed integer | */
MAV_VAR_UINT16=3, /* 16 bit unsigned integer | */
MAV_VAR_INT16=4, /* 16 bit signed integer | */
MAV_VAR_UINT32=5, /* 32 bit unsigned integer | */
MAV_VAR_INT32=6, /* 32 bit signed integer | */
MAV_VAR_ENUM_END=7, /* | */
};
/** @brief result from a mavlink command */
enum MAV_RESULT
{
MAV_RESULT_ACCEPTED=0, /* Command ACCEPTED and EXECUTED | */
MAV_RESULT_TEMPORARILY_REJECTED=1, /* Command TEMPORARY REJECTED/DENIED | */
MAV_RESULT_DENIED=2, /* Command PERMANENTLY DENIED | */
MAV_RESULT_UNSUPPORTED=3, /* Command UNKNOWN/UNSUPPORTED | */
MAV_RESULT_FAILED=4, /* Command executed, but failed | */
MAV_RESULT_ENUM_END=5, /* | */
};
/** @brief result in a mavlink mission ack */
enum MAV_MISSION_RESULT
{
MAV_MISSION_ACCEPTED=0, /* mission accepted OK | */
MAV_MISSION_ERROR=1, /* generic error / not accepting mission commands at all right now | */
MAV_MISSION_UNSUPPORTED_FRAME=2, /* coordinate frame is not supported | */
MAV_MISSION_UNSUPPORTED=3, /* command is not supported | */
MAV_MISSION_NO_SPACE=4, /* mission item exceeds storage space | */
MAV_MISSION_INVALID=5, /* one of the parameters has an invalid value | */
MAV_MISSION_INVALID_PARAM1=6, /* param1 has an invalid value | */
MAV_MISSION_INVALID_PARAM2=7, /* param2 has an invalid value | */
MAV_MISSION_INVALID_PARAM3=8, /* param3 has an invalid value | */
MAV_MISSION_INVALID_PARAM4=9, /* param4 has an invalid value | */
MAV_MISSION_INVALID_PARAM5_X=10, /* x/param5 has an invalid value | */
MAV_MISSION_INVALID_PARAM6_Y=11, /* y/param6 has an invalid value | */
MAV_MISSION_INVALID_PARAM7=12, /* param7 has an invalid value | */
MAV_MISSION_INVALID_SEQUENCE=13, /* received waypoint out of sequence | */
MAV_MISSION_DENIED=14, /* not accepting any mission commands from this communication partner | */
MAV_MISSION_RESULT_ENUM_END=15, /* | */
};
// MESSAGE DEFINITIONS
#include "./mavlink_msg_heartbeat.h"
#include "./mavlink_msg_sys_status.h"

View File

@ -5,7 +5,7 @@
typedef struct __mavlink_command_ack_t
{
uint16_t command; ///< Command ID, as defined by MAV_CMD enum.
uint8_t result; ///< 1: Command ACCEPTED and EXECUTED, 1: Command TEMPORARY REJECTED/DENIED, 2: Command PERMANENTLY DENIED, 3: Command UNKNOWN/UNSUPPORTED, 4: Command executed, but failed
uint8_t result; ///< See MAV_RESULT enum
} mavlink_command_ack_t;
#define MAVLINK_MSG_ID_COMMAND_ACK_LEN 3
@ -29,7 +29,7 @@ typedef struct __mavlink_command_ack_t
* @param msg The MAVLink message to compress the data into
*
* @param command Command ID, as defined by MAV_CMD enum.
* @param result 1: Command ACCEPTED and EXECUTED, 1: Command TEMPORARY REJECTED/DENIED, 2: Command PERMANENTLY DENIED, 3: Command UNKNOWN/UNSUPPORTED, 4: Command executed, but failed
* @param result See MAV_RESULT enum
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_command_ack_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
@ -60,7 +60,7 @@ static inline uint16_t mavlink_msg_command_ack_pack(uint8_t system_id, uint8_t c
* @param chan The MAVLink channel this message was sent over
* @param msg The MAVLink message to compress the data into
* @param command Command ID, as defined by MAV_CMD enum.
* @param result 1: Command ACCEPTED and EXECUTED, 1: Command TEMPORARY REJECTED/DENIED, 2: Command PERMANENTLY DENIED, 3: Command UNKNOWN/UNSUPPORTED, 4: Command executed, but failed
* @param result See MAV_RESULT enum
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_command_ack_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
@ -103,7 +103,7 @@ static inline uint16_t mavlink_msg_command_ack_encode(uint8_t system_id, uint8_t
* @param chan MAVLink channel to send the message
*
* @param command Command ID, as defined by MAV_CMD enum.
* @param result 1: Command ACCEPTED and EXECUTED, 1: Command TEMPORARY REJECTED/DENIED, 2: Command PERMANENTLY DENIED, 3: Command UNKNOWN/UNSUPPORTED, 4: Command executed, but failed
* @param result See MAV_RESULT enum
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
@ -142,7 +142,7 @@ static inline uint16_t mavlink_msg_command_ack_get_command(const mavlink_message
/**
* @brief Get field result from command_ack message
*
* @return 1: Command ACCEPTED and EXECUTED, 1: Command TEMPORARY REJECTED/DENIED, 2: Command PERMANENTLY DENIED, 3: Command UNKNOWN/UNSUPPORTED, 4: Command executed, but failed
* @return See MAV_RESULT enum
*/
static inline uint8_t mavlink_msg_command_ack_get_result(const mavlink_message_t* msg)
{

View File

@ -6,7 +6,7 @@ typedef struct __mavlink_mission_ack_t
{
uint8_t target_system; ///< System ID
uint8_t target_component; ///< Component ID
uint8_t type; ///< 0: OK, 1: generic error / not accepting mission commands at all right now, 2: coordinate frame is not supported, 3: command is not supported, 4: mission item exceeds storage space, 5: one of the parameters has an invalid value, 6: param1 has an invalid value, 7: param2 has an invalid value, 8: param3 has an invalid value, 9: param4 has an invalid value, 10: x/param5 has an invalid value, 11: y:param6 has an invalid value, 12: z:param7 has an invalid value, 13: received waypoint out of sequence, 14: not accepting any mission commands from this communication partner
uint8_t type; ///< See MAV_MISSION_RESULT enum
} mavlink_mission_ack_t;
#define MAVLINK_MSG_ID_MISSION_ACK_LEN 3
@ -32,7 +32,7 @@ typedef struct __mavlink_mission_ack_t
*
* @param target_system System ID
* @param target_component Component ID
* @param type 0: OK, 1: generic error / not accepting mission commands at all right now, 2: coordinate frame is not supported, 3: command is not supported, 4: mission item exceeds storage space, 5: one of the parameters has an invalid value, 6: param1 has an invalid value, 7: param2 has an invalid value, 8: param3 has an invalid value, 9: param4 has an invalid value, 10: x/param5 has an invalid value, 11: y:param6 has an invalid value, 12: z:param7 has an invalid value, 13: received waypoint out of sequence, 14: not accepting any mission commands from this communication partner
* @param type See MAV_MISSION_RESULT enum
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_mission_ack_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
@ -66,7 +66,7 @@ static inline uint16_t mavlink_msg_mission_ack_pack(uint8_t system_id, uint8_t c
* @param msg The MAVLink message to compress the data into
* @param target_system System ID
* @param target_component Component ID
* @param type 0: OK, 1: generic error / not accepting mission commands at all right now, 2: coordinate frame is not supported, 3: command is not supported, 4: mission item exceeds storage space, 5: one of the parameters has an invalid value, 6: param1 has an invalid value, 7: param2 has an invalid value, 8: param3 has an invalid value, 9: param4 has an invalid value, 10: x/param5 has an invalid value, 11: y:param6 has an invalid value, 12: z:param7 has an invalid value, 13: received waypoint out of sequence, 14: not accepting any mission commands from this communication partner
* @param type See MAV_MISSION_RESULT enum
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_mission_ack_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
@ -112,7 +112,7 @@ static inline uint16_t mavlink_msg_mission_ack_encode(uint8_t system_id, uint8_t
*
* @param target_system System ID
* @param target_component Component ID
* @param type 0: OK, 1: generic error / not accepting mission commands at all right now, 2: coordinate frame is not supported, 3: command is not supported, 4: mission item exceeds storage space, 5: one of the parameters has an invalid value, 6: param1 has an invalid value, 7: param2 has an invalid value, 8: param3 has an invalid value, 9: param4 has an invalid value, 10: x/param5 has an invalid value, 11: y:param6 has an invalid value, 12: z:param7 has an invalid value, 13: received waypoint out of sequence, 14: not accepting any mission commands from this communication partner
* @param type See MAV_MISSION_RESULT enum
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
@ -163,7 +163,7 @@ static inline uint8_t mavlink_msg_mission_ack_get_target_component(const mavlink
/**
* @brief Get field type from mission_ack message
*
* @return 0: OK, 1: generic error / not accepting mission commands at all right now, 2: coordinate frame is not supported, 3: command is not supported, 4: mission item exceeds storage space, 5: one of the parameters has an invalid value, 6: param1 has an invalid value, 7: param2 has an invalid value, 8: param3 has an invalid value, 9: param4 has an invalid value, 10: x/param5 has an invalid value, 11: y:param6 has an invalid value, 12: z:param7 has an invalid value, 13: received waypoint out of sequence, 14: not accepting any mission commands from this communication partner
* @return See MAV_MISSION_RESULT enum
*/
static inline uint8_t mavlink_msg_mission_ack_get_type(const mavlink_message_t* msg)
{

View File

@ -8,7 +8,7 @@ typedef struct __mavlink_param_set_t
uint8_t target_system; ///< System ID
uint8_t target_component; ///< Component ID
char param_id[16]; ///< Onboard parameter id
uint8_t param_type; ///< Onboard parameter type: 0: float, 1: uint8_t, 2: int8_t, 3: uint16_t, 4: int16_t, 5: uint32_t, 6: int32_t
uint8_t param_type; ///< Onboard parameter type: see MAV_VAR enum
} mavlink_param_set_t;
#define MAVLINK_MSG_ID_PARAM_SET_LEN 23
@ -38,7 +38,7 @@ typedef struct __mavlink_param_set_t
* @param target_component Component ID
* @param param_id Onboard parameter id
* @param param_value Onboard parameter value
* @param param_type Onboard parameter type: 0: float, 1: uint8_t, 2: int8_t, 3: uint16_t, 4: int16_t, 5: uint32_t, 6: int32_t
* @param param_type Onboard parameter type: see MAV_VAR enum
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_param_set_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
@ -76,7 +76,7 @@ static inline uint16_t mavlink_msg_param_set_pack(uint8_t system_id, uint8_t com
* @param target_component Component ID
* @param param_id Onboard parameter id
* @param param_value Onboard parameter value
* @param param_type Onboard parameter type: 0: float, 1: uint8_t, 2: int8_t, 3: uint16_t, 4: int16_t, 5: uint32_t, 6: int32_t
* @param param_type Onboard parameter type: see MAV_VAR enum
* @return length of the message in bytes (excluding serial stream start sign)
*/
static inline uint16_t mavlink_msg_param_set_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
@ -126,7 +126,7 @@ static inline uint16_t mavlink_msg_param_set_encode(uint8_t system_id, uint8_t c
* @param target_component Component ID
* @param param_id Onboard parameter id
* @param param_value Onboard parameter value
* @param param_type Onboard parameter type: 0: float, 1: uint8_t, 2: int8_t, 3: uint16_t, 4: int16_t, 5: uint32_t, 6: int32_t
* @param param_type Onboard parameter type: see MAV_VAR enum
*/
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
@ -199,7 +199,7 @@ static inline float mavlink_msg_param_set_get_param_value(const mavlink_message_
/**
* @brief Get field param_type from param_set message
*
* @return Onboard parameter type: 0: float, 1: uint8_t, 2: int8_t, 3: uint16_t, 4: int16_t, 5: uint32_t, 6: int32_t
* @return Onboard parameter type: see MAV_VAR enum
*/
static inline uint8_t mavlink_msg_param_set_get_param_type(const mavlink_message_t* msg)
{

View File

@ -8,7 +8,7 @@ typedef struct __mavlink_param_value_t
uint16_t param_count; ///< Total number of onboard parameters
uint16_t param_index; ///< Index of this onboard parameter
char param_id[16]; ///< Onboard parameter id
uint8_t param_type; ///< Onboard parameter type: 0: float, 1: uint8_t, 2: int8_t, 3: uint16_t, 4: int16_t, 5: uint32_t, 6: int32_t
uint8_t param_type; ///< Onboard parameter type: see MAV_VAR enum
} mavlink_param_value_t;
#define MAVLINK_MSG_ID_PARAM_VALUE_LEN 25
@ -36,7 +36,7 @@ typedef struct __mavlink_param_value_t
*
* @param param_id Onboard parameter id
* @param param_value Onboard parameter value
* @param param_type Onboard parameter type: 0: float, 1: uint8_t, 2: int8_t, 3: uint16_t, 4: int16_t, 5: uint32_t, 6: int32_t
* @param param_type Onboard parameter type: see MAV_VAR enum
* @param param_count Total number of onboard parameters
* @param param_index Index of this onboard parameter
* @return length of the message in bytes (excluding serial stream start sign)
@ -74,7 +74,7 @@ static inline uint16_t mavlink_msg_param_value_pack(uint8_t system_id, uint8_t c
* @param msg The MAVLink message to compress the data into
* @param param_id Onboard parameter id
* @param param_value Onboard parameter value
* @param param_type Onboard parameter type: 0: float, 1: uint8_t, 2: int8_t, 3: uint16_t, 4: int16_t, 5: uint32_t, 6: int32_t
* @param param_type Onboard parameter type: see MAV_VAR enum
* @param param_count Total number of onboard parameters
* @param param_index Index of this onboard parameter
* @return length of the message in bytes (excluding serial stream start sign)
@ -124,7 +124,7 @@ static inline uint16_t mavlink_msg_param_value_encode(uint8_t system_id, uint8_t
*
* @param param_id Onboard parameter id
* @param param_value Onboard parameter value
* @param param_type Onboard parameter type: 0: float, 1: uint8_t, 2: int8_t, 3: uint16_t, 4: int16_t, 5: uint32_t, 6: int32_t
* @param param_type Onboard parameter type: see MAV_VAR enum
* @param param_count Total number of onboard parameters
* @param param_index Index of this onboard parameter
*/
@ -179,7 +179,7 @@ static inline float mavlink_msg_param_value_get_param_value(const mavlink_messag
/**
* @brief Get field param_type from param_value message
*
* @return Onboard parameter type: 0: float, 1: uint8_t, 2: int8_t, 3: uint16_t, 4: int16_t, 5: uint32_t, 6: int32_t
* @return Onboard parameter type: see MAV_VAR enum
*/
static inline uint8_t mavlink_msg_param_value_get_param_type(const mavlink_message_t* msg)
{

View File

@ -5,7 +5,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Mon Oct 24 09:45:40 2011"
#define MAVLINK_BUILD_DATE "Mon Oct 24 11:51:40 2011"
#define MAVLINK_WIRE_PROTOCOL_VERSION "1.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 101

View File

@ -5,7 +5,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Mon Oct 24 09:45:39 2011"
#define MAVLINK_BUILD_DATE "Mon Oct 24 11:51:39 2011"
#define MAVLINK_WIRE_PROTOCOL_VERSION "1.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 9

View File

@ -5,7 +5,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Mon Oct 24 09:45:39 2011"
#define MAVLINK_BUILD_DATE "Mon Oct 24 11:51:39 2011"
#define MAVLINK_WIRE_PROTOCOL_VERSION "1.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 255

View File

@ -5,7 +5,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Mon Oct 24 09:45:40 2011"
#define MAVLINK_BUILD_DATE "Mon Oct 24 11:51:40 2011"
#define MAVLINK_WIRE_PROTOCOL_VERSION "1.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 101

View File

@ -5,7 +5,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Mon Oct 24 09:45:40 2011"
#define MAVLINK_BUILD_DATE "Mon Oct 24 11:51:40 2011"
#define MAVLINK_WIRE_PROTOCOL_VERSION "1.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 179

View File

@ -5,7 +5,7 @@
#ifndef MAVLINK_VERSION_H
#define MAVLINK_VERSION_H
#define MAVLINK_BUILD_DATE "Mon Oct 24 09:45:40 2011"
#define MAVLINK_BUILD_DATE "Mon Oct 24 11:51:40 2011"
#define MAVLINK_WIRE_PROTOCOL_VERSION "1.0"
#define MAVLINK_MAX_DIALECT_PAYLOAD_SIZE 101

View File

@ -0,0 +1,31 @@
<?xml version='1.0'?>
<mavlink>
<version>3</version>
<messages>
<message id="0" name="TEST_TYPES">
<description>Test all field types</description>
<field type="char" name="c">char</field>
<field type="char[10]" name="s">string</field>
<field type="uint8_t" name="u8">uint8_t</field>
<field type="uint16_t" name="u16">uint16_t</field>
<field type="uint32_t" name="u32" print_format="0x%08x">uint32_t</field>
<field type="uint64_t" name="u64">uint64_t</field>
<field type="int8_t" name="s8">int8_t</field>
<field type="int16_t" name="s16">int16_t</field>
<field type="int32_t" name="s32">int32_t</field>
<field type="int64_t" name="s64">int64_t</field>
<field type="float" name="f">float</field>
<field type="double" name="d">double</field>
<field type="uint8_t[3]" name="u8_array">uint8_t_array</field>
<field type="uint16_t[3]" name="u16_array">uint16_t_array</field>
<field type="uint32_t[3]" name="u32_array">uint32_t_array</field>
<field type="uint64_t[3]" name="u64_array">uint64_t_array</field>
<field type="int8_t[3]" name="s8_array">int8_t_array</field>
<field type="int16_t[3]" name="s16_array">int16_t_array</field>
<field type="int32_t[3]" name="s32_array">int32_t_array</field>
<field type="int64_t[3]" name="s64_array">int64_t_array</field>
<field type="float[3]" name="f_array">float_array</field>
<field type="double[3]" name="d_array">double_array</field>
</message>
</messages>
</mavlink>