Arduino Mavlink
Loading...
Searching...
No Matches
mavlink_msg_open_drone_id_message_pack.h
Go to the documentation of this file.
1#pragma once
2// MESSAGE OPEN_DRONE_ID_MESSAGE_PACK PACKING
3
4#define MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK 12915
5
6
8 uint8_t target_system; /*< System ID (0 for broadcast).*/
9 uint8_t target_component; /*< Component ID (0 for broadcast).*/
10 uint8_t id_or_mac[20]; /*< Only used for drone ID data received from other UAs. See detailed description at https://mavlink.io/en/services/opendroneid.html. */
11 uint8_t single_message_size; /*< [bytes] This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length.*/
12 uint8_t msg_pack_size; /*< Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9.*/
13 uint8_t messages[225]; /*< Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field.*/
14} mavlink_open_drone_id_message_pack_t;
15
16#define MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_LEN 249
17#define MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_MIN_LEN 249
18#define MAVLINK_MSG_ID_12915_LEN 249
19#define MAVLINK_MSG_ID_12915_MIN_LEN 249
20
21#define MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_CRC 94
22#define MAVLINK_MSG_ID_12915_CRC 94
23
24#define MAVLINK_MSG_OPEN_DRONE_ID_MESSAGE_PACK_FIELD_ID_OR_MAC_LEN 20
25#define MAVLINK_MSG_OPEN_DRONE_ID_MESSAGE_PACK_FIELD_MESSAGES_LEN 225
26
27#if MAVLINK_COMMAND_24BIT
28#define MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_MESSAGE_PACK {
29 12915,
30 "OPEN_DRONE_ID_MESSAGE_PACK",
31 6,
32 { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_open_drone_id_message_pack_t, target_system) },
33 { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_open_drone_id_message_pack_t, target_component) },
34 { "id_or_mac", NULL, MAVLINK_TYPE_UINT8_T, 20, 2, offsetof(mavlink_open_drone_id_message_pack_t, id_or_mac) },
35 { "single_message_size", NULL, MAVLINK_TYPE_UINT8_T, 0, 22, offsetof(mavlink_open_drone_id_message_pack_t, single_message_size) },
36 { "msg_pack_size", NULL, MAVLINK_TYPE_UINT8_T, 0, 23, offsetof(mavlink_open_drone_id_message_pack_t, msg_pack_size) },
37 { "messages", NULL, MAVLINK_TYPE_UINT8_T, 225, 24, offsetof(mavlink_open_drone_id_message_pack_t, messages) },
38 } \
39}
40#else
41#define MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_MESSAGE_PACK {
42 "OPEN_DRONE_ID_MESSAGE_PACK",
43 6,
44 { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_open_drone_id_message_pack_t, target_system) },
45 { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_open_drone_id_message_pack_t, target_component) },
46 { "id_or_mac", NULL, MAVLINK_TYPE_UINT8_T, 20, 2, offsetof(mavlink_open_drone_id_message_pack_t, id_or_mac) },
47 { "single_message_size", NULL, MAVLINK_TYPE_UINT8_T, 0, 22, offsetof(mavlink_open_drone_id_message_pack_t, single_message_size) },
48 { "msg_pack_size", NULL, MAVLINK_TYPE_UINT8_T, 0, 23, offsetof(mavlink_open_drone_id_message_pack_t, msg_pack_size) },
49 { "messages", NULL, MAVLINK_TYPE_UINT8_T, 225, 24, offsetof(mavlink_open_drone_id_message_pack_t, messages) },
50 } \
51}
52#endif
53
54/**
55 * @brief Pack a open_drone_id_message_pack message
56 * @param system_id ID of this system
57 * @param component_id ID of this component (e.g. 200 for IMU)
58 * @param msg The MAVLink message to compress the data into
59 *
60 * @param target_system System ID (0 for broadcast).
61 * @param target_component Component ID (0 for broadcast).
62 * @param id_or_mac Only used for drone ID data received from other UAs. See detailed description at https://mavlink.io/en/services/opendroneid.html.
63 * @param single_message_size [bytes] This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length.
64 * @param msg_pack_size Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9.
65 * @param messages Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field.
66 * @return length of the message in bytes (excluding serial stream start sign)
67 */
68static inline uint16_t mavlink_msg_open_drone_id_message_pack_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
69 uint8_t target_system, uint8_t target_component, const uint8_t *id_or_mac, uint8_t single_message_size, uint8_t msg_pack_size, const uint8_t *messages)
70{
71#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
73 _mav_put_uint8_t(buf, 0, target_system);
74 _mav_put_uint8_t(buf, 1, target_component);
75 _mav_put_uint8_t(buf, 22, single_message_size);
76 _mav_put_uint8_t(buf, 23, msg_pack_size);
77 _mav_put_uint8_t_array(buf, 2, id_or_mac, 20);
78 _mav_put_uint8_t_array(buf, 24, messages, 225);
79 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_LEN);
80#else
81 mavlink_open_drone_id_message_pack_t packet;
82 packet.target_system = target_system;
83 packet.target_component = target_component;
84 packet.single_message_size = single_message_size;
85 packet.msg_pack_size = msg_pack_size;
86 mav_array_memcpy(packet.id_or_mac, id_or_mac, sizeof(uint8_t)*20);
87 mav_array_memcpy(packet.messages, messages, sizeof(uint8_t)*225);
88 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_LEN);
89#endif
90
93}
94
95/**
96 * @brief Pack a open_drone_id_message_pack message
97 * @param system_id ID of this system
98 * @param component_id ID of this component (e.g. 200 for IMU)
99 * @param status MAVLink status structure
100 * @param msg The MAVLink message to compress the data into
101 *
102 * @param target_system System ID (0 for broadcast).
103 * @param target_component Component ID (0 for broadcast).
104 * @param id_or_mac Only used for drone ID data received from other UAs. See detailed description at https://mavlink.io/en/services/opendroneid.html.
105 * @param single_message_size [bytes] This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length.
106 * @param msg_pack_size Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9.
107 * @param messages Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field.
108 * @return length of the message in bytes (excluding serial stream start sign)
109 */
110static inline uint16_t mavlink_msg_open_drone_id_message_pack_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
111 uint8_t target_system, uint8_t target_component, const uint8_t *id_or_mac, uint8_t single_message_size, uint8_t msg_pack_size, const uint8_t *messages)
112{
113#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
115 _mav_put_uint8_t(buf, 0, target_system);
116 _mav_put_uint8_t(buf, 1, target_component);
117 _mav_put_uint8_t(buf, 22, single_message_size);
118 _mav_put_uint8_t(buf, 23, msg_pack_size);
119 _mav_put_uint8_t_array(buf, 2, id_or_mac, 20);
120 _mav_put_uint8_t_array(buf, 24, messages, 225);
121 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_LEN);
122#else
123 mavlink_open_drone_id_message_pack_t packet;
124 packet.target_system = target_system;
125 packet.target_component = target_component;
126 packet.single_message_size = single_message_size;
127 packet.msg_pack_size = msg_pack_size;
128 mav_array_memcpy(packet.id_or_mac, id_or_mac, sizeof(uint8_t)*20);
129 mav_array_memcpy(packet.messages, messages, sizeof(uint8_t)*225);
130 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_LEN);
131#endif
132
134#if MAVLINK_CRC_EXTRA
135 return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_MIN_LEN, MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_LEN, MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_CRC);
136#else
137 return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_MIN_LEN, MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_LEN);
138#endif
139}
140
141/**
142 * @brief Pack a open_drone_id_message_pack message on a channel
143 * @param system_id ID of this system
144 * @param component_id ID of this component (e.g. 200 for IMU)
145 * @param chan The MAVLink channel this message will be sent over
146 * @param msg The MAVLink message to compress the data into
147 * @param target_system System ID (0 for broadcast).
148 * @param target_component Component ID (0 for broadcast).
149 * @param id_or_mac Only used for drone ID data received from other UAs. See detailed description at https://mavlink.io/en/services/opendroneid.html.
150 * @param single_message_size [bytes] This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length.
151 * @param msg_pack_size Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9.
152 * @param messages Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field.
153 * @return length of the message in bytes (excluding serial stream start sign)
154 */
155static inline uint16_t mavlink_msg_open_drone_id_message_pack_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
156 mavlink_message_t* msg,
157 uint8_t target_system,uint8_t target_component,const uint8_t *id_or_mac,uint8_t single_message_size,uint8_t msg_pack_size,const uint8_t *messages)
158{
159#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
161 _mav_put_uint8_t(buf, 0, target_system);
162 _mav_put_uint8_t(buf, 1, target_component);
163 _mav_put_uint8_t(buf, 22, single_message_size);
164 _mav_put_uint8_t(buf, 23, msg_pack_size);
165 _mav_put_uint8_t_array(buf, 2, id_or_mac, 20);
166 _mav_put_uint8_t_array(buf, 24, messages, 225);
167 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_LEN);
168#else
169 mavlink_open_drone_id_message_pack_t packet;
170 packet.target_system = target_system;
171 packet.target_component = target_component;
172 packet.single_message_size = single_message_size;
173 packet.msg_pack_size = msg_pack_size;
174 mav_array_memcpy(packet.id_or_mac, id_or_mac, sizeof(uint8_t)*20);
175 mav_array_memcpy(packet.messages, messages, sizeof(uint8_t)*225);
176 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_LEN);
177#endif
178
181}
182
183/**
184 * @brief Encode a open_drone_id_message_pack struct
185 *
186 * @param system_id ID of this system
187 * @param component_id ID of this component (e.g. 200 for IMU)
188 * @param msg The MAVLink message to compress the data into
189 * @param open_drone_id_message_pack C-struct to read the message contents from
190 */
191static inline uint16_t mavlink_msg_open_drone_id_message_pack_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_open_drone_id_message_pack_t* open_drone_id_message_pack)
192{
193 return mavlink_msg_open_drone_id_message_pack_pack(system_id, component_id, msg, open_drone_id_message_pack->target_system, open_drone_id_message_pack->target_component, open_drone_id_message_pack->id_or_mac, open_drone_id_message_pack->single_message_size, open_drone_id_message_pack->msg_pack_size, open_drone_id_message_pack->messages);
194}
195
196/**
197 * @brief Encode a open_drone_id_message_pack struct on a channel
198 *
199 * @param system_id ID of this system
200 * @param component_id ID of this component (e.g. 200 for IMU)
201 * @param chan The MAVLink channel this message will be sent over
202 * @param msg The MAVLink message to compress the data into
203 * @param open_drone_id_message_pack C-struct to read the message contents from
204 */
205static inline uint16_t mavlink_msg_open_drone_id_message_pack_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_open_drone_id_message_pack_t* open_drone_id_message_pack)
206{
207 return mavlink_msg_open_drone_id_message_pack_pack_chan(system_id, component_id, chan, msg, open_drone_id_message_pack->target_system, open_drone_id_message_pack->target_component, open_drone_id_message_pack->id_or_mac, open_drone_id_message_pack->single_message_size, open_drone_id_message_pack->msg_pack_size, open_drone_id_message_pack->messages);
208}
209
210/**
211 * @brief Encode a open_drone_id_message_pack struct with provided status structure
212 *
213 * @param system_id ID of this system
214 * @param component_id ID of this component (e.g. 200 for IMU)
215 * @param status MAVLink status structure
216 * @param msg The MAVLink message to compress the data into
217 * @param open_drone_id_message_pack C-struct to read the message contents from
218 */
219static inline uint16_t mavlink_msg_open_drone_id_message_pack_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_open_drone_id_message_pack_t* open_drone_id_message_pack)
220{
221 return mavlink_msg_open_drone_id_message_pack_pack_status(system_id, component_id, _status, msg, open_drone_id_message_pack->target_system, open_drone_id_message_pack->target_component, open_drone_id_message_pack->id_or_mac, open_drone_id_message_pack->single_message_size, open_drone_id_message_pack->msg_pack_size, open_drone_id_message_pack->messages);
222}
223
224/**
225 * @brief Send a open_drone_id_message_pack message
226 * @param chan MAVLink channel to send the message
227 *
228 * @param target_system System ID (0 for broadcast).
229 * @param target_component Component ID (0 for broadcast).
230 * @param id_or_mac Only used for drone ID data received from other UAs. See detailed description at https://mavlink.io/en/services/opendroneid.html.
231 * @param single_message_size [bytes] This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length.
232 * @param msg_pack_size Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9.
233 * @param messages Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field.
234 */
235#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
236
237static inline void mavlink_msg_open_drone_id_message_pack_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, const uint8_t *id_or_mac, uint8_t single_message_size, uint8_t msg_pack_size, const uint8_t *messages)
238{
239#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
240 char buf[MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_LEN];
241 _mav_put_uint8_t(buf, 0, target_system);
242 _mav_put_uint8_t(buf, 1, target_component);
243 _mav_put_uint8_t(buf, 22, single_message_size);
244 _mav_put_uint8_t(buf, 23, msg_pack_size);
245 _mav_put_uint8_t_array(buf, 2, id_or_mac, 20);
246 _mav_put_uint8_t_array(buf, 24, messages, 225);
247 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK, buf, MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_MIN_LEN, MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_LEN, MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_CRC);
248#else
249 mavlink_open_drone_id_message_pack_t packet;
250 packet.target_system = target_system;
251 packet.target_component = target_component;
252 packet.single_message_size = single_message_size;
253 packet.msg_pack_size = msg_pack_size;
254 mav_array_memcpy(packet.id_or_mac, id_or_mac, sizeof(uint8_t)*20);
255 mav_array_memcpy(packet.messages, messages, sizeof(uint8_t)*225);
256 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK, (const char *)&packet, MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_MIN_LEN, MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_LEN, MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_CRC);
257#endif
258}
259
260/**
261 * @brief Send a open_drone_id_message_pack message
262 * @param chan MAVLink channel to send the message
263 * @param struct The MAVLink struct to serialize
264 */
265static inline void mavlink_msg_open_drone_id_message_pack_send_struct(mavlink_channel_t chan, const mavlink_open_drone_id_message_pack_t* open_drone_id_message_pack)
266{
267#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
268 mavlink_msg_open_drone_id_message_pack_send(chan, open_drone_id_message_pack->target_system, open_drone_id_message_pack->target_component, open_drone_id_message_pack->id_or_mac, open_drone_id_message_pack->single_message_size, open_drone_id_message_pack->msg_pack_size, open_drone_id_message_pack->messages);
269#else
270 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK, (const char *)open_drone_id_message_pack, MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_MIN_LEN, MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_LEN, MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_CRC);
271#endif
272}
273
274#if MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_LEN <= MAVLINK_MAX_PAYLOAD_LEN
275/*
276 This variant of _send() can be used to save stack space by reusing
277 memory from the receive buffer. The caller provides a
278 mavlink_message_t which is the size of a full mavlink message. This
279 is usually the receive buffer for the channel, and allows a reply to an
280 incoming message with minimum stack space usage.
281 */
282static inline void mavlink_msg_open_drone_id_message_pack_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, const uint8_t *id_or_mac, uint8_t single_message_size, uint8_t msg_pack_size, const uint8_t *messages)
283{
284#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
285 char *buf = (char *)msgbuf;
286 _mav_put_uint8_t(buf, 0, target_system);
287 _mav_put_uint8_t(buf, 1, target_component);
288 _mav_put_uint8_t(buf, 22, single_message_size);
289 _mav_put_uint8_t(buf, 23, msg_pack_size);
290 _mav_put_uint8_t_array(buf, 2, id_or_mac, 20);
291 _mav_put_uint8_t_array(buf, 24, messages, 225);
292 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK, buf, MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_MIN_LEN, MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_LEN, MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_CRC);
293#else
294 mavlink_open_drone_id_message_pack_t *packet = (mavlink_open_drone_id_message_pack_t *)msgbuf;
295 packet->target_system = target_system;
296 packet->target_component = target_component;
297 packet->single_message_size = single_message_size;
298 packet->msg_pack_size = msg_pack_size;
299 mav_array_memcpy(packet->id_or_mac, id_or_mac, sizeof(uint8_t)*20);
300 mav_array_memcpy(packet->messages, messages, sizeof(uint8_t)*225);
301 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK, (const char *)packet, MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_MIN_LEN, MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_LEN, MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_CRC);
302#endif
303}
304#endif
305
306#endif
307
308// MESSAGE OPEN_DRONE_ID_MESSAGE_PACK UNPACKING
309
310
311/**
312 * @brief Get field target_system from open_drone_id_message_pack message
313 *
314 * @return System ID (0 for broadcast).
315 */
316static inline uint8_t mavlink_msg_open_drone_id_message_pack_get_target_system(const mavlink_message_t* msg)
317{
318 return _MAV_RETURN_uint8_t(msg, 0);
319}
320
321/**
322 * @brief Get field target_component from open_drone_id_message_pack message
323 *
324 * @return Component ID (0 for broadcast).
325 */
326static inline uint8_t mavlink_msg_open_drone_id_message_pack_get_target_component(const mavlink_message_t* msg)
327{
328 return _MAV_RETURN_uint8_t(msg, 1);
329}
330
331/**
332 * @brief Get field id_or_mac from open_drone_id_message_pack message
333 *
334 * @return Only used for drone ID data received from other UAs. See detailed description at https://mavlink.io/en/services/opendroneid.html.
335 */
336static inline uint16_t mavlink_msg_open_drone_id_message_pack_get_id_or_mac(const mavlink_message_t* msg, uint8_t *id_or_mac)
337{
338 return _MAV_RETURN_uint8_t_array(msg, id_or_mac, 20, 2);
339}
340
341/**
342 * @brief Get field single_message_size from open_drone_id_message_pack message
343 *
344 * @return [bytes] This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length.
345 */
346static inline uint8_t mavlink_msg_open_drone_id_message_pack_get_single_message_size(const mavlink_message_t* msg)
347{
348 return _MAV_RETURN_uint8_t(msg, 22);
349}
350
351/**
352 * @brief Get field msg_pack_size from open_drone_id_message_pack message
353 *
354 * @return Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9.
355 */
356static inline uint8_t mavlink_msg_open_drone_id_message_pack_get_msg_pack_size(const mavlink_message_t* msg)
357{
358 return _MAV_RETURN_uint8_t(msg, 23);
359}
360
361/**
362 * @brief Get field messages from open_drone_id_message_pack message
363 *
364 * @return Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field.
365 */
366static inline uint16_t mavlink_msg_open_drone_id_message_pack_get_messages(const mavlink_message_t* msg, uint8_t *messages)
367{
368 return _MAV_RETURN_uint8_t_array(msg, messages, 225, 24);
369}
370
371/**
372 * @brief Decode a open_drone_id_message_pack message into a struct
373 *
374 * @param msg The message to decode
375 * @param open_drone_id_message_pack C-struct to decode the message contents into
376 */
377static inline void mavlink_msg_open_drone_id_message_pack_decode(const mavlink_message_t* msg, mavlink_open_drone_id_message_pack_t* open_drone_id_message_pack)
378{
379#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
380 open_drone_id_message_pack->target_system = mavlink_msg_open_drone_id_message_pack_get_target_system(msg);
381 open_drone_id_message_pack->target_component = mavlink_msg_open_drone_id_message_pack_get_target_component(msg);
382 mavlink_msg_open_drone_id_message_pack_get_id_or_mac(msg, open_drone_id_message_pack->id_or_mac);
383 open_drone_id_message_pack->single_message_size = mavlink_msg_open_drone_id_message_pack_get_single_message_size(msg);
384 open_drone_id_message_pack->msg_pack_size = mavlink_msg_open_drone_id_message_pack_get_msg_pack_size(msg);
385 mavlink_msg_open_drone_id_message_pack_get_messages(msg, open_drone_id_message_pack->messages);
386#else
387 uint8_t len = msg->len < MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_LEN? msg->len : MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_LEN;
388 memset(open_drone_id_message_pack, 0, MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_LEN);
389 memcpy(open_drone_id_message_pack, _MAV_PAYLOAD(msg), len);
390#endif
391}