NinjaFlight
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
mavlink_msg_test_types.h
Go to the documentation of this file.
1 // MESSAGE TEST_TYPES PACKING
2 
3 #define MAVLINK_MSG_ID_TEST_TYPES 0
4 
5 typedef struct __mavlink_test_types_t
6 {
7  uint64_t u64;
8  int64_t s64;
9  double d;
10  uint64_t u64_array[3];
11  int64_t s64_array[3];
12  double d_array[3];
13  uint32_t u32;
14  int32_t s32;
15  float f;
16  uint32_t u32_array[3];
17  int32_t s32_array[3];
18  float f_array[3];
19  uint16_t u16;
20  int16_t s16;
21  uint16_t u16_array[3];
22  int16_t s16_array[3];
23  char c;
24  char s[10];
25  uint8_t u8;
26  int8_t s8;
27  uint8_t u8_array[3];
28  int8_t s8_array[3];
30 
31 #define MAVLINK_MSG_ID_TEST_TYPES_LEN 179
32 #define MAVLINK_MSG_ID_0_LEN 179
33 
34 #define MAVLINK_MSG_ID_TEST_TYPES_CRC 103
35 #define MAVLINK_MSG_ID_0_CRC 103
36 
37 #define MAVLINK_MSG_TEST_TYPES_FIELD_U64_ARRAY_LEN 3
38 #define MAVLINK_MSG_TEST_TYPES_FIELD_S64_ARRAY_LEN 3
39 #define MAVLINK_MSG_TEST_TYPES_FIELD_D_ARRAY_LEN 3
40 #define MAVLINK_MSG_TEST_TYPES_FIELD_U32_ARRAY_LEN 3
41 #define MAVLINK_MSG_TEST_TYPES_FIELD_S32_ARRAY_LEN 3
42 #define MAVLINK_MSG_TEST_TYPES_FIELD_F_ARRAY_LEN 3
43 #define MAVLINK_MSG_TEST_TYPES_FIELD_U16_ARRAY_LEN 3
44 #define MAVLINK_MSG_TEST_TYPES_FIELD_S16_ARRAY_LEN 3
45 #define MAVLINK_MSG_TEST_TYPES_FIELD_S_LEN 10
46 #define MAVLINK_MSG_TEST_TYPES_FIELD_U8_ARRAY_LEN 3
47 #define MAVLINK_MSG_TEST_TYPES_FIELD_S8_ARRAY_LEN 3
48 
49 #define MAVLINK_MESSAGE_INFO_TEST_TYPES { \
50  "TEST_TYPES", \
51  22, \
52  { { "u64", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_test_types_t, u64) }, \
53  { "s64", NULL, MAVLINK_TYPE_INT64_T, 0, 8, offsetof(mavlink_test_types_t, s64) }, \
54  { "d", NULL, MAVLINK_TYPE_DOUBLE, 0, 16, offsetof(mavlink_test_types_t, d) }, \
55  { "u64_array", NULL, MAVLINK_TYPE_UINT64_T, 3, 24, offsetof(mavlink_test_types_t, u64_array) }, \
56  { "s64_array", NULL, MAVLINK_TYPE_INT64_T, 3, 48, offsetof(mavlink_test_types_t, s64_array) }, \
57  { "d_array", NULL, MAVLINK_TYPE_DOUBLE, 3, 72, offsetof(mavlink_test_types_t, d_array) }, \
58  { "u32", "0x%08x", MAVLINK_TYPE_UINT32_T, 0, 96, offsetof(mavlink_test_types_t, u32) }, \
59  { "s32", NULL, MAVLINK_TYPE_INT32_T, 0, 100, offsetof(mavlink_test_types_t, s32) }, \
60  { "f", NULL, MAVLINK_TYPE_FLOAT, 0, 104, offsetof(mavlink_test_types_t, f) }, \
61  { "u32_array", NULL, MAVLINK_TYPE_UINT32_T, 3, 108, offsetof(mavlink_test_types_t, u32_array) }, \
62  { "s32_array", NULL, MAVLINK_TYPE_INT32_T, 3, 120, offsetof(mavlink_test_types_t, s32_array) }, \
63  { "f_array", NULL, MAVLINK_TYPE_FLOAT, 3, 132, offsetof(mavlink_test_types_t, f_array) }, \
64  { "u16", NULL, MAVLINK_TYPE_UINT16_T, 0, 144, offsetof(mavlink_test_types_t, u16) }, \
65  { "s16", NULL, MAVLINK_TYPE_INT16_T, 0, 146, offsetof(mavlink_test_types_t, s16) }, \
66  { "u16_array", NULL, MAVLINK_TYPE_UINT16_T, 3, 148, offsetof(mavlink_test_types_t, u16_array) }, \
67  { "s16_array", NULL, MAVLINK_TYPE_INT16_T, 3, 154, offsetof(mavlink_test_types_t, s16_array) }, \
68  { "c", NULL, MAVLINK_TYPE_CHAR, 0, 160, offsetof(mavlink_test_types_t, c) }, \
69  { "s", NULL, MAVLINK_TYPE_CHAR, 10, 161, offsetof(mavlink_test_types_t, s) }, \
70  { "u8", NULL, MAVLINK_TYPE_UINT8_T, 0, 171, offsetof(mavlink_test_types_t, u8) }, \
71  { "s8", NULL, MAVLINK_TYPE_INT8_T, 0, 172, offsetof(mavlink_test_types_t, s8) }, \
72  { "u8_array", NULL, MAVLINK_TYPE_UINT8_T, 3, 173, offsetof(mavlink_test_types_t, u8_array) }, \
73  { "s8_array", NULL, MAVLINK_TYPE_INT8_T, 3, 176, offsetof(mavlink_test_types_t, s8_array) }, \
74  } \
75 }
76 
77 
108 static inline uint16_t mavlink_msg_test_types_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
109  char c, const char *s, uint8_t u8, uint16_t u16, uint32_t u32, uint64_t u64, int8_t s8, int16_t s16, int32_t s32, int64_t s64, float f, double d, const uint8_t *u8_array, const uint16_t *u16_array, const uint32_t *u32_array, const uint64_t *u64_array, const int8_t *s8_array, const int16_t *s16_array, const int32_t *s32_array, const int64_t *s64_array, const float *f_array, const double *d_array)
110 {
111 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
113  _mav_put_uint64_t(buf, 0, u64);
114  _mav_put_int64_t(buf, 8, s64);
115  _mav_put_double(buf, 16, d);
116  _mav_put_uint32_t(buf, 96, u32);
117  _mav_put_int32_t(buf, 100, s32);
118  _mav_put_float(buf, 104, f);
119  _mav_put_uint16_t(buf, 144, u16);
120  _mav_put_int16_t(buf, 146, s16);
121  _mav_put_char(buf, 160, c);
122  _mav_put_uint8_t(buf, 171, u8);
123  _mav_put_int8_t(buf, 172, s8);
124  _mav_put_uint64_t_array(buf, 24, u64_array, 3);
125  _mav_put_int64_t_array(buf, 48, s64_array, 3);
126  _mav_put_double_array(buf, 72, d_array, 3);
127  _mav_put_uint32_t_array(buf, 108, u32_array, 3);
128  _mav_put_int32_t_array(buf, 120, s32_array, 3);
129  _mav_put_float_array(buf, 132, f_array, 3);
130  _mav_put_uint16_t_array(buf, 148, u16_array, 3);
131  _mav_put_int16_t_array(buf, 154, s16_array, 3);
132  _mav_put_char_array(buf, 161, s, 10);
133  _mav_put_uint8_t_array(buf, 173, u8_array, 3);
134  _mav_put_int8_t_array(buf, 176, s8_array, 3);
136 #else
137  mavlink_test_types_t packet;
138  packet.u64 = u64;
139  packet.s64 = s64;
140  packet.d = d;
141  packet.u32 = u32;
142  packet.s32 = s32;
143  packet.f = f;
144  packet.u16 = u16;
145  packet.s16 = s16;
146  packet.c = c;
147  packet.u8 = u8;
148  packet.s8 = s8;
149  mav_array_memcpy(packet.u64_array, u64_array, sizeof(uint64_t)*3);
150  mav_array_memcpy(packet.s64_array, s64_array, sizeof(int64_t)*3);
151  mav_array_memcpy(packet.d_array, d_array, sizeof(double)*3);
152  mav_array_memcpy(packet.u32_array, u32_array, sizeof(uint32_t)*3);
153  mav_array_memcpy(packet.s32_array, s32_array, sizeof(int32_t)*3);
154  mav_array_memcpy(packet.f_array, f_array, sizeof(float)*3);
155  mav_array_memcpy(packet.u16_array, u16_array, sizeof(uint16_t)*3);
156  mav_array_memcpy(packet.s16_array, s16_array, sizeof(int16_t)*3);
157  mav_array_memcpy(packet.s, s, sizeof(char)*10);
158  mav_array_memcpy(packet.u8_array, u8_array, sizeof(uint8_t)*3);
159  mav_array_memcpy(packet.s8_array, s8_array, sizeof(int8_t)*3);
161 #endif
162 
163  msg->msgid = MAVLINK_MSG_ID_TEST_TYPES;
164 #if MAVLINK_CRC_EXTRA
166 #else
167  return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_TEST_TYPES_LEN);
168 #endif
169 }
170 
201 static inline uint16_t mavlink_msg_test_types_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
202  mavlink_message_t* msg,
203  char c,const char *s,uint8_t u8,uint16_t u16,uint32_t u32,uint64_t u64,int8_t s8,int16_t s16,int32_t s32,int64_t s64,float f,double d,const uint8_t *u8_array,const uint16_t *u16_array,const uint32_t *u32_array,const uint64_t *u64_array,const int8_t *s8_array,const int16_t *s16_array,const int32_t *s32_array,const int64_t *s64_array,const float *f_array,const double *d_array)
204 {
205 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
207  _mav_put_uint64_t(buf, 0, u64);
208  _mav_put_int64_t(buf, 8, s64);
209  _mav_put_double(buf, 16, d);
210  _mav_put_uint32_t(buf, 96, u32);
211  _mav_put_int32_t(buf, 100, s32);
212  _mav_put_float(buf, 104, f);
213  _mav_put_uint16_t(buf, 144, u16);
214  _mav_put_int16_t(buf, 146, s16);
215  _mav_put_char(buf, 160, c);
216  _mav_put_uint8_t(buf, 171, u8);
217  _mav_put_int8_t(buf, 172, s8);
218  _mav_put_uint64_t_array(buf, 24, u64_array, 3);
219  _mav_put_int64_t_array(buf, 48, s64_array, 3);
220  _mav_put_double_array(buf, 72, d_array, 3);
221  _mav_put_uint32_t_array(buf, 108, u32_array, 3);
222  _mav_put_int32_t_array(buf, 120, s32_array, 3);
223  _mav_put_float_array(buf, 132, f_array, 3);
224  _mav_put_uint16_t_array(buf, 148, u16_array, 3);
225  _mav_put_int16_t_array(buf, 154, s16_array, 3);
226  _mav_put_char_array(buf, 161, s, 10);
227  _mav_put_uint8_t_array(buf, 173, u8_array, 3);
228  _mav_put_int8_t_array(buf, 176, s8_array, 3);
230 #else
231  mavlink_test_types_t packet;
232  packet.u64 = u64;
233  packet.s64 = s64;
234  packet.d = d;
235  packet.u32 = u32;
236  packet.s32 = s32;
237  packet.f = f;
238  packet.u16 = u16;
239  packet.s16 = s16;
240  packet.c = c;
241  packet.u8 = u8;
242  packet.s8 = s8;
243  mav_array_memcpy(packet.u64_array, u64_array, sizeof(uint64_t)*3);
244  mav_array_memcpy(packet.s64_array, s64_array, sizeof(int64_t)*3);
245  mav_array_memcpy(packet.d_array, d_array, sizeof(double)*3);
246  mav_array_memcpy(packet.u32_array, u32_array, sizeof(uint32_t)*3);
247  mav_array_memcpy(packet.s32_array, s32_array, sizeof(int32_t)*3);
248  mav_array_memcpy(packet.f_array, f_array, sizeof(float)*3);
249  mav_array_memcpy(packet.u16_array, u16_array, sizeof(uint16_t)*3);
250  mav_array_memcpy(packet.s16_array, s16_array, sizeof(int16_t)*3);
251  mav_array_memcpy(packet.s, s, sizeof(char)*10);
252  mav_array_memcpy(packet.u8_array, u8_array, sizeof(uint8_t)*3);
253  mav_array_memcpy(packet.s8_array, s8_array, sizeof(int8_t)*3);
255 #endif
256 
257  msg->msgid = MAVLINK_MSG_ID_TEST_TYPES;
258 #if MAVLINK_CRC_EXTRA
260 #else
261  return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_TEST_TYPES_LEN);
262 #endif
263 }
264 
273 static inline uint16_t mavlink_msg_test_types_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_test_types_t* test_types)
274 {
275  return mavlink_msg_test_types_pack(system_id, component_id, msg, test_types->c, test_types->s, test_types->u8, test_types->u16, test_types->u32, test_types->u64, test_types->s8, test_types->s16, test_types->s32, test_types->s64, test_types->f, test_types->d, test_types->u8_array, test_types->u16_array, test_types->u32_array, test_types->u64_array, test_types->s8_array, test_types->s16_array, test_types->s32_array, test_types->s64_array, test_types->f_array, test_types->d_array);
276 }
277 
287 static inline uint16_t mavlink_msg_test_types_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_test_types_t* test_types)
288 {
289  return mavlink_msg_test_types_pack_chan(system_id, component_id, chan, msg, test_types->c, test_types->s, test_types->u8, test_types->u16, test_types->u32, test_types->u64, test_types->s8, test_types->s16, test_types->s32, test_types->s64, test_types->f, test_types->d, test_types->u8_array, test_types->u16_array, test_types->u32_array, test_types->u64_array, test_types->s8_array, test_types->s16_array, test_types->s32_array, test_types->s64_array, test_types->f_array, test_types->d_array);
290 }
291 
319 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
320 
321 static inline void mavlink_msg_test_types_send(mavlink_channel_t chan, char c, const char *s, uint8_t u8, uint16_t u16, uint32_t u32, uint64_t u64, int8_t s8, int16_t s16, int32_t s32, int64_t s64, float f, double d, const uint8_t *u8_array, const uint16_t *u16_array, const uint32_t *u32_array, const uint64_t *u64_array, const int8_t *s8_array, const int16_t *s16_array, const int32_t *s32_array, const int64_t *s64_array, const float *f_array, const double *d_array)
322 {
323 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
325  _mav_put_uint64_t(buf, 0, u64);
326  _mav_put_int64_t(buf, 8, s64);
327  _mav_put_double(buf, 16, d);
328  _mav_put_uint32_t(buf, 96, u32);
329  _mav_put_int32_t(buf, 100, s32);
330  _mav_put_float(buf, 104, f);
331  _mav_put_uint16_t(buf, 144, u16);
332  _mav_put_int16_t(buf, 146, s16);
333  _mav_put_char(buf, 160, c);
334  _mav_put_uint8_t(buf, 171, u8);
335  _mav_put_int8_t(buf, 172, s8);
336  _mav_put_uint64_t_array(buf, 24, u64_array, 3);
337  _mav_put_int64_t_array(buf, 48, s64_array, 3);
338  _mav_put_double_array(buf, 72, d_array, 3);
339  _mav_put_uint32_t_array(buf, 108, u32_array, 3);
340  _mav_put_int32_t_array(buf, 120, s32_array, 3);
341  _mav_put_float_array(buf, 132, f_array, 3);
342  _mav_put_uint16_t_array(buf, 148, u16_array, 3);
343  _mav_put_int16_t_array(buf, 154, s16_array, 3);
344  _mav_put_char_array(buf, 161, s, 10);
345  _mav_put_uint8_t_array(buf, 173, u8_array, 3);
346  _mav_put_int8_t_array(buf, 176, s8_array, 3);
347 #if MAVLINK_CRC_EXTRA
348  _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TEST_TYPES, buf, MAVLINK_MSG_ID_TEST_TYPES_LEN, MAVLINK_MSG_ID_TEST_TYPES_CRC);
349 #else
350  _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TEST_TYPES, buf, MAVLINK_MSG_ID_TEST_TYPES_LEN);
351 #endif
352 #else
353  mavlink_test_types_t packet;
354  packet.u64 = u64;
355  packet.s64 = s64;
356  packet.d = d;
357  packet.u32 = u32;
358  packet.s32 = s32;
359  packet.f = f;
360  packet.u16 = u16;
361  packet.s16 = s16;
362  packet.c = c;
363  packet.u8 = u8;
364  packet.s8 = s8;
365  mav_array_memcpy(packet.u64_array, u64_array, sizeof(uint64_t)*3);
366  mav_array_memcpy(packet.s64_array, s64_array, sizeof(int64_t)*3);
367  mav_array_memcpy(packet.d_array, d_array, sizeof(double)*3);
368  mav_array_memcpy(packet.u32_array, u32_array, sizeof(uint32_t)*3);
369  mav_array_memcpy(packet.s32_array, s32_array, sizeof(int32_t)*3);
370  mav_array_memcpy(packet.f_array, f_array, sizeof(float)*3);
371  mav_array_memcpy(packet.u16_array, u16_array, sizeof(uint16_t)*3);
372  mav_array_memcpy(packet.s16_array, s16_array, sizeof(int16_t)*3);
373  mav_array_memcpy(packet.s, s, sizeof(char)*10);
374  mav_array_memcpy(packet.u8_array, u8_array, sizeof(uint8_t)*3);
375  mav_array_memcpy(packet.s8_array, s8_array, sizeof(int8_t)*3);
376 #if MAVLINK_CRC_EXTRA
377  _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TEST_TYPES, (const char *)&packet, MAVLINK_MSG_ID_TEST_TYPES_LEN, MAVLINK_MSG_ID_TEST_TYPES_CRC);
378 #else
379  _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TEST_TYPES, (const char *)&packet, MAVLINK_MSG_ID_TEST_TYPES_LEN);
380 #endif
381 #endif
382 }
383 
384 #if MAVLINK_MSG_ID_TEST_TYPES_LEN <= MAVLINK_MAX_PAYLOAD_LEN
385 /*
386  This varient of _send() can be used to save stack space by re-using
387  memory from the receive buffer. The caller provides a
388  mavlink_message_t which is the size of a full mavlink message. This
389  is usually the receive buffer for the channel, and allows a reply to an
390  incoming message with minimum stack space usage.
391  */
392 static inline void mavlink_msg_test_types_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, char c, const char *s, uint8_t u8, uint16_t u16, uint32_t u32, uint64_t u64, int8_t s8, int16_t s16, int32_t s32, int64_t s64, float f, double d, const uint8_t *u8_array, const uint16_t *u16_array, const uint32_t *u32_array, const uint64_t *u64_array, const int8_t *s8_array, const int16_t *s16_array, const int32_t *s32_array, const int64_t *s64_array, const float *f_array, const double *d_array)
393 {
394 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
395  char *buf = (char *)msgbuf;
396  _mav_put_uint64_t(buf, 0, u64);
397  _mav_put_int64_t(buf, 8, s64);
398  _mav_put_double(buf, 16, d);
399  _mav_put_uint32_t(buf, 96, u32);
400  _mav_put_int32_t(buf, 100, s32);
401  _mav_put_float(buf, 104, f);
402  _mav_put_uint16_t(buf, 144, u16);
403  _mav_put_int16_t(buf, 146, s16);
404  _mav_put_char(buf, 160, c);
405  _mav_put_uint8_t(buf, 171, u8);
406  _mav_put_int8_t(buf, 172, s8);
407  _mav_put_uint64_t_array(buf, 24, u64_array, 3);
408  _mav_put_int64_t_array(buf, 48, s64_array, 3);
409  _mav_put_double_array(buf, 72, d_array, 3);
410  _mav_put_uint32_t_array(buf, 108, u32_array, 3);
411  _mav_put_int32_t_array(buf, 120, s32_array, 3);
412  _mav_put_float_array(buf, 132, f_array, 3);
413  _mav_put_uint16_t_array(buf, 148, u16_array, 3);
414  _mav_put_int16_t_array(buf, 154, s16_array, 3);
415  _mav_put_char_array(buf, 161, s, 10);
416  _mav_put_uint8_t_array(buf, 173, u8_array, 3);
417  _mav_put_int8_t_array(buf, 176, s8_array, 3);
418 #if MAVLINK_CRC_EXTRA
419  _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TEST_TYPES, buf, MAVLINK_MSG_ID_TEST_TYPES_LEN, MAVLINK_MSG_ID_TEST_TYPES_CRC);
420 #else
421  _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TEST_TYPES, buf, MAVLINK_MSG_ID_TEST_TYPES_LEN);
422 #endif
423 #else
424  mavlink_test_types_t *packet = (mavlink_test_types_t *)msgbuf;
425  packet->u64 = u64;
426  packet->s64 = s64;
427  packet->d = d;
428  packet->u32 = u32;
429  packet->s32 = s32;
430  packet->f = f;
431  packet->u16 = u16;
432  packet->s16 = s16;
433  packet->c = c;
434  packet->u8 = u8;
435  packet->s8 = s8;
436  mav_array_memcpy(packet->u64_array, u64_array, sizeof(uint64_t)*3);
437  mav_array_memcpy(packet->s64_array, s64_array, sizeof(int64_t)*3);
438  mav_array_memcpy(packet->d_array, d_array, sizeof(double)*3);
439  mav_array_memcpy(packet->u32_array, u32_array, sizeof(uint32_t)*3);
440  mav_array_memcpy(packet->s32_array, s32_array, sizeof(int32_t)*3);
441  mav_array_memcpy(packet->f_array, f_array, sizeof(float)*3);
442  mav_array_memcpy(packet->u16_array, u16_array, sizeof(uint16_t)*3);
443  mav_array_memcpy(packet->s16_array, s16_array, sizeof(int16_t)*3);
444  mav_array_memcpy(packet->s, s, sizeof(char)*10);
445  mav_array_memcpy(packet->u8_array, u8_array, sizeof(uint8_t)*3);
446  mav_array_memcpy(packet->s8_array, s8_array, sizeof(int8_t)*3);
447 #if MAVLINK_CRC_EXTRA
448  _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TEST_TYPES, (const char *)packet, MAVLINK_MSG_ID_TEST_TYPES_LEN, MAVLINK_MSG_ID_TEST_TYPES_CRC);
449 #else
450  _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_TEST_TYPES, (const char *)packet, MAVLINK_MSG_ID_TEST_TYPES_LEN);
451 #endif
452 #endif
453 }
454 #endif
455 
456 #endif
457 
458 // MESSAGE TEST_TYPES UNPACKING
459 
460 
466 static inline char mavlink_msg_test_types_get_c(const mavlink_message_t* msg)
467 {
468  return _MAV_RETURN_char(msg, 160);
469 }
470 
476 static inline uint16_t mavlink_msg_test_types_get_s(const mavlink_message_t* msg, char *s)
477 {
478  return _MAV_RETURN_char_array(msg, s, 10, 161);
479 }
480 
486 static inline uint8_t mavlink_msg_test_types_get_u8(const mavlink_message_t* msg)
487 {
488  return _MAV_RETURN_uint8_t(msg, 171);
489 }
490 
496 static inline uint16_t mavlink_msg_test_types_get_u16(const mavlink_message_t* msg)
497 {
498  return _MAV_RETURN_uint16_t(msg, 144);
499 }
500 
506 static inline uint32_t mavlink_msg_test_types_get_u32(const mavlink_message_t* msg)
507 {
508  return _MAV_RETURN_uint32_t(msg, 96);
509 }
510 
516 static inline uint64_t mavlink_msg_test_types_get_u64(const mavlink_message_t* msg)
517 {
518  return _MAV_RETURN_uint64_t(msg, 0);
519 }
520 
526 static inline int8_t mavlink_msg_test_types_get_s8(const mavlink_message_t* msg)
527 {
528  return _MAV_RETURN_int8_t(msg, 172);
529 }
530 
536 static inline int16_t mavlink_msg_test_types_get_s16(const mavlink_message_t* msg)
537 {
538  return _MAV_RETURN_int16_t(msg, 146);
539 }
540 
546 static inline int32_t mavlink_msg_test_types_get_s32(const mavlink_message_t* msg)
547 {
548  return _MAV_RETURN_int32_t(msg, 100);
549 }
550 
556 static inline int64_t mavlink_msg_test_types_get_s64(const mavlink_message_t* msg)
557 {
558  return _MAV_RETURN_int64_t(msg, 8);
559 }
560 
566 static inline float mavlink_msg_test_types_get_f(const mavlink_message_t* msg)
567 {
568  return _MAV_RETURN_float(msg, 104);
569 }
570 
576 static inline double mavlink_msg_test_types_get_d(const mavlink_message_t* msg)
577 {
578  return _MAV_RETURN_double(msg, 16);
579 }
580 
586 static inline uint16_t mavlink_msg_test_types_get_u8_array(const mavlink_message_t* msg, uint8_t *u8_array)
587 {
588  return _MAV_RETURN_uint8_t_array(msg, u8_array, 3, 173);
589 }
590 
596 static inline uint16_t mavlink_msg_test_types_get_u16_array(const mavlink_message_t* msg, uint16_t *u16_array)
597 {
598  return _MAV_RETURN_uint16_t_array(msg, u16_array, 3, 148);
599 }
600 
606 static inline uint16_t mavlink_msg_test_types_get_u32_array(const mavlink_message_t* msg, uint32_t *u32_array)
607 {
608  return _MAV_RETURN_uint32_t_array(msg, u32_array, 3, 108);
609 }
610 
616 static inline uint16_t mavlink_msg_test_types_get_u64_array(const mavlink_message_t* msg, uint64_t *u64_array)
617 {
618  return _MAV_RETURN_uint64_t_array(msg, u64_array, 3, 24);
619 }
620 
626 static inline uint16_t mavlink_msg_test_types_get_s8_array(const mavlink_message_t* msg, int8_t *s8_array)
627 {
628  return _MAV_RETURN_int8_t_array(msg, s8_array, 3, 176);
629 }
630 
636 static inline uint16_t mavlink_msg_test_types_get_s16_array(const mavlink_message_t* msg, int16_t *s16_array)
637 {
638  return _MAV_RETURN_int16_t_array(msg, s16_array, 3, 154);
639 }
640 
646 static inline uint16_t mavlink_msg_test_types_get_s32_array(const mavlink_message_t* msg, int32_t *s32_array)
647 {
648  return _MAV_RETURN_int32_t_array(msg, s32_array, 3, 120);
649 }
650 
656 static inline uint16_t mavlink_msg_test_types_get_s64_array(const mavlink_message_t* msg, int64_t *s64_array)
657 {
658  return _MAV_RETURN_int64_t_array(msg, s64_array, 3, 48);
659 }
660 
666 static inline uint16_t mavlink_msg_test_types_get_f_array(const mavlink_message_t* msg, float *f_array)
667 {
668  return _MAV_RETURN_float_array(msg, f_array, 3, 132);
669 }
670 
676 static inline uint16_t mavlink_msg_test_types_get_d_array(const mavlink_message_t* msg, double *d_array)
677 {
678  return _MAV_RETURN_double_array(msg, d_array, 3, 72);
679 }
680 
687 static inline void mavlink_msg_test_types_decode(const mavlink_message_t* msg, mavlink_test_types_t* test_types)
688 {
689 #if MAVLINK_NEED_BYTE_SWAP
690  test_types->u64 = mavlink_msg_test_types_get_u64(msg);
691  test_types->s64 = mavlink_msg_test_types_get_s64(msg);
692  test_types->d = mavlink_msg_test_types_get_d(msg);
693  mavlink_msg_test_types_get_u64_array(msg, test_types->u64_array);
694  mavlink_msg_test_types_get_s64_array(msg, test_types->s64_array);
695  mavlink_msg_test_types_get_d_array(msg, test_types->d_array);
696  test_types->u32 = mavlink_msg_test_types_get_u32(msg);
697  test_types->s32 = mavlink_msg_test_types_get_s32(msg);
698  test_types->f = mavlink_msg_test_types_get_f(msg);
699  mavlink_msg_test_types_get_u32_array(msg, test_types->u32_array);
700  mavlink_msg_test_types_get_s32_array(msg, test_types->s32_array);
701  mavlink_msg_test_types_get_f_array(msg, test_types->f_array);
702  test_types->u16 = mavlink_msg_test_types_get_u16(msg);
703  test_types->s16 = mavlink_msg_test_types_get_s16(msg);
704  mavlink_msg_test_types_get_u16_array(msg, test_types->u16_array);
705  mavlink_msg_test_types_get_s16_array(msg, test_types->s16_array);
706  test_types->c = mavlink_msg_test_types_get_c(msg);
707  mavlink_msg_test_types_get_s(msg, test_types->s);
708  test_types->u8 = mavlink_msg_test_types_get_u8(msg);
709  test_types->s8 = mavlink_msg_test_types_get_s8(msg);
710  mavlink_msg_test_types_get_u8_array(msg, test_types->u8_array);
711  mavlink_msg_test_types_get_s8_array(msg, test_types->s8_array);
712 #else
713  memcpy(test_types, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_TEST_TYPES_LEN);
714 #endif
715 }
#define _mav_put_float(buf, wire_offset, b)
Definition: protocol.h:145
#define _MAV_RETURN_uint8_t(msg, wire_offset)
Definition: protocol.h:238
#define _mav_put_int64_t(buf, wire_offset, b)
Definition: protocol.h:144
#define _mav_put_uint8_t(buf, wire_offset, b)
Definition: protocol.h:134
#define _mav_put_uint64_t(buf, wire_offset, b)
Definition: protocol.h:143
#define _mav_put_int32_t(buf, wire_offset, b)
Definition: protocol.h:142
#define _MAV_RETURN_int8_t(msg, wire_offset)
Definition: protocol.h:237
#define _mav_put_char(buf, wire_offset, b)
Definition: protocol.h:136
#define _mav_put_int8_t(buf, wire_offset, b)
Definition: protocol.h:135
#define _mav_put_double(buf, wire_offset, b)
Definition: protocol.h:146
#define _MAV_RETURN_char(msg, wire_offset)
Definition: protocol.h:236
#define _mav_put_uint16_t(buf, wire_offset, b)
Definition: protocol.h:139
#define _mav_put_int16_t(buf, wire_offset, b)
Definition: protocol.h:140
union @14::@15 f
#define _mav_put_uint32_t(buf, wire_offset, b)
Definition: protocol.h:141