1 #ifndef MAVLINK_TYPES_H_
2 #define MAVLINK_TYPES_H_
5 #if (defined _MSC_VER) && (_MSC_VER < 1600)
6 #error "The C-MAVLink implementation requires Visual Studio 2010 or greater"
12 # pragma GCC diagnostic push
13 # pragma GCC diagnostic ignored "-Wpedantic"
18 #define MAVPACKED( __Declaration__ ) __Declaration__ __attribute__((packed))
20 #define MAVPACKED( __Declaration__ ) __pragma( pack(push, 1) ) __Declaration__ __pragma( pack(pop) )
23 #ifndef MAVLINK_MAX_PAYLOAD_LEN
25 #define MAVLINK_MAX_PAYLOAD_LEN 255
28 #define MAVLINK_CORE_HEADER_LEN 5
29 #define MAVLINK_NUM_HEADER_BYTES (MAVLINK_CORE_HEADER_LEN + 1)
30 #define MAVLINK_NUM_CHECKSUM_BYTES 2
31 #define MAVLINK_NUM_NON_PAYLOAD_BYTES (MAVLINK_NUM_HEADER_BYTES + MAVLINK_NUM_CHECKSUM_BYTES)
33 #define MAVLINK_MAX_PACKET_LEN (MAVLINK_MAX_PAYLOAD_LEN + MAVLINK_NUM_NON_PAYLOAD_BYTES)
35 #define MAVLINK_MSG_ID_EXTENDED_MESSAGE 255
36 #define MAVLINK_EXTENDED_HEADER_LEN 14
38 #if (defined _MSC_VER) || ((defined __APPLE__) && (defined __MACH__)) || (defined __linux__)
40 #define MAVLINK_MAX_EXTENDED_PACKET_LEN 65507
43 #define MAVLINK_MAX_EXTENDED_PACKET_LEN 2048
46 #define MAVLINK_MAX_EXTENDED_PAYLOAD_LEN (MAVLINK_MAX_EXTENDED_PACKET_LEN - MAVLINK_EXTENDED_HEADER_LEN - MAVLINK_NUM_NON_PAYLOAD_BYTES)
59 typedef struct param_union {
63 uint32_t param_uint32;
65 uint16_t param_uint16;
71 }) mavlink_param_union_t;
88 typedef struct param_union_extended {
92 uint8_t mavlink_type:7;
107 }) mavlink_param_union_double_t;
114 typedef struct __mavlink_system {
120 typedef struct __mavlink_message {
129 }) mavlink_message_t;
132 typedef struct __mavlink_extended_message {
133 mavlink_message_t base_msg;
134 int32_t extended_payload_len;
136 }) mavlink_extended_message_t;
152 #define MAVLINK_MAX_FIELDS 64
171 #define _MAV_PAYLOAD(msg) ((const char *)(&((msg)->payload64[0])))
172 #define _MAV_PAYLOAD_NON_CONST(msg) ((char *)(&((msg)->payload64[0])))
175 #define mavlink_ck_a(msg) *((msg)->len + (uint8_t *)_MAV_PAYLOAD_NON_CONST(msg))
176 #define mavlink_ck_b(msg) *(((msg)->len+(uint16_t)1) + (uint8_t *)_MAV_PAYLOAD_NON_CONST(msg))
190 #ifndef MAVLINK_COMM_NUM_BUFFERS
191 #if (defined linux) | (defined __linux) | (defined __MACH__) | (defined _WIN32)
192 # define MAVLINK_COMM_NUM_BUFFERS 16
194 # define MAVLINK_COMM_NUM_BUFFERS 4
223 #define MAVLINK_BIG_ENDIAN 0
224 #define MAVLINK_LITTLE_ENDIAN 1
227 # pragma GCC diagnostic pop
Definition: mavlink_types.h:180
unsigned int array_length
Definition: mavlink_types.h:158
Definition: mavlink_types.h:179
uint8_t type
Definition: fat_standard.h:67
Definition: mavlink_types.h:139
const char * name
Definition: mavlink_types.h:155
Definition: mavlink_types.h:211
Definition: mavlink_types.h:147
Definition: mavlink_types.h:141
Definition: mavlink_types.h:148
const char * print_format
Definition: mavlink_types.h:156
const char * name
Definition: mavlink_types.h:166
struct __mavlink_field_info mavlink_field_info_t
Definition: mavlink_types.h:182
Definition: mavlink_types.h:144
#define MAVLINK_NUM_CHECKSUM_BYTES
Definition: mavlink_types.h:30
mavlink_field_info_t fields[MAVLINK_MAX_FIELDS]
Definition: mavlink_types.h:168
#define MAVLINK_MAX_FIELDS
Definition: mavlink_types.h:152
Definition: mavlink_types.h:154
Definition: mavlink_types.h:142
uint8_t bytes[UBLOX_BUFFER_SIZE]
Definition: gps.c:833
uint8_t msg_received
Number of received messages.
Definition: mavlink_types.h:212
mavlink_parse_state_t parse_state
Parsing state machine.
Definition: mavlink_types.h:215
mavlink_message_type_t type
Definition: mavlink_types.h:157
mavlink_channel_t
Definition: mavlink_types.h:178
Definition: mavlink_types.h:204
mavlink_message_type_t
Definition: mavlink_types.h:138
uint8_t parse_error
Number of parse errors.
Definition: mavlink_types.h:214
Definition: mavlink_types.h:140
uint16_t packet_rx_drop_count
Number of packet drops.
Definition: mavlink_types.h:220
Definition: mavlink_types.h:165
Definition: mavlink_types.h:143
#define MAVLINK_MAX_PAYLOAD_LEN
Maximum payload length.
Definition: mavlink_types.h:25
uint16_t packet_rx_success_count
Received packets.
Definition: mavlink_types.h:219
Definition: mavlink_types.h:206
Definition: mavlink_types.h:199
#define MAVLINK_MAX_EXTENDED_PAYLOAD_LEN
Definition: mavlink_types.h:46
Definition: mavlink_types.h:207
#define MAVPACKED(__Declaration__)
Definition: mavlink_types.h:20
Definition: mavlink_types.h:203
unsigned num_fields
Definition: mavlink_types.h:167
Definition: mavlink_types.h:181
uint8_t packet_idx
Index in current packet.
Definition: mavlink_types.h:216
uint8_t current_rx_seq
Sequence number of last packet received.
Definition: mavlink_types.h:217
unsigned int structure_offset
Definition: mavlink_types.h:160
Definition: mavlink_types.h:208
Definition: mavlink_types.h:200
Definition: mavlink_types.h:146
uint8_t buffer_overrun
Number of buffer overruns.
Definition: mavlink_types.h:213
unsigned int wire_offset
Definition: mavlink_types.h:159
Definition: mavlink_types.h:202
Definition: mavlink_types.h:149
uint8_t current_tx_seq
Sequence number of last packet sent.
Definition: mavlink_types.h:218
Definition: mavlink_types.h:201
Definition: mavlink_types.h:205
struct __mavlink_status mavlink_status_t
mavlink_parse_state_t
Definition: mavlink_types.h:198
Definition: mavlink_types.h:145
uint16_t data
Definition: config.c:91
struct __mavlink_message_info mavlink_message_info_t