4#define MAVLINK_MSG_ID_UAVCAN_NODE_INFO 311
17} mavlink_uavcan_node_info_t;
19#define MAVLINK_MSG_ID_UAVCAN_NODE_INFO_LEN 116
20#define MAVLINK_MSG_ID_UAVCAN_NODE_INFO_MIN_LEN 116
21#define MAVLINK_MSG_ID_311_LEN 116
22#define MAVLINK_MSG_ID_311_MIN_LEN 116
24#define MAVLINK_MSG_ID_UAVCAN_NODE_INFO_CRC 95
25#define MAVLINK_MSG_ID_311_CRC 95
27#define MAVLINK_MSG_UAVCAN_NODE_INFO_FIELD_NAME_LEN 80
28#define MAVLINK_MSG_UAVCAN_NODE_INFO_FIELD_HW_UNIQUE_ID_LEN 16
30#if MAVLINK_COMMAND_24BIT
31#define MAVLINK_MESSAGE_INFO_UAVCAN_NODE_INFO {
35 { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0
, 0
, offsetof(mavlink_uavcan_node_info_t, time_usec) },
36 { "uptime_sec", NULL, MAVLINK_TYPE_UINT32_T, 0
, 8
, offsetof(mavlink_uavcan_node_info_t, uptime_sec) },
37 { "name", NULL, MAVLINK_TYPE_CHAR, 80
, 16
, offsetof(mavlink_uavcan_node_info_t, name) },
38 { "hw_version_major", NULL, MAVLINK_TYPE_UINT8_T, 0
, 96
, offsetof(mavlink_uavcan_node_info_t, hw_version_major) },
39 { "hw_version_minor", NULL, MAVLINK_TYPE_UINT8_T, 0
, 97
, offsetof(mavlink_uavcan_node_info_t, hw_version_minor) },
40 { "hw_unique_id", NULL, MAVLINK_TYPE_UINT8_T, 16
, 98
, offsetof(mavlink_uavcan_node_info_t, hw_unique_id) },
41 { "sw_version_major", NULL, MAVLINK_TYPE_UINT8_T, 0
, 114
, offsetof(mavlink_uavcan_node_info_t, sw_version_major) },
42 { "sw_version_minor", NULL, MAVLINK_TYPE_UINT8_T, 0
, 115
, offsetof(mavlink_uavcan_node_info_t, sw_version_minor) },
43 { "sw_vcs_commit", NULL, MAVLINK_TYPE_UINT32_T, 0
, 12
, offsetof(mavlink_uavcan_node_info_t, sw_vcs_commit) },
45}
47#define MAVLINK_MESSAGE_INFO_UAVCAN_NODE_INFO {
50 { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0
, 0
, offsetof(mavlink_uavcan_node_info_t, time_usec) },
51 { "uptime_sec", NULL, MAVLINK_TYPE_UINT32_T, 0
, 8
, offsetof(mavlink_uavcan_node_info_t, uptime_sec) },
52 { "name", NULL, MAVLINK_TYPE_CHAR, 80
, 16
, offsetof(mavlink_uavcan_node_info_t, name) },
53 { "hw_version_major", NULL, MAVLINK_TYPE_UINT8_T, 0
, 96
, offsetof(mavlink_uavcan_node_info_t, hw_version_major) },
54 { "hw_version_minor", NULL, MAVLINK_TYPE_UINT8_T, 0
, 97
, offsetof(mavlink_uavcan_node_info_t, hw_version_minor) },
55 { "hw_unique_id", NULL, MAVLINK_TYPE_UINT8_T, 16
, 98
, offsetof(mavlink_uavcan_node_info_t, hw_unique_id) },
56 { "sw_version_major", NULL, MAVLINK_TYPE_UINT8_T, 0
, 114
, offsetof(mavlink_uavcan_node_info_t, sw_version_major) },
57 { "sw_version_minor", NULL, MAVLINK_TYPE_UINT8_T, 0
, 115
, offsetof(mavlink_uavcan_node_info_t, sw_version_minor) },
58 { "sw_vcs_commit", NULL, MAVLINK_TYPE_UINT32_T, 0
, 12
, offsetof(mavlink_uavcan_node_info_t, sw_vcs_commit) },
60}
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80static inline uint16_t mavlink_msg_uavcan_node_info_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
81 uint64_t time_usec, uint32_t uptime_sec,
const char *name, uint8_t hw_version_major, uint8_t hw_version_minor,
const uint8_t *hw_unique_id, uint8_t sw_version_major, uint8_t sw_version_minor, uint32_t sw_vcs_commit)
83#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
85 _mav_put_uint64_t(buf, 0, time_usec);
86 _mav_put_uint32_t(buf, 8, uptime_sec);
87 _mav_put_uint32_t(buf, 12, sw_vcs_commit);
88 _mav_put_uint8_t(buf, 96, hw_version_major);
89 _mav_put_uint8_t(buf, 97, hw_version_minor);
90 _mav_put_uint8_t(buf, 114, sw_version_major);
91 _mav_put_uint8_t(buf, 115, sw_version_minor);
92 _mav_put_char_array(buf, 16, name, 80);
93 _mav_put_uint8_t_array(buf, 98, hw_unique_id, 16);
96 mavlink_uavcan_node_info_t packet;
97 packet.time_usec = time_usec;
98 packet.uptime_sec = uptime_sec;
99 packet.sw_vcs_commit = sw_vcs_commit;
100 packet.hw_version_major = hw_version_major;
101 packet.hw_version_minor = hw_version_minor;
102 packet.sw_version_major = sw_version_major;
103 packet.sw_version_minor = sw_version_minor;
104 mav_array_memcpy(packet.name, name,
sizeof(
char)*80);
105 mav_array_memcpy(packet.hw_unique_id, hw_unique_id,
sizeof(uint8_t)*16);
106 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_LEN);
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131static inline uint16_t mavlink_msg_uavcan_node_info_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
132 uint64_t time_usec, uint32_t uptime_sec,
const char *name, uint8_t hw_version_major, uint8_t hw_version_minor,
const uint8_t *hw_unique_id, uint8_t sw_version_major, uint8_t sw_version_minor, uint32_t sw_vcs_commit)
134#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
136 _mav_put_uint64_t(buf, 0, time_usec);
137 _mav_put_uint32_t(buf, 8, uptime_sec);
138 _mav_put_uint32_t(buf, 12, sw_vcs_commit);
139 _mav_put_uint8_t(buf, 96, hw_version_major);
140 _mav_put_uint8_t(buf, 97, hw_version_minor);
141 _mav_put_uint8_t(buf, 114, sw_version_major);
142 _mav_put_uint8_t(buf, 115, sw_version_minor);
143 _mav_put_char_array(buf, 16, name, 80);
144 _mav_put_uint8_t_array(buf, 98, hw_unique_id, 16);
147 mavlink_uavcan_node_info_t packet;
148 packet.time_usec = time_usec;
149 packet.uptime_sec = uptime_sec;
150 packet.sw_vcs_commit = sw_vcs_commit;
151 packet.hw_version_major = hw_version_major;
152 packet.hw_version_minor = hw_version_minor;
153 packet.sw_version_major = sw_version_major;
154 packet.sw_version_minor = sw_version_minor;
155 mav_array_memcpy(packet.name, name,
sizeof(
char)*80);
156 mav_array_memcpy(packet.hw_unique_id, hw_unique_id,
sizeof(uint8_t)*16);
157 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_LEN);
162 return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_MIN_LEN, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_LEN, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_CRC);
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185static inline uint16_t mavlink_msg_uavcan_node_info_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
186 mavlink_message_t* msg,
187 uint64_t time_usec,uint32_t uptime_sec,
const char *name,uint8_t hw_version_major,uint8_t hw_version_minor,
const uint8_t *hw_unique_id,uint8_t sw_version_major,uint8_t sw_version_minor,uint32_t sw_vcs_commit)
189#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
191 _mav_put_uint64_t(buf, 0, time_usec);
192 _mav_put_uint32_t(buf, 8, uptime_sec);
193 _mav_put_uint32_t(buf, 12, sw_vcs_commit);
194 _mav_put_uint8_t(buf, 96, hw_version_major);
195 _mav_put_uint8_t(buf, 97, hw_version_minor);
196 _mav_put_uint8_t(buf, 114, sw_version_major);
197 _mav_put_uint8_t(buf, 115, sw_version_minor);
198 _mav_put_char_array(buf, 16, name, 80);
199 _mav_put_uint8_t_array(buf, 98, hw_unique_id, 16);
202 mavlink_uavcan_node_info_t packet;
203 packet.time_usec = time_usec;
204 packet.uptime_sec = uptime_sec;
205 packet.sw_vcs_commit = sw_vcs_commit;
206 packet.hw_version_major = hw_version_major;
207 packet.hw_version_minor = hw_version_minor;
208 packet.sw_version_major = sw_version_major;
209 packet.sw_version_minor = sw_version_minor;
210 mav_array_memcpy(packet.name, name,
sizeof(
char)*80);
211 mav_array_memcpy(packet.hw_unique_id, hw_unique_id,
sizeof(uint8_t)*16);
212 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_LEN);
220
221
222
223
224
225
226
227static inline uint16_t mavlink_msg_uavcan_node_info_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_uavcan_node_info_t* uavcan_node_info)
229 return mavlink_msg_uavcan_node_info_pack(system_id, component_id, msg, uavcan_node_info->time_usec, uavcan_node_info->uptime_sec, uavcan_node_info->name, uavcan_node_info->hw_version_major, uavcan_node_info->hw_version_minor, uavcan_node_info->hw_unique_id, uavcan_node_info->sw_version_major, uavcan_node_info->sw_version_minor, uavcan_node_info->sw_vcs_commit);
233
234
235
236
237
238
239
240
241static inline uint16_t mavlink_msg_uavcan_node_info_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_uavcan_node_info_t* uavcan_node_info)
243 return mavlink_msg_uavcan_node_info_pack_chan(system_id, component_id, chan, msg, uavcan_node_info->time_usec, uavcan_node_info->uptime_sec, uavcan_node_info->name, uavcan_node_info->hw_version_major, uavcan_node_info->hw_version_minor, uavcan_node_info->hw_unique_id, uavcan_node_info->sw_version_major, uavcan_node_info->sw_version_minor, uavcan_node_info->sw_vcs_commit);
247
248
249
250
251
252
253
254
255static inline uint16_t mavlink_msg_uavcan_node_info_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg,
const mavlink_uavcan_node_info_t* uavcan_node_info)
257 return mavlink_msg_uavcan_node_info_pack_status(system_id, component_id, _status, msg, uavcan_node_info->time_usec, uavcan_node_info->uptime_sec, uavcan_node_info->name, uavcan_node_info->hw_version_major, uavcan_node_info->hw_version_minor, uavcan_node_info->hw_unique_id, uavcan_node_info->sw_version_major, uavcan_node_info->sw_version_minor, uavcan_node_info->sw_vcs_commit);
261
262
263
264
265
266
267
268
269
270
271
272
273
274#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
276static inline void mavlink_msg_uavcan_node_info_send(mavlink_channel_t chan, uint64_t time_usec, uint32_t uptime_sec,
const char *name, uint8_t hw_version_major, uint8_t hw_version_minor,
const uint8_t *hw_unique_id, uint8_t sw_version_major, uint8_t sw_version_minor, uint32_t sw_vcs_commit)
278#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
279 char buf[MAVLINK_MSG_ID_UAVCAN_NODE_INFO_LEN];
280 _mav_put_uint64_t(buf, 0, time_usec);
281 _mav_put_uint32_t(buf, 8, uptime_sec);
282 _mav_put_uint32_t(buf, 12, sw_vcs_commit);
283 _mav_put_uint8_t(buf, 96, hw_version_major);
284 _mav_put_uint8_t(buf, 97, hw_version_minor);
285 _mav_put_uint8_t(buf, 114, sw_version_major);
286 _mav_put_uint8_t(buf, 115, sw_version_minor);
287 _mav_put_char_array(buf, 16, name, 80);
288 _mav_put_uint8_t_array(buf, 98, hw_unique_id, 16);
289 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_UAVCAN_NODE_INFO, buf, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_MIN_LEN, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_LEN, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_CRC);
291 mavlink_uavcan_node_info_t packet;
292 packet.time_usec = time_usec;
293 packet.uptime_sec = uptime_sec;
294 packet.sw_vcs_commit = sw_vcs_commit;
295 packet.hw_version_major = hw_version_major;
296 packet.hw_version_minor = hw_version_minor;
297 packet.sw_version_major = sw_version_major;
298 packet.sw_version_minor = sw_version_minor;
299 mav_array_memcpy(packet.name, name,
sizeof(
char)*80);
300 mav_array_memcpy(packet.hw_unique_id, hw_unique_id,
sizeof(uint8_t)*16);
301 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_UAVCAN_NODE_INFO, (
const char *)&packet, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_MIN_LEN, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_LEN, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_CRC);
306
307
308
309
310static inline void mavlink_msg_uavcan_node_info_send_struct(mavlink_channel_t chan,
const mavlink_uavcan_node_info_t* uavcan_node_info)
312#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
313 mavlink_msg_uavcan_node_info_send(chan, uavcan_node_info->time_usec, uavcan_node_info->uptime_sec, uavcan_node_info->name, uavcan_node_info->hw_version_major, uavcan_node_info->hw_version_minor, uavcan_node_info->hw_unique_id, uavcan_node_info->sw_version_major, uavcan_node_info->sw_version_minor, uavcan_node_info->sw_vcs_commit);
315 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_UAVCAN_NODE_INFO, (
const char *)uavcan_node_info, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_MIN_LEN, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_LEN, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_CRC);
319#if MAVLINK_MSG_ID_UAVCAN_NODE_INFO_LEN <= MAVLINK_MAX_PAYLOAD_LEN
321
322
323
324
325
326
327static inline void mavlink_msg_uavcan_node_info_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_t time_usec, uint32_t uptime_sec,
const char *name, uint8_t hw_version_major, uint8_t hw_version_minor,
const uint8_t *hw_unique_id, uint8_t sw_version_major, uint8_t sw_version_minor, uint32_t sw_vcs_commit)
329#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
330 char *buf = (
char *)msgbuf;
331 _mav_put_uint64_t(buf, 0, time_usec);
332 _mav_put_uint32_t(buf, 8, uptime_sec);
333 _mav_put_uint32_t(buf, 12, sw_vcs_commit);
334 _mav_put_uint8_t(buf, 96, hw_version_major);
335 _mav_put_uint8_t(buf, 97, hw_version_minor);
336 _mav_put_uint8_t(buf, 114, sw_version_major);
337 _mav_put_uint8_t(buf, 115, sw_version_minor);
338 _mav_put_char_array(buf, 16, name, 80);
339 _mav_put_uint8_t_array(buf, 98, hw_unique_id, 16);
340 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_UAVCAN_NODE_INFO, buf, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_MIN_LEN, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_LEN, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_CRC);
342 mavlink_uavcan_node_info_t *packet = (mavlink_uavcan_node_info_t *)msgbuf;
343 packet->time_usec = time_usec;
344 packet->uptime_sec = uptime_sec;
345 packet->sw_vcs_commit = sw_vcs_commit;
346 packet->hw_version_major = hw_version_major;
347 packet->hw_version_minor = hw_version_minor;
348 packet->sw_version_major = sw_version_major;
349 packet->sw_version_minor = sw_version_minor;
350 mav_array_memcpy(packet->name, name,
sizeof(
char)*80);
351 mav_array_memcpy(packet->hw_unique_id, hw_unique_id,
sizeof(uint8_t)*16);
352 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_UAVCAN_NODE_INFO, (
const char *)packet, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_MIN_LEN, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_LEN, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_CRC);
363
364
365
366
367static inline uint64_t mavlink_msg_uavcan_node_info_get_time_usec(
const mavlink_message_t* msg)
369 return _MAV_RETURN_uint64_t(msg, 0);
373
374
375
376
377static inline uint32_t mavlink_msg_uavcan_node_info_get_uptime_sec(
const mavlink_message_t* msg)
379 return _MAV_RETURN_uint32_t(msg, 8);
383
384
385
386
387static inline uint16_t mavlink_msg_uavcan_node_info_get_name(
const mavlink_message_t* msg,
char *name)
389 return _MAV_RETURN_char_array(msg, name, 80, 16);
393
394
395
396
397static inline uint8_t mavlink_msg_uavcan_node_info_get_hw_version_major(
const mavlink_message_t* msg)
399 return _MAV_RETURN_uint8_t(msg, 96);
403
404
405
406
407static inline uint8_t mavlink_msg_uavcan_node_info_get_hw_version_minor(
const mavlink_message_t* msg)
409 return _MAV_RETURN_uint8_t(msg, 97);
413
414
415
416
417static inline uint16_t mavlink_msg_uavcan_node_info_get_hw_unique_id(
const mavlink_message_t* msg, uint8_t *hw_unique_id)
419 return _MAV_RETURN_uint8_t_array(msg, hw_unique_id, 16, 98);
423
424
425
426
427static inline uint8_t mavlink_msg_uavcan_node_info_get_sw_version_major(
const mavlink_message_t* msg)
429 return _MAV_RETURN_uint8_t(msg, 114);
433
434
435
436
437static inline uint8_t mavlink_msg_uavcan_node_info_get_sw_version_minor(
const mavlink_message_t* msg)
439 return _MAV_RETURN_uint8_t(msg, 115);
443
444
445
446
447static inline uint32_t mavlink_msg_uavcan_node_info_get_sw_vcs_commit(
const mavlink_message_t* msg)
449 return _MAV_RETURN_uint32_t(msg, 12);
453
454
455
456
457
458static inline void mavlink_msg_uavcan_node_info_decode(
const mavlink_message_t* msg, mavlink_uavcan_node_info_t* uavcan_node_info)
460#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
461 uavcan_node_info->time_usec = mavlink_msg_uavcan_node_info_get_time_usec(msg);
462 uavcan_node_info->uptime_sec = mavlink_msg_uavcan_node_info_get_uptime_sec(msg);
463 uavcan_node_info->sw_vcs_commit = mavlink_msg_uavcan_node_info_get_sw_vcs_commit(msg);
464 mavlink_msg_uavcan_node_info_get_name(msg, uavcan_node_info->name);
465 uavcan_node_info->hw_version_major = mavlink_msg_uavcan_node_info_get_hw_version_major(msg);
466 uavcan_node_info->hw_version_minor = mavlink_msg_uavcan_node_info_get_hw_version_minor(msg);
467 mavlink_msg_uavcan_node_info_get_hw_unique_id(msg, uavcan_node_info->hw_unique_id);
468 uavcan_node_info->sw_version_major = mavlink_msg_uavcan_node_info_get_sw_version_major(msg);
469 uavcan_node_info->sw_version_minor = mavlink_msg_uavcan_node_info_get_sw_version_minor(msg);
471 uint8_t len = msg->len < MAVLINK_MSG_ID_UAVCAN_NODE_INFO_LEN? msg->len : MAVLINK_MSG_ID_UAVCAN_NODE_INFO_LEN;
472 memset(uavcan_node_info, 0, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_LEN);
473 memcpy(uavcan_node_info, _MAV_PAYLOAD(msg), len);
#define MAVLINK_MSG_ID_UAVCAN_NODE_INFO
Definition: mavlink_msg_uavcan_node_info.h:4
#define MAVLINK_MSG_ID_UAVCAN_NODE_INFO_LEN
Definition: mavlink_msg_uavcan_node_info.h:19
#define MAVLINK_MSG_ID_UAVCAN_NODE_INFO_CRC
Definition: mavlink_msg_uavcan_node_info.h:24
#define MAVLINK_MSG_ID_UAVCAN_NODE_INFO_MIN_LEN
Definition: mavlink_msg_uavcan_node_info.h:20
Definition: mavlink_msg_uavcan_node_info.h:7
uint8_t sw_version_minor
Definition: mavlink_msg_uavcan_node_info.h:16
uint64_t time_usec
Definition: mavlink_msg_uavcan_node_info.h:8
char name[80]
Definition: mavlink_msg_uavcan_node_info.h:11
uint8_t sw_version_major
Definition: mavlink_msg_uavcan_node_info.h:15
uint8_t hw_version_major
Definition: mavlink_msg_uavcan_node_info.h:12
uint32_t uptime_sec
Definition: mavlink_msg_uavcan_node_info.h:9
uint32_t sw_vcs_commit
Definition: mavlink_msg_uavcan_node_info.h:10
uint8_t hw_version_minor
Definition: mavlink_msg_uavcan_node_info.h:13