4#define MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC 396
16} mavlink_component_information_basic_t;
18#define MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_LEN 160
19#define MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_MIN_LEN 160
20#define MAVLINK_MSG_ID_396_LEN 160
21#define MAVLINK_MSG_ID_396_MIN_LEN 160
23#define MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_CRC 50
24#define MAVLINK_MSG_ID_396_CRC 50
26#define MAVLINK_MSG_COMPONENT_INFORMATION_BASIC_FIELD_VENDOR_NAME_LEN 32
27#define MAVLINK_MSG_COMPONENT_INFORMATION_BASIC_FIELD_MODEL_NAME_LEN 32
28#define MAVLINK_MSG_COMPONENT_INFORMATION_BASIC_FIELD_SOFTWARE_VERSION_LEN 24
29#define MAVLINK_MSG_COMPONENT_INFORMATION_BASIC_FIELD_HARDWARE_VERSION_LEN 24
30#define MAVLINK_MSG_COMPONENT_INFORMATION_BASIC_FIELD_SERIAL_NUMBER_LEN 32
32#if MAVLINK_COMMAND_24BIT
33#define MAVLINK_MESSAGE_INFO_COMPONENT_INFORMATION_BASIC {
35 "COMPONENT_INFORMATION_BASIC",
37 { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0
, 8
, offsetof(mavlink_component_information_basic_t, time_boot_ms) },
38 { "capabilities", NULL, MAVLINK_TYPE_UINT64_T, 0
, 0
, offsetof(mavlink_component_information_basic_t, capabilities) },
39 { "time_manufacture_s", NULL, MAVLINK_TYPE_UINT32_T, 0
, 12
, offsetof(mavlink_component_information_basic_t, time_manufacture_s) },
40 { "vendor_name", NULL, MAVLINK_TYPE_CHAR, 32
, 16
, offsetof(mavlink_component_information_basic_t, vendor_name) },
41 { "model_name", NULL, MAVLINK_TYPE_CHAR, 32
, 48
, offsetof(mavlink_component_information_basic_t, model_name) },
42 { "software_version", NULL, MAVLINK_TYPE_CHAR, 24
, 80
, offsetof(mavlink_component_information_basic_t, software_version) },
43 { "hardware_version", NULL, MAVLINK_TYPE_CHAR, 24
, 104
, offsetof(mavlink_component_information_basic_t, hardware_version) },
44 { "serial_number", NULL, MAVLINK_TYPE_CHAR, 32
, 128
, offsetof(mavlink_component_information_basic_t, serial_number) },
46}
48#define MAVLINK_MESSAGE_INFO_COMPONENT_INFORMATION_BASIC {
49 "COMPONENT_INFORMATION_BASIC",
51 { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0
, 8
, offsetof(mavlink_component_information_basic_t, time_boot_ms) },
52 { "capabilities", NULL, MAVLINK_TYPE_UINT64_T, 0
, 0
, offsetof(mavlink_component_information_basic_t, capabilities) },
53 { "time_manufacture_s", NULL, MAVLINK_TYPE_UINT32_T, 0
, 12
, offsetof(mavlink_component_information_basic_t, time_manufacture_s) },
54 { "vendor_name", NULL, MAVLINK_TYPE_CHAR, 32
, 16
, offsetof(mavlink_component_information_basic_t, vendor_name) },
55 { "model_name", NULL, MAVLINK_TYPE_CHAR, 32
, 48
, offsetof(mavlink_component_information_basic_t, model_name) },
56 { "software_version", NULL, MAVLINK_TYPE_CHAR, 24
, 80
, offsetof(mavlink_component_information_basic_t, software_version) },
57 { "hardware_version", NULL, MAVLINK_TYPE_CHAR, 24
, 104
, offsetof(mavlink_component_information_basic_t, hardware_version) },
58 { "serial_number", NULL, MAVLINK_TYPE_CHAR, 32
, 128
, offsetof(mavlink_component_information_basic_t, serial_number) },
60}
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79static inline uint16_t mavlink_msg_component_information_basic_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
80 uint32_t time_boot_ms, uint64_t capabilities, uint32_t time_manufacture_s,
const char *vendor_name,
const char *model_name,
const char *software_version,
const char *hardware_version,
const char *serial_number)
82#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
84 _mav_put_uint64_t(buf, 0, capabilities);
85 _mav_put_uint32_t(buf, 8, time_boot_ms);
86 _mav_put_uint32_t(buf, 12, time_manufacture_s);
87 _mav_put_char_array(buf, 16, vendor_name, 32);
88 _mav_put_char_array(buf, 48, model_name, 32);
89 _mav_put_char_array(buf, 80, software_version, 24);
90 _mav_put_char_array(buf, 104, hardware_version, 24);
91 _mav_put_char_array(buf, 128, serial_number, 32);
94 mavlink_component_information_basic_t packet;
95 packet.capabilities = capabilities;
96 packet.time_boot_ms = time_boot_ms;
97 packet.time_manufacture_s = time_manufacture_s;
98 mav_array_memcpy(packet.vendor_name, vendor_name,
sizeof(
char)*32);
99 mav_array_memcpy(packet.model_name, model_name,
sizeof(
char)*32);
100 mav_array_memcpy(packet.software_version, software_version,
sizeof(
char)*24);
101 mav_array_memcpy(packet.hardware_version, hardware_version,
sizeof(
char)*24);
102 mav_array_memcpy(packet.serial_number, serial_number,
sizeof(
char)*32);
103 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_LEN);
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127static inline uint16_t mavlink_msg_component_information_basic_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
128 uint32_t time_boot_ms, uint64_t capabilities, uint32_t time_manufacture_s,
const char *vendor_name,
const char *model_name,
const char *software_version,
const char *hardware_version,
const char *serial_number)
130#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
132 _mav_put_uint64_t(buf, 0, capabilities);
133 _mav_put_uint32_t(buf, 8, time_boot_ms);
134 _mav_put_uint32_t(buf, 12, time_manufacture_s);
135 _mav_put_char_array(buf, 16, vendor_name, 32);
136 _mav_put_char_array(buf, 48, model_name, 32);
137 _mav_put_char_array(buf, 80, software_version, 24);
138 _mav_put_char_array(buf, 104, hardware_version, 24);
139 _mav_put_char_array(buf, 128, serial_number, 32);
142 mavlink_component_information_basic_t packet;
143 packet.capabilities = capabilities;
144 packet.time_boot_ms = time_boot_ms;
145 packet.time_manufacture_s = time_manufacture_s;
146 mav_array_memcpy(packet.vendor_name, vendor_name,
sizeof(
char)*32);
147 mav_array_memcpy(packet.model_name, model_name,
sizeof(
char)*32);
148 mav_array_memcpy(packet.software_version, software_version,
sizeof(
char)*24);
149 mav_array_memcpy(packet.hardware_version, hardware_version,
sizeof(
char)*24);
150 mav_array_memcpy(packet.serial_number, serial_number,
sizeof(
char)*32);
151 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_LEN);
156 return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_CRC);
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178static inline uint16_t mavlink_msg_component_information_basic_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
179 mavlink_message_t* msg,
180 uint32_t time_boot_ms,uint64_t capabilities,uint32_t time_manufacture_s,
const char *vendor_name,
const char *model_name,
const char *software_version,
const char *hardware_version,
const char *serial_number)
182#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
184 _mav_put_uint64_t(buf, 0, capabilities);
185 _mav_put_uint32_t(buf, 8, time_boot_ms);
186 _mav_put_uint32_t(buf, 12, time_manufacture_s);
187 _mav_put_char_array(buf, 16, vendor_name, 32);
188 _mav_put_char_array(buf, 48, model_name, 32);
189 _mav_put_char_array(buf, 80, software_version, 24);
190 _mav_put_char_array(buf, 104, hardware_version, 24);
191 _mav_put_char_array(buf, 128, serial_number, 32);
194 mavlink_component_information_basic_t packet;
195 packet.capabilities = capabilities;
196 packet.time_boot_ms = time_boot_ms;
197 packet.time_manufacture_s = time_manufacture_s;
198 mav_array_memcpy(packet.vendor_name, vendor_name,
sizeof(
char)*32);
199 mav_array_memcpy(packet.model_name, model_name,
sizeof(
char)*32);
200 mav_array_memcpy(packet.software_version, software_version,
sizeof(
char)*24);
201 mav_array_memcpy(packet.hardware_version, hardware_version,
sizeof(
char)*24);
202 mav_array_memcpy(packet.serial_number, serial_number,
sizeof(
char)*32);
203 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_LEN);
211
212
213
214
215
216
217
218static inline uint16_t mavlink_msg_component_information_basic_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_component_information_basic_t* component_information_basic)
220 return mavlink_msg_component_information_basic_pack(system_id, component_id, msg, component_information_basic->time_boot_ms, component_information_basic->capabilities, component_information_basic->time_manufacture_s, component_information_basic->vendor_name, component_information_basic->model_name, component_information_basic->software_version, component_information_basic->hardware_version, component_information_basic->serial_number);
224
225
226
227
228
229
230
231
232static inline uint16_t mavlink_msg_component_information_basic_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_component_information_basic_t* component_information_basic)
234 return mavlink_msg_component_information_basic_pack_chan(system_id, component_id, chan, msg, component_information_basic->time_boot_ms, component_information_basic->capabilities, component_information_basic->time_manufacture_s, component_information_basic->vendor_name, component_information_basic->model_name, component_information_basic->software_version, component_information_basic->hardware_version, component_information_basic->serial_number);
238
239
240
241
242
243
244
245
246static inline uint16_t mavlink_msg_component_information_basic_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg,
const mavlink_component_information_basic_t* component_information_basic)
248 return mavlink_msg_component_information_basic_pack_status(system_id, component_id, _status, msg, component_information_basic->time_boot_ms, component_information_basic->capabilities, component_information_basic->time_manufacture_s, component_information_basic->vendor_name, component_information_basic->model_name, component_information_basic->software_version, component_information_basic->hardware_version, component_information_basic->serial_number);
252
253
254
255
256
257
258
259
260
261
262
263
264#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
266static inline void mavlink_msg_component_information_basic_send(mavlink_channel_t chan, uint32_t time_boot_ms, uint64_t capabilities, uint32_t time_manufacture_s,
const char *vendor_name,
const char *model_name,
const char *software_version,
const char *hardware_version,
const char *serial_number)
268#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
269 char buf[MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_LEN];
270 _mav_put_uint64_t(buf, 0, capabilities);
271 _mav_put_uint32_t(buf, 8, time_boot_ms);
272 _mav_put_uint32_t(buf, 12, time_manufacture_s);
273 _mav_put_char_array(buf, 16, vendor_name, 32);
274 _mav_put_char_array(buf, 48, model_name, 32);
275 _mav_put_char_array(buf, 80, software_version, 24);
276 _mav_put_char_array(buf, 104, hardware_version, 24);
277 _mav_put_char_array(buf, 128, serial_number, 32);
278 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC, buf, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_CRC);
280 mavlink_component_information_basic_t packet;
281 packet.capabilities = capabilities;
282 packet.time_boot_ms = time_boot_ms;
283 packet.time_manufacture_s = time_manufacture_s;
284 mav_array_memcpy(packet.vendor_name, vendor_name,
sizeof(
char)*32);
285 mav_array_memcpy(packet.model_name, model_name,
sizeof(
char)*32);
286 mav_array_memcpy(packet.software_version, software_version,
sizeof(
char)*24);
287 mav_array_memcpy(packet.hardware_version, hardware_version,
sizeof(
char)*24);
288 mav_array_memcpy(packet.serial_number, serial_number,
sizeof(
char)*32);
289 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC, (
const char *)&packet, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_CRC);
294
295
296
297
298static inline void mavlink_msg_component_information_basic_send_struct(mavlink_channel_t chan,
const mavlink_component_information_basic_t* component_information_basic)
300#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
301 mavlink_msg_component_information_basic_send(chan, component_information_basic->time_boot_ms, component_information_basic->capabilities, component_information_basic->time_manufacture_s, component_information_basic->vendor_name, component_information_basic->model_name, component_information_basic->software_version, component_information_basic->hardware_version, component_information_basic->serial_number);
303 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC, (
const char *)component_information_basic, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_CRC);
307#if MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_LEN <= MAVLINK_MAX_PAYLOAD_LEN
309
310
311
312
313
314
315static inline void mavlink_msg_component_information_basic_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_boot_ms, uint64_t capabilities, uint32_t time_manufacture_s,
const char *vendor_name,
const char *model_name,
const char *software_version,
const char *hardware_version,
const char *serial_number)
317#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
318 char *buf = (
char *)msgbuf;
319 _mav_put_uint64_t(buf, 0, capabilities);
320 _mav_put_uint32_t(buf, 8, time_boot_ms);
321 _mav_put_uint32_t(buf, 12, time_manufacture_s);
322 _mav_put_char_array(buf, 16, vendor_name, 32);
323 _mav_put_char_array(buf, 48, model_name, 32);
324 _mav_put_char_array(buf, 80, software_version, 24);
325 _mav_put_char_array(buf, 104, hardware_version, 24);
326 _mav_put_char_array(buf, 128, serial_number, 32);
327 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC, buf, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_CRC);
329 mavlink_component_information_basic_t *packet = (mavlink_component_information_basic_t *)msgbuf;
330 packet->capabilities = capabilities;
331 packet->time_boot_ms = time_boot_ms;
332 packet->time_manufacture_s = time_manufacture_s;
333 mav_array_memcpy(packet->vendor_name, vendor_name,
sizeof(
char)*32);
334 mav_array_memcpy(packet->model_name, model_name,
sizeof(
char)*32);
335 mav_array_memcpy(packet->software_version, software_version,
sizeof(
char)*24);
336 mav_array_memcpy(packet->hardware_version, hardware_version,
sizeof(
char)*24);
337 mav_array_memcpy(packet->serial_number, serial_number,
sizeof(
char)*32);
338 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC, (
const char *)packet, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_CRC);
349
350
351
352
353static inline uint32_t mavlink_msg_component_information_basic_get_time_boot_ms(
const mavlink_message_t* msg)
355 return _MAV_RETURN_uint32_t(msg, 8);
359
360
361
362
363static inline uint64_t mavlink_msg_component_information_basic_get_capabilities(
const mavlink_message_t* msg)
365 return _MAV_RETURN_uint64_t(msg, 0);
369
370
371
372
373static inline uint32_t mavlink_msg_component_information_basic_get_time_manufacture_s(
const mavlink_message_t* msg)
375 return _MAV_RETURN_uint32_t(msg, 12);
379
380
381
382
383static inline uint16_t mavlink_msg_component_information_basic_get_vendor_name(
const mavlink_message_t* msg,
char *vendor_name)
385 return _MAV_RETURN_char_array(msg, vendor_name, 32, 16);
389
390
391
392
393static inline uint16_t mavlink_msg_component_information_basic_get_model_name(
const mavlink_message_t* msg,
char *model_name)
395 return _MAV_RETURN_char_array(msg, model_name, 32, 48);
399
400
401
402
403static inline uint16_t mavlink_msg_component_information_basic_get_software_version(
const mavlink_message_t* msg,
char *software_version)
405 return _MAV_RETURN_char_array(msg, software_version, 24, 80);
409
410
411
412
413static inline uint16_t mavlink_msg_component_information_basic_get_hardware_version(
const mavlink_message_t* msg,
char *hardware_version)
415 return _MAV_RETURN_char_array(msg, hardware_version, 24, 104);
419
420
421
422
423static inline uint16_t mavlink_msg_component_information_basic_get_serial_number(
const mavlink_message_t* msg,
char *serial_number)
425 return _MAV_RETURN_char_array(msg, serial_number, 32, 128);
429
430
431
432
433
434static inline void mavlink_msg_component_information_basic_decode(
const mavlink_message_t* msg, mavlink_component_information_basic_t* component_information_basic)
436#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
437 component_information_basic->capabilities = mavlink_msg_component_information_basic_get_capabilities(msg);
438 component_information_basic->time_boot_ms = mavlink_msg_component_information_basic_get_time_boot_ms(msg);
439 component_information_basic->time_manufacture_s = mavlink_msg_component_information_basic_get_time_manufacture_s(msg);
440 mavlink_msg_component_information_basic_get_vendor_name(msg, component_information_basic->vendor_name);
441 mavlink_msg_component_information_basic_get_model_name(msg, component_information_basic->model_name);
442 mavlink_msg_component_information_basic_get_software_version(msg, component_information_basic->software_version);
443 mavlink_msg_component_information_basic_get_hardware_version(msg, component_information_basic->hardware_version);
444 mavlink_msg_component_information_basic_get_serial_number(msg, component_information_basic->serial_number);
446 uint8_t len = msg->len < MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_LEN? msg->len : MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_LEN;
447 memset(component_information_basic, 0, MAVLINK_MSG_ID_COMPONENT_INFORMATION_BASIC_LEN);
448 memcpy(component_information_basic, _MAV_PAYLOAD(msg), len);