4#define MAVLINK_MSG_ID_ESC_INFO 290
19#define MAVLINK_MSG_ID_ESC_INFO_LEN 46
20#define MAVLINK_MSG_ID_ESC_INFO_MIN_LEN 46
21#define MAVLINK_MSG_ID_290_LEN 46
22#define MAVLINK_MSG_ID_290_MIN_LEN 46
24#define MAVLINK_MSG_ID_ESC_INFO_CRC 251
25#define MAVLINK_MSG_ID_290_CRC 251
27#define MAVLINK_MSG_ESC_INFO_FIELD_ERROR_COUNT_LEN 4
28#define MAVLINK_MSG_ESC_INFO_FIELD_FAILURE_FLAGS_LEN 4
29#define MAVLINK_MSG_ESC_INFO_FIELD_TEMPERATURE_LEN 4
31#if MAVLINK_COMMAND_24BIT
32#define MAVLINK_MESSAGE_INFO_ESC_INFO {
36 { { "index", NULL, MAVLINK_TYPE_UINT8_T, 0
, 42
, offsetof(mavlink_esc_info_t, index) },
37 { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0
, 0
, offsetof(mavlink_esc_info_t, time_usec) },
38 { "counter", NULL, MAVLINK_TYPE_UINT16_T, 0
, 24
, offsetof(mavlink_esc_info_t, counter) },
39 { "count", NULL, MAVLINK_TYPE_UINT8_T, 0
, 43
, offsetof(mavlink_esc_info_t, count) },
40 { "connection_type", NULL, MAVLINK_TYPE_UINT8_T, 0
, 44
, offsetof(mavlink_esc_info_t, connection_type) },
41 { "info", NULL, MAVLINK_TYPE_UINT8_T, 0
, 45
, offsetof(mavlink_esc_info_t, info) },
42 { "failure_flags", NULL, MAVLINK_TYPE_UINT16_T, 4
, 26
, offsetof(mavlink_esc_info_t, failure_flags) },
43 { "error_count", NULL, MAVLINK_TYPE_UINT32_T, 4
, 8
, offsetof(mavlink_esc_info_t, error_count) },
44 { "temperature", NULL, MAVLINK_TYPE_INT16_T, 4
, 34
, offsetof(mavlink_esc_info_t, temperature) },
46}
48#define MAVLINK_MESSAGE_INFO_ESC_INFO {
51 { { "index", NULL, MAVLINK_TYPE_UINT8_T, 0
, 42
, offsetof(mavlink_esc_info_t, index) },
52 { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0
, 0
, offsetof(mavlink_esc_info_t, time_usec) },
53 { "counter", NULL, MAVLINK_TYPE_UINT16_T, 0
, 24
, offsetof(mavlink_esc_info_t, counter) },
54 { "count", NULL, MAVLINK_TYPE_UINT8_T, 0
, 43
, offsetof(mavlink_esc_info_t, count) },
55 { "connection_type", NULL, MAVLINK_TYPE_UINT8_T, 0
, 44
, offsetof(mavlink_esc_info_t, connection_type) },
56 { "info", NULL, MAVLINK_TYPE_UINT8_T, 0
, 45
, offsetof(mavlink_esc_info_t, info) },
57 { "failure_flags", NULL, MAVLINK_TYPE_UINT16_T, 4
, 26
, offsetof(mavlink_esc_info_t, failure_flags) },
58 { "error_count", NULL, MAVLINK_TYPE_UINT32_T, 4
, 8
, offsetof(mavlink_esc_info_t, error_count) },
59 { "temperature", NULL, MAVLINK_TYPE_INT16_T, 4
, 34
, offsetof(mavlink_esc_info_t, temperature) },
61}
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
82static inline uint16_t mavlink_msg_esc_info_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
83 uint8_t index, uint64_t time_usec, uint16_t counter, uint8_t count, uint8_t connection_type, uint8_t info,
const uint16_t *failure_flags,
const uint32_t *error_count,
const int16_t *temperature)
85#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
87 _mav_put_uint64_t(buf, 0, time_usec);
88 _mav_put_uint16_t(buf, 24, counter);
89 _mav_put_uint8_t(buf, 42, index);
90 _mav_put_uint8_t(buf, 43, count);
91 _mav_put_uint8_t(buf, 44, connection_type);
92 _mav_put_uint8_t(buf, 45, info);
93 _mav_put_uint32_t_array(buf, 8, error_count, 4);
94 _mav_put_uint16_t_array(buf, 26, failure_flags, 4);
95 _mav_put_int16_t_array(buf, 34, temperature, 4);
98 mavlink_esc_info_t packet;
99 packet.time_usec = time_usec;
100 packet.counter = counter;
101 packet.index = index;
102 packet.count = count;
103 packet.connection_type = connection_type;
105 mav_array_memcpy(packet.error_count, error_count,
sizeof(uint32_t)*4);
106 mav_array_memcpy(packet.failure_flags, failure_flags,
sizeof(uint16_t)*4);
107 mav_array_memcpy(packet.temperature, temperature,
sizeof(int16_t)*4);
108 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ESC_INFO_LEN);
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133static inline uint16_t mavlink_msg_esc_info_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
134 uint8_t index, uint64_t time_usec, uint16_t counter, uint8_t count, uint8_t connection_type, uint8_t info,
const uint16_t *failure_flags,
const uint32_t *error_count,
const int16_t *temperature)
136#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
138 _mav_put_uint64_t(buf, 0, time_usec);
139 _mav_put_uint16_t(buf, 24, counter);
140 _mav_put_uint8_t(buf, 42, index);
141 _mav_put_uint8_t(buf, 43, count);
142 _mav_put_uint8_t(buf, 44, connection_type);
143 _mav_put_uint8_t(buf, 45, info);
144 _mav_put_uint32_t_array(buf, 8, error_count, 4);
145 _mav_put_uint16_t_array(buf, 26, failure_flags, 4);
146 _mav_put_int16_t_array(buf, 34, temperature, 4);
149 mavlink_esc_info_t packet;
150 packet.time_usec = time_usec;
151 packet.counter = counter;
152 packet.index = index;
153 packet.count = count;
154 packet.connection_type = connection_type;
156 mav_array_memcpy(packet.error_count, error_count,
sizeof(uint32_t)*4);
157 mav_array_memcpy(packet.failure_flags, failure_flags,
sizeof(uint16_t)*4);
158 mav_array_memcpy(packet.temperature, temperature,
sizeof(int16_t)*4);
159 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ESC_INFO_LEN);
164 return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ESC_INFO_MIN_LEN, MAVLINK_MSG_ID_ESC_INFO_LEN, MAVLINK_MSG_ID_ESC_INFO_CRC);
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
188static inline uint16_t mavlink_msg_esc_info_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
189 mavlink_message_t* msg,
190 uint8_t index,uint64_t time_usec,uint16_t counter,uint8_t count,uint8_t connection_type,uint8_t info,
const uint16_t *failure_flags,
const uint32_t *error_count,
const int16_t *temperature)
192#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
194 _mav_put_uint64_t(buf, 0, time_usec);
195 _mav_put_uint16_t(buf, 24, counter);
196 _mav_put_uint8_t(buf, 42, index);
197 _mav_put_uint8_t(buf, 43, count);
198 _mav_put_uint8_t(buf, 44, connection_type);
199 _mav_put_uint8_t(buf, 45, info);
200 _mav_put_uint32_t_array(buf, 8, error_count, 4);
201 _mav_put_uint16_t_array(buf, 26, failure_flags, 4);
202 _mav_put_int16_t_array(buf, 34, temperature, 4);
205 mavlink_esc_info_t packet;
206 packet.time_usec = time_usec;
207 packet.counter = counter;
208 packet.index = index;
209 packet.count = count;
210 packet.connection_type = connection_type;
212 mav_array_memcpy(packet.error_count, error_count,
sizeof(uint32_t)*4);
213 mav_array_memcpy(packet.failure_flags, failure_flags,
sizeof(uint16_t)*4);
214 mav_array_memcpy(packet.temperature, temperature,
sizeof(int16_t)*4);
215 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ESC_INFO_LEN);
223
224
225
226
227
228
229
231static inline uint16_t mavlink_msg_esc_info_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_esc_info_t* esc_info)
233 return mavlink_msg_esc_info_pack(system_id, component_id, msg, esc_info->index, esc_info->time_usec, esc_info->counter, esc_info->count, esc_info->connection_type, esc_info->info, esc_info->failure_flags, esc_info->error_count, esc_info->temperature);
237
238
239
240
241
242
243
244
246static inline uint16_t mavlink_msg_esc_info_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_esc_info_t* esc_info)
248 return mavlink_msg_esc_info_pack_chan(system_id, component_id, chan, msg, esc_info->index, esc_info->time_usec, esc_info->counter, esc_info->count, esc_info->connection_type, esc_info->info, esc_info->failure_flags, esc_info->error_count, esc_info->temperature);
252
253
254
255
256
257
258
259
260static inline uint16_t mavlink_msg_esc_info_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg,
const mavlink_esc_info_t* esc_info)
262 return mavlink_msg_esc_info_pack_status(system_id, component_id, _status, msg, esc_info->index, esc_info->time_usec, esc_info->counter, esc_info->count, esc_info->connection_type, esc_info->info, esc_info->failure_flags, esc_info->error_count, esc_info->temperature);
266
267
268
269
270
271
272
273
274
275
276
277
278
279#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
282static inline void mavlink_msg_esc_info_send(mavlink_channel_t chan, uint8_t index, uint64_t time_usec, uint16_t counter, uint8_t count, uint8_t connection_type, uint8_t info,
const uint16_t *failure_flags,
const uint32_t *error_count,
const int16_t *temperature)
284#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
285 char buf[MAVLINK_MSG_ID_ESC_INFO_LEN];
286 _mav_put_uint64_t(buf, 0, time_usec);
287 _mav_put_uint16_t(buf, 24, counter);
288 _mav_put_uint8_t(buf, 42, index);
289 _mav_put_uint8_t(buf, 43, count);
290 _mav_put_uint8_t(buf, 44, connection_type);
291 _mav_put_uint8_t(buf, 45, info);
292 _mav_put_uint32_t_array(buf, 8, error_count, 4);
293 _mav_put_uint16_t_array(buf, 26, failure_flags, 4);
294 _mav_put_int16_t_array(buf, 34, temperature, 4);
295 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_INFO, buf, MAVLINK_MSG_ID_ESC_INFO_MIN_LEN, MAVLINK_MSG_ID_ESC_INFO_LEN, MAVLINK_MSG_ID_ESC_INFO_CRC);
297 mavlink_esc_info_t packet;
298 packet.time_usec = time_usec;
299 packet.counter = counter;
300 packet.index = index;
301 packet.count = count;
302 packet.connection_type = connection_type;
304 mav_array_memcpy(packet.error_count, error_count,
sizeof(uint32_t)*4);
305 mav_array_memcpy(packet.failure_flags, failure_flags,
sizeof(uint16_t)*4);
306 mav_array_memcpy(packet.temperature, temperature,
sizeof(int16_t)*4);
307 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_INFO, (
const char *)&packet, MAVLINK_MSG_ID_ESC_INFO_MIN_LEN, MAVLINK_MSG_ID_ESC_INFO_LEN, MAVLINK_MSG_ID_ESC_INFO_CRC);
312
313
314
315
317static inline void mavlink_msg_esc_info_send_struct(mavlink_channel_t chan,
const mavlink_esc_info_t* esc_info)
319#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
320 mavlink_msg_esc_info_send(chan, esc_info->index, esc_info->time_usec, esc_info->counter, esc_info->count, esc_info->connection_type, esc_info->info, esc_info->failure_flags, esc_info->error_count, esc_info->temperature);
322 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_INFO, (
const char *)esc_info, MAVLINK_MSG_ID_ESC_INFO_MIN_LEN, MAVLINK_MSG_ID_ESC_INFO_LEN, MAVLINK_MSG_ID_ESC_INFO_CRC);
326#if MAVLINK_MSG_ID_ESC_INFO_LEN <= MAVLINK_MAX_PAYLOAD_LEN
328
329
330
331
332
333
335static inline void mavlink_msg_esc_info_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t index, uint64_t time_usec, uint16_t counter, uint8_t count, uint8_t connection_type, uint8_t info,
const uint16_t *failure_flags,
const uint32_t *error_count,
const int16_t *temperature)
337#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
338 char *buf = (
char *)msgbuf;
339 _mav_put_uint64_t(buf, 0, time_usec);
340 _mav_put_uint16_t(buf, 24, counter);
341 _mav_put_uint8_t(buf, 42, index);
342 _mav_put_uint8_t(buf, 43, count);
343 _mav_put_uint8_t(buf, 44, connection_type);
344 _mav_put_uint8_t(buf, 45, info);
345 _mav_put_uint32_t_array(buf, 8, error_count, 4);
346 _mav_put_uint16_t_array(buf, 26, failure_flags, 4);
347 _mav_put_int16_t_array(buf, 34, temperature, 4);
348 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_INFO, buf, MAVLINK_MSG_ID_ESC_INFO_MIN_LEN, MAVLINK_MSG_ID_ESC_INFO_LEN, MAVLINK_MSG_ID_ESC_INFO_CRC);
350 mavlink_esc_info_t *packet = (mavlink_esc_info_t *)msgbuf;
351 packet->time_usec = time_usec;
352 packet->counter = counter;
353 packet->index = index;
354 packet->count = count;
355 packet->connection_type = connection_type;
357 mav_array_memcpy(packet->error_count, error_count,
sizeof(uint32_t)*4);
358 mav_array_memcpy(packet->failure_flags, failure_flags,
sizeof(uint16_t)*4);
359 mav_array_memcpy(packet->temperature, temperature,
sizeof(int16_t)*4);
360 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ESC_INFO, (
const char *)packet, MAVLINK_MSG_ID_ESC_INFO_MIN_LEN, MAVLINK_MSG_ID_ESC_INFO_LEN, MAVLINK_MSG_ID_ESC_INFO_CRC);
371
372
373
374
376static inline uint8_t mavlink_msg_esc_info_get_index(
const mavlink_message_t* msg)
378 return _MAV_RETURN_uint8_t(msg, 42);
382
383
384
385
387static inline uint64_t mavlink_msg_esc_info_get_time_usec(
const mavlink_message_t* msg)
389 return _MAV_RETURN_uint64_t(msg, 0);
393
394
395
396
398static inline uint16_t mavlink_msg_esc_info_get_counter(
const mavlink_message_t* msg)
400 return _MAV_RETURN_uint16_t(msg, 24);
404
405
406
407
409static inline uint8_t mavlink_msg_esc_info_get_count(
const mavlink_message_t* msg)
411 return _MAV_RETURN_uint8_t(msg, 43);
415
416
417
418
420static inline uint8_t mavlink_msg_esc_info_get_connection_type(
const mavlink_message_t* msg)
422 return _MAV_RETURN_uint8_t(msg, 44);
426
427
428
429
431static inline uint8_t mavlink_msg_esc_info_get_info(
const mavlink_message_t* msg)
433 return _MAV_RETURN_uint8_t(msg, 45);
437
438
439
440
442static inline uint16_t mavlink_msg_esc_info_get_failure_flags(
const mavlink_message_t* msg, uint16_t *failure_flags)
444 return _MAV_RETURN_uint16_t_array(msg, failure_flags, 4, 26);
448
449
450
451
453static inline uint16_t mavlink_msg_esc_info_get_error_count(
const mavlink_message_t* msg, uint32_t *error_count)
455 return _MAV_RETURN_uint32_t_array(msg, error_count, 4, 8);
459
460
461
462
464static inline uint16_t mavlink_msg_esc_info_get_temperature(
const mavlink_message_t* msg, int16_t *temperature)
466 return _MAV_RETURN_int16_t_array(msg, temperature, 4, 34);
470
471
472
473
474
476static inline void mavlink_msg_esc_info_decode(
const mavlink_message_t* msg, mavlink_esc_info_t* esc_info)
478#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
479 esc_info->time_usec = mavlink_msg_esc_info_get_time_usec(msg);
480 mavlink_msg_esc_info_get_error_count(msg, esc_info->error_count);
481 esc_info->counter = mavlink_msg_esc_info_get_counter(msg);
482 mavlink_msg_esc_info_get_failure_flags(msg, esc_info->failure_flags);
483 mavlink_msg_esc_info_get_temperature(msg, esc_info->temperature);
484 esc_info->index = mavlink_msg_esc_info_get_index(msg);
485 esc_info->count = mavlink_msg_esc_info_get_count(msg);
486 esc_info->connection_type = mavlink_msg_esc_info_get_connection_type(msg);
487 esc_info->info = mavlink_msg_esc_info_get_info(msg);
489 uint8_t len = msg->len < MAVLINK_MSG_ID_ESC_INFO_LEN? msg->len : MAVLINK_MSG_ID_ESC_INFO_LEN;
490 memset(esc_info, 0, MAVLINK_MSG_ID_ESC_INFO_LEN);
491 memcpy(esc_info, _MAV_PAYLOAD(msg), len);
#define MAVLINK_MSG_ID_ESC_INFO_MIN_LEN
Definition: mavlink_msg_esc_info.h:20
#define MAVLINK_MSG_ID_ESC_INFO_CRC
Definition: mavlink_msg_esc_info.h:24
#define MAVLINK_MSG_ID_ESC_INFO
Definition: mavlink_msg_esc_info.h:4
#define MAVLINK_MSG_ID_ESC_INFO_LEN
Definition: mavlink_msg_esc_info.h:19
Definition: mavlink_msg_esc_info.h:7
uint8_t count
Definition: mavlink_msg_esc_info.h:14
uint8_t connection_type
Definition: mavlink_msg_esc_info.h:15
uint64_t time_usec
Definition: mavlink_msg_esc_info.h:8
uint8_t info
Definition: mavlink_msg_esc_info.h:16
uint8_t index
Definition: mavlink_msg_esc_info.h:13
uint16_t counter
Definition: mavlink_msg_esc_info.h:10