4#define MAVLINK_MSG_ID_EVENT 410
17#define MAVLINK_MSG_ID_EVENT_LEN 53
18#define MAVLINK_MSG_ID_EVENT_MIN_LEN 53
19#define MAVLINK_MSG_ID_410_LEN 53
20#define MAVLINK_MSG_ID_410_MIN_LEN 53
22#define MAVLINK_MSG_ID_EVENT_CRC 160
23#define MAVLINK_MSG_ID_410_CRC 160
25#define MAVLINK_MSG_EVENT_FIELD_ARGUMENTS_LEN 40
27#if MAVLINK_COMMAND_24BIT
28#define MAVLINK_MESSAGE_INFO_EVENT {
32 { { "destination_component", NULL, MAVLINK_TYPE_UINT8_T, 0
, 10
, offsetof(mavlink_event_t, destination_component) },
33 { "destination_system", NULL, MAVLINK_TYPE_UINT8_T, 0
, 11
, offsetof(mavlink_event_t, destination_system) },
34 { "id", NULL, MAVLINK_TYPE_UINT32_T, 0
, 0
, offsetof(mavlink_event_t, id) },
35 { "event_time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0
, 4
, offsetof(mavlink_event_t, event_time_boot_ms) },
36 { "sequence", NULL, MAVLINK_TYPE_UINT16_T, 0
, 8
, offsetof(mavlink_event_t, sequence) },
37 { "log_levels", NULL, MAVLINK_TYPE_UINT8_T, 0
, 12
, offsetof(mavlink_event_t, log_levels) },
38 { "arguments", NULL, MAVLINK_TYPE_UINT8_T, 40
, 13
, offsetof(mavlink_event_t, arguments) },
40}
42#define MAVLINK_MESSAGE_INFO_EVENT {
45 { { "destination_component", NULL, MAVLINK_TYPE_UINT8_T, 0
, 10
, offsetof(mavlink_event_t, destination_component) },
46 { "destination_system", NULL, MAVLINK_TYPE_UINT8_T, 0
, 11
, offsetof(mavlink_event_t, destination_system) },
47 { "id", NULL, MAVLINK_TYPE_UINT32_T, 0
, 0
, offsetof(mavlink_event_t, id) },
48 { "event_time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0
, 4
, offsetof(mavlink_event_t, event_time_boot_ms) },
49 { "sequence", NULL, MAVLINK_TYPE_UINT16_T, 0
, 8
, offsetof(mavlink_event_t, sequence) },
50 { "log_levels", NULL, MAVLINK_TYPE_UINT8_T, 0
, 12
, offsetof(mavlink_event_t, log_levels) },
51 { "arguments", NULL, MAVLINK_TYPE_UINT8_T, 40
, 13
, offsetof(mavlink_event_t, arguments) },
53}
57
58
59
60
61
62
63
64
65
66
67
68
69
70
72static inline uint16_t mavlink_msg_event_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
73 uint8_t destination_component, uint8_t destination_system, uint32_t id, uint32_t event_time_boot_ms, uint16_t sequence, uint8_t log_levels,
const uint8_t *arguments)
75#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
77 _mav_put_uint32_t(buf, 0, id);
78 _mav_put_uint32_t(buf, 4, event_time_boot_ms);
79 _mav_put_uint16_t(buf, 8, sequence);
80 _mav_put_uint8_t(buf, 10, destination_component);
81 _mav_put_uint8_t(buf, 11, destination_system);
82 _mav_put_uint8_t(buf, 12, log_levels);
83 _mav_put_uint8_t_array(buf, 13, arguments, 40);
86 mavlink_event_t packet;
88 packet.event_time_boot_ms = event_time_boot_ms;
89 packet.sequence = sequence;
90 packet.destination_component = destination_component;
91 packet.destination_system = destination_system;
92 packet.log_levels = log_levels;
93 mav_array_memcpy(packet.arguments, arguments,
sizeof(uint8_t)*40);
94 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_EVENT_LEN);
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117static inline uint16_t mavlink_msg_event_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
118 uint8_t destination_component, uint8_t destination_system, uint32_t id, uint32_t event_time_boot_ms, uint16_t sequence, uint8_t log_levels,
const uint8_t *arguments)
120#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
122 _mav_put_uint32_t(buf, 0, id);
123 _mav_put_uint32_t(buf, 4, event_time_boot_ms);
124 _mav_put_uint16_t(buf, 8, sequence);
125 _mav_put_uint8_t(buf, 10, destination_component);
126 _mav_put_uint8_t(buf, 11, destination_system);
127 _mav_put_uint8_t(buf, 12, log_levels);
128 _mav_put_uint8_t_array(buf, 13, arguments, 40);
131 mavlink_event_t packet;
133 packet.event_time_boot_ms = event_time_boot_ms;
134 packet.sequence = sequence;
135 packet.destination_component = destination_component;
136 packet.destination_system = destination_system;
137 packet.log_levels = log_levels;
138 mav_array_memcpy(packet.arguments, arguments,
sizeof(uint8_t)*40);
139 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_EVENT_LEN);
144 return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_EVENT_MIN_LEN, MAVLINK_MSG_ID_EVENT_LEN, MAVLINK_MSG_ID_EVENT_CRC);
151
152
153
154
155
156
157
158
159
160
161
162
163
164
166static inline uint16_t mavlink_msg_event_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
167 mavlink_message_t* msg,
168 uint8_t destination_component,uint8_t destination_system,uint32_t id,uint32_t event_time_boot_ms,uint16_t sequence,uint8_t log_levels,
const uint8_t *arguments)
170#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
172 _mav_put_uint32_t(buf, 0, id);
173 _mav_put_uint32_t(buf, 4, event_time_boot_ms);
174 _mav_put_uint16_t(buf, 8, sequence);
175 _mav_put_uint8_t(buf, 10, destination_component);
176 _mav_put_uint8_t(buf, 11, destination_system);
177 _mav_put_uint8_t(buf, 12, log_levels);
178 _mav_put_uint8_t_array(buf, 13, arguments, 40);
181 mavlink_event_t packet;
183 packet.event_time_boot_ms = event_time_boot_ms;
184 packet.sequence = sequence;
185 packet.destination_component = destination_component;
186 packet.destination_system = destination_system;
187 packet.log_levels = log_levels;
188 mav_array_memcpy(packet.arguments, arguments,
sizeof(uint8_t)*40);
189 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_EVENT_LEN);
197
198
199
200
201
202
203
205static inline uint16_t mavlink_msg_event_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_event_t* event)
207 return mavlink_msg_event_pack(system_id, component_id, msg, event->destination_component, event->destination_system, event->id, event->event_time_boot_ms, event->sequence, event->log_levels, event->arguments);
211
212
213
214
215
216
217
218
220static inline uint16_t mavlink_msg_event_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_event_t* event)
222 return mavlink_msg_event_pack_chan(system_id, component_id, chan, msg, event->destination_component, event->destination_system, event->id, event->event_time_boot_ms, event->sequence, event->log_levels, event->arguments);
226
227
228
229
230
231
232
233
234static inline uint16_t mavlink_msg_event_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg,
const mavlink_event_t* event)
236 return mavlink_msg_event_pack_status(system_id, component_id, _status, msg, event->destination_component, event->destination_system, event->id, event->event_time_boot_ms, event->sequence, event->log_levels, event->arguments);
240
241
242
243
244
245
246
247
248
249
250
251#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
254static inline void mavlink_msg_event_send(mavlink_channel_t chan, uint8_t destination_component, uint8_t destination_system, uint32_t id, uint32_t event_time_boot_ms, uint16_t sequence, uint8_t log_levels,
const uint8_t *arguments)
256#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
257 char buf[MAVLINK_MSG_ID_EVENT_LEN];
258 _mav_put_uint32_t(buf, 0, id);
259 _mav_put_uint32_t(buf, 4, event_time_boot_ms);
260 _mav_put_uint16_t(buf, 8, sequence);
261 _mav_put_uint8_t(buf, 10, destination_component);
262 _mav_put_uint8_t(buf, 11, destination_system);
263 _mav_put_uint8_t(buf, 12, log_levels);
264 _mav_put_uint8_t_array(buf, 13, arguments, 40);
265 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_EVENT, buf, MAVLINK_MSG_ID_EVENT_MIN_LEN, MAVLINK_MSG_ID_EVENT_LEN, MAVLINK_MSG_ID_EVENT_CRC);
267 mavlink_event_t packet;
269 packet.event_time_boot_ms = event_time_boot_ms;
270 packet.sequence = sequence;
271 packet.destination_component = destination_component;
272 packet.destination_system = destination_system;
273 packet.log_levels = log_levels;
274 mav_array_memcpy(packet.arguments, arguments,
sizeof(uint8_t)*40);
275 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_EVENT, (
const char *)&packet, MAVLINK_MSG_ID_EVENT_MIN_LEN, MAVLINK_MSG_ID_EVENT_LEN, MAVLINK_MSG_ID_EVENT_CRC);
280
281
282
283
285static inline void mavlink_msg_event_send_struct(mavlink_channel_t chan,
const mavlink_event_t* event)
287#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
288 mavlink_msg_event_send(chan, event->destination_component, event->destination_system, event->id, event->event_time_boot_ms, event->sequence, event->log_levels, event->arguments);
290 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_EVENT, (
const char *)event, MAVLINK_MSG_ID_EVENT_MIN_LEN, MAVLINK_MSG_ID_EVENT_LEN, MAVLINK_MSG_ID_EVENT_CRC);
294#if MAVLINK_MSG_ID_EVENT_LEN <= MAVLINK_MAX_PAYLOAD_LEN
296
297
298
299
300
301
303static inline void mavlink_msg_event_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t destination_component, uint8_t destination_system, uint32_t id, uint32_t event_time_boot_ms, uint16_t sequence, uint8_t log_levels,
const uint8_t *arguments)
305#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
306 char *buf = (
char *)msgbuf;
307 _mav_put_uint32_t(buf, 0, id);
308 _mav_put_uint32_t(buf, 4, event_time_boot_ms);
309 _mav_put_uint16_t(buf, 8, sequence);
310 _mav_put_uint8_t(buf, 10, destination_component);
311 _mav_put_uint8_t(buf, 11, destination_system);
312 _mav_put_uint8_t(buf, 12, log_levels);
313 _mav_put_uint8_t_array(buf, 13, arguments, 40);
314 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_EVENT, buf, MAVLINK_MSG_ID_EVENT_MIN_LEN, MAVLINK_MSG_ID_EVENT_LEN, MAVLINK_MSG_ID_EVENT_CRC);
316 mavlink_event_t *packet = (mavlink_event_t *)msgbuf;
318 packet->event_time_boot_ms = event_time_boot_ms;
319 packet->sequence = sequence;
320 packet->destination_component = destination_component;
321 packet->destination_system = destination_system;
322 packet->log_levels = log_levels;
323 mav_array_memcpy(packet->arguments, arguments,
sizeof(uint8_t)*40);
324 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_EVENT, (
const char *)packet, MAVLINK_MSG_ID_EVENT_MIN_LEN, MAVLINK_MSG_ID_EVENT_LEN, MAVLINK_MSG_ID_EVENT_CRC);
335
336
337
338
340static inline uint8_t mavlink_msg_event_get_destination_component(
const mavlink_message_t* msg)
342 return _MAV_RETURN_uint8_t(msg, 10);
346
347
348
349
351static inline uint8_t mavlink_msg_event_get_destination_system(
const mavlink_message_t* msg)
353 return _MAV_RETURN_uint8_t(msg, 11);
357
358
359
360
362static inline uint32_t mavlink_msg_event_get_id(
const mavlink_message_t* msg)
364 return _MAV_RETURN_uint32_t(msg, 0);
368
369
370
371
373static inline uint32_t mavlink_msg_event_get_event_time_boot_ms(
const mavlink_message_t* msg)
375 return _MAV_RETURN_uint32_t(msg, 4);
379
380
381
382
384static inline uint16_t mavlink_msg_event_get_sequence(
const mavlink_message_t* msg)
386 return _MAV_RETURN_uint16_t(msg, 8);
390
391
392
393
395static inline uint8_t mavlink_msg_event_get_log_levels(
const mavlink_message_t* msg)
397 return _MAV_RETURN_uint8_t(msg, 12);
401
402
403
404
406static inline uint16_t mavlink_msg_event_get_arguments(
const mavlink_message_t* msg, uint8_t *arguments)
408 return _MAV_RETURN_uint8_t_array(msg, arguments, 40, 13);
412
413
414
415
416
418static inline void mavlink_msg_event_decode(
const mavlink_message_t* msg, mavlink_event_t* event)
420#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
421 event->id = mavlink_msg_event_get_id(msg);
422 event->event_time_boot_ms = mavlink_msg_event_get_event_time_boot_ms(msg);
423 event->sequence = mavlink_msg_event_get_sequence(msg);
424 event->destination_component = mavlink_msg_event_get_destination_component(msg);
425 event->destination_system = mavlink_msg_event_get_destination_system(msg);
426 event->log_levels = mavlink_msg_event_get_log_levels(msg);
427 mavlink_msg_event_get_arguments(msg, event->arguments);
429 uint8_t len = msg->len < MAVLINK_MSG_ID_EVENT_LEN? msg->len : MAVLINK_MSG_ID_EVENT_LEN;
430 memset(event, 0, MAVLINK_MSG_ID_EVENT_LEN);
431 memcpy(event, _MAV_PAYLOAD(msg), len);
#define MAVLINK_MSG_ID_EVENT_MIN_LEN
Definition: mavlink_msg_event.h:18
#define MAVLINK_MSG_ID_EVENT_CRC
Definition: mavlink_msg_event.h:22
#define MAVLINK_MSG_ID_EVENT_LEN
Definition: mavlink_msg_event.h:17
#define MAVLINK_MSG_ID_EVENT
Definition: mavlink_msg_event.h:4
Definition: mavlink_msg_event.h:7
uint8_t destination_system
Definition: mavlink_msg_event.h:12
uint32_t event_time_boot_ms
Definition: mavlink_msg_event.h:9
uint8_t destination_component
Definition: mavlink_msg_event.h:11
uint32_t id
Definition: mavlink_msg_event.h:8
uint16_t sequence
Definition: mavlink_msg_event.h:10
uint8_t log_levels
Definition: mavlink_msg_event.h:13