4#define MAVLINK_MSG_ID_COMPONENT_INFORMATION 395
13} mavlink_component_information_t;
15#define MAVLINK_MSG_ID_COMPONENT_INFORMATION_LEN 212
16#define MAVLINK_MSG_ID_COMPONENT_INFORMATION_MIN_LEN 212
17#define MAVLINK_MSG_ID_395_LEN 212
18#define MAVLINK_MSG_ID_395_MIN_LEN 212
20#define MAVLINK_MSG_ID_COMPONENT_INFORMATION_CRC 0
21#define MAVLINK_MSG_ID_395_CRC 0
23#define MAVLINK_MSG_COMPONENT_INFORMATION_FIELD_GENERAL_METADATA_URI_LEN 100
24#define MAVLINK_MSG_COMPONENT_INFORMATION_FIELD_PERIPHERALS_METADATA_URI_LEN 100
26#if MAVLINK_COMMAND_24BIT
27#define MAVLINK_MESSAGE_INFO_COMPONENT_INFORMATION {
29 "COMPONENT_INFORMATION",
31 { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0
, 0
, offsetof(mavlink_component_information_t, time_boot_ms) },
32 { "general_metadata_file_crc", NULL, MAVLINK_TYPE_UINT32_T, 0
, 4
, offsetof(mavlink_component_information_t, general_metadata_file_crc) },
33 { "general_metadata_uri", NULL, MAVLINK_TYPE_CHAR, 100
, 12
, offsetof(mavlink_component_information_t, general_metadata_uri) },
34 { "peripherals_metadata_file_crc", NULL, MAVLINK_TYPE_UINT32_T, 0
, 8
, offsetof(mavlink_component_information_t, peripherals_metadata_file_crc) },
35 { "peripherals_metadata_uri", NULL, MAVLINK_TYPE_CHAR, 100
, 112
, offsetof(mavlink_component_information_t, peripherals_metadata_uri) },
37}
39#define MAVLINK_MESSAGE_INFO_COMPONENT_INFORMATION {
40 "COMPONENT_INFORMATION",
42 { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0
, 0
, offsetof(mavlink_component_information_t, time_boot_ms) },
43 { "general_metadata_file_crc", NULL, MAVLINK_TYPE_UINT32_T, 0
, 4
, offsetof(mavlink_component_information_t, general_metadata_file_crc) },
44 { "general_metadata_uri", NULL, MAVLINK_TYPE_CHAR, 100
, 12
, offsetof(mavlink_component_information_t, general_metadata_uri) },
45 { "peripherals_metadata_file_crc", NULL, MAVLINK_TYPE_UINT32_T, 0
, 8
, offsetof(mavlink_component_information_t, peripherals_metadata_file_crc) },
46 { "peripherals_metadata_uri", NULL, MAVLINK_TYPE_CHAR, 100
, 112
, offsetof(mavlink_component_information_t, peripherals_metadata_uri) },
48}
52
53
54
55
56
57
58
59
60
61
62
63
64static inline uint16_t mavlink_msg_component_information_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
65 uint32_t time_boot_ms, uint32_t general_metadata_file_crc,
const char *general_metadata_uri, uint32_t peripherals_metadata_file_crc,
const char *peripherals_metadata_uri)
67#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
69 _mav_put_uint32_t(buf, 0, time_boot_ms);
70 _mav_put_uint32_t(buf, 4, general_metadata_file_crc);
71 _mav_put_uint32_t(buf, 8, peripherals_metadata_file_crc);
72 _mav_put_char_array(buf, 12, general_metadata_uri, 100);
73 _mav_put_char_array(buf, 112, peripherals_metadata_uri, 100);
76 mavlink_component_information_t packet;
77 packet.time_boot_ms = time_boot_ms;
78 packet.general_metadata_file_crc = general_metadata_file_crc;
79 packet.peripherals_metadata_file_crc = peripherals_metadata_file_crc;
80 mav_array_memcpy(packet.general_metadata_uri, general_metadata_uri,
sizeof(
char)*100);
81 mav_array_memcpy(packet.peripherals_metadata_uri, peripherals_metadata_uri,
sizeof(
char)*100);
82 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_COMPONENT_INFORMATION_LEN);
90
91
92
93
94
95
96
97
98
99
100
101
102
103static inline uint16_t mavlink_msg_component_information_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
104 uint32_t time_boot_ms, uint32_t general_metadata_file_crc,
const char *general_metadata_uri, uint32_t peripherals_metadata_file_crc,
const char *peripherals_metadata_uri)
106#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
108 _mav_put_uint32_t(buf, 0, time_boot_ms);
109 _mav_put_uint32_t(buf, 4, general_metadata_file_crc);
110 _mav_put_uint32_t(buf, 8, peripherals_metadata_file_crc);
111 _mav_put_char_array(buf, 12, general_metadata_uri, 100);
112 _mav_put_char_array(buf, 112, peripherals_metadata_uri, 100);
115 mavlink_component_information_t packet;
116 packet.time_boot_ms = time_boot_ms;
117 packet.general_metadata_file_crc = general_metadata_file_crc;
118 packet.peripherals_metadata_file_crc = peripherals_metadata_file_crc;
119 mav_array_memcpy(packet.general_metadata_uri, general_metadata_uri,
sizeof(
char)*100);
120 mav_array_memcpy(packet.peripherals_metadata_uri, peripherals_metadata_uri,
sizeof(
char)*100);
121 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_COMPONENT_INFORMATION_LEN);
126 return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_COMPONENT_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_CRC);
133
134
135
136
137
138
139
140
141
142
143
144
145static inline uint16_t mavlink_msg_component_information_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
146 mavlink_message_t* msg,
147 uint32_t time_boot_ms,uint32_t general_metadata_file_crc,
const char *general_metadata_uri,uint32_t peripherals_metadata_file_crc,
const char *peripherals_metadata_uri)
149#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
151 _mav_put_uint32_t(buf, 0, time_boot_ms);
152 _mav_put_uint32_t(buf, 4, general_metadata_file_crc);
153 _mav_put_uint32_t(buf, 8, peripherals_metadata_file_crc);
154 _mav_put_char_array(buf, 12, general_metadata_uri, 100);
155 _mav_put_char_array(buf, 112, peripherals_metadata_uri, 100);
158 mavlink_component_information_t packet;
159 packet.time_boot_ms = time_boot_ms;
160 packet.general_metadata_file_crc = general_metadata_file_crc;
161 packet.peripherals_metadata_file_crc = peripherals_metadata_file_crc;
162 mav_array_memcpy(packet.general_metadata_uri, general_metadata_uri,
sizeof(
char)*100);
163 mav_array_memcpy(packet.peripherals_metadata_uri, peripherals_metadata_uri,
sizeof(
char)*100);
164 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_COMPONENT_INFORMATION_LEN);
172
173
174
175
176
177
178
179static inline uint16_t mavlink_msg_component_information_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_component_information_t* component_information)
181 return mavlink_msg_component_information_pack(system_id, component_id, msg, component_information->time_boot_ms, component_information->general_metadata_file_crc, component_information->general_metadata_uri, component_information->peripherals_metadata_file_crc, component_information->peripherals_metadata_uri);
185
186
187
188
189
190
191
192
193static inline uint16_t mavlink_msg_component_information_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_component_information_t* component_information)
195 return mavlink_msg_component_information_pack_chan(system_id, component_id, chan, msg, component_information->time_boot_ms, component_information->general_metadata_file_crc, component_information->general_metadata_uri, component_information->peripherals_metadata_file_crc, component_information->peripherals_metadata_uri);
199
200
201
202
203
204
205
206
207static inline uint16_t mavlink_msg_component_information_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg,
const mavlink_component_information_t* component_information)
209 return mavlink_msg_component_information_pack_status(system_id, component_id, _status, msg, component_information->time_boot_ms, component_information->general_metadata_file_crc, component_information->general_metadata_uri, component_information->peripherals_metadata_file_crc, component_information->peripherals_metadata_uri);
213
214
215
216
217
218
219
220
221
222#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
224static inline void mavlink_msg_component_information_send(mavlink_channel_t chan, uint32_t time_boot_ms, uint32_t general_metadata_file_crc,
const char *general_metadata_uri, uint32_t peripherals_metadata_file_crc,
const char *peripherals_metadata_uri)
226#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
227 char buf[MAVLINK_MSG_ID_COMPONENT_INFORMATION_LEN];
228 _mav_put_uint32_t(buf, 0, time_boot_ms);
229 _mav_put_uint32_t(buf, 4, general_metadata_file_crc);
230 _mav_put_uint32_t(buf, 8, peripherals_metadata_file_crc);
231 _mav_put_char_array(buf, 12, general_metadata_uri, 100);
232 _mav_put_char_array(buf, 112, peripherals_metadata_uri, 100);
233 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMPONENT_INFORMATION, buf, MAVLINK_MSG_ID_COMPONENT_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_CRC);
235 mavlink_component_information_t packet;
236 packet.time_boot_ms = time_boot_ms;
237 packet.general_metadata_file_crc = general_metadata_file_crc;
238 packet.peripherals_metadata_file_crc = peripherals_metadata_file_crc;
239 mav_array_memcpy(packet.general_metadata_uri, general_metadata_uri,
sizeof(
char)*100);
240 mav_array_memcpy(packet.peripherals_metadata_uri, peripherals_metadata_uri,
sizeof(
char)*100);
241 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMPONENT_INFORMATION, (
const char *)&packet, MAVLINK_MSG_ID_COMPONENT_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_CRC);
246
247
248
249
250static inline void mavlink_msg_component_information_send_struct(mavlink_channel_t chan,
const mavlink_component_information_t* component_information)
252#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
253 mavlink_msg_component_information_send(chan, component_information->time_boot_ms, component_information->general_metadata_file_crc, component_information->general_metadata_uri, component_information->peripherals_metadata_file_crc, component_information->peripherals_metadata_uri);
255 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMPONENT_INFORMATION, (
const char *)component_information, MAVLINK_MSG_ID_COMPONENT_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_CRC);
259#if MAVLINK_MSG_ID_COMPONENT_INFORMATION_LEN <= MAVLINK_MAX_PAYLOAD_LEN
261
262
263
264
265
266
267static inline void mavlink_msg_component_information_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_boot_ms, uint32_t general_metadata_file_crc,
const char *general_metadata_uri, uint32_t peripherals_metadata_file_crc,
const char *peripherals_metadata_uri)
269#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
270 char *buf = (
char *)msgbuf;
271 _mav_put_uint32_t(buf, 0, time_boot_ms);
272 _mav_put_uint32_t(buf, 4, general_metadata_file_crc);
273 _mav_put_uint32_t(buf, 8, peripherals_metadata_file_crc);
274 _mav_put_char_array(buf, 12, general_metadata_uri, 100);
275 _mav_put_char_array(buf, 112, peripherals_metadata_uri, 100);
276 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMPONENT_INFORMATION, buf, MAVLINK_MSG_ID_COMPONENT_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_CRC);
278 mavlink_component_information_t *packet = (mavlink_component_information_t *)msgbuf;
279 packet->time_boot_ms = time_boot_ms;
280 packet->general_metadata_file_crc = general_metadata_file_crc;
281 packet->peripherals_metadata_file_crc = peripherals_metadata_file_crc;
282 mav_array_memcpy(packet->general_metadata_uri, general_metadata_uri,
sizeof(
char)*100);
283 mav_array_memcpy(packet->peripherals_metadata_uri, peripherals_metadata_uri,
sizeof(
char)*100);
284 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMPONENT_INFORMATION, (
const char *)packet, MAVLINK_MSG_ID_COMPONENT_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_LEN, MAVLINK_MSG_ID_COMPONENT_INFORMATION_CRC);
295
296
297
298
299static inline uint32_t mavlink_msg_component_information_get_time_boot_ms(
const mavlink_message_t* msg)
301 return _MAV_RETURN_uint32_t(msg, 0);
305
306
307
308
309static inline uint32_t mavlink_msg_component_information_get_general_metadata_file_crc(
const mavlink_message_t* msg)
311 return _MAV_RETURN_uint32_t(msg, 4);
315
316
317
318
319static inline uint16_t mavlink_msg_component_information_get_general_metadata_uri(
const mavlink_message_t* msg,
char *general_metadata_uri)
321 return _MAV_RETURN_char_array(msg, general_metadata_uri, 100, 12);
325
326
327
328
329static inline uint32_t mavlink_msg_component_information_get_peripherals_metadata_file_crc(
const mavlink_message_t* msg)
331 return _MAV_RETURN_uint32_t(msg, 8);
335
336
337
338
339static inline uint16_t mavlink_msg_component_information_get_peripherals_metadata_uri(
const mavlink_message_t* msg,
char *peripherals_metadata_uri)
341 return _MAV_RETURN_char_array(msg, peripherals_metadata_uri, 100, 112);
345
346
347
348
349
350static inline void mavlink_msg_component_information_decode(
const mavlink_message_t* msg, mavlink_component_information_t* component_information)
352#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
353 component_information->time_boot_ms = mavlink_msg_component_information_get_time_boot_ms(msg);
354 component_information->general_metadata_file_crc = mavlink_msg_component_information_get_general_metadata_file_crc(msg);
355 component_information->peripherals_metadata_file_crc = mavlink_msg_component_information_get_peripherals_metadata_file_crc(msg);
356 mavlink_msg_component_information_get_general_metadata_uri(msg, component_information->general_metadata_uri);
357 mavlink_msg_component_information_get_peripherals_metadata_uri(msg, component_information->peripherals_metadata_uri);
359 uint8_t len = msg->len < MAVLINK_MSG_ID_COMPONENT_INFORMATION_LEN? msg->len : MAVLINK_MSG_ID_COMPONENT_INFORMATION_LEN;
360 memset(component_information, 0, MAVLINK_MSG_ID_COMPONENT_INFORMATION_LEN);
361 memcpy(component_information, _MAV_PAYLOAD(msg), len);