2 // MESSAGE OPEN_DRONE_ID_AUTHENTICATION PACKING
4 #define MAVLINK_MSG_ID_OPEN_DRONE_ID_AUTHENTICATION 12902
7 typedef struct __mavlink_open_drone_id_authentication_t
{
8 uint32_t timestamp
; /*< [s] This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019.*/
9 uint8_t target_system
; /*< System ID (0 for broadcast).*/
10 uint8_t target_component
; /*< Component ID (0 for broadcast).*/
11 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. */
12 uint8_t authentication_type
; /*< Indicates the type of authentication.*/
13 uint8_t data_page
; /*< Allowed range is 0 - 4.*/
14 uint8_t page_count
; /*< This field is only present for page 0. Allowed range is 0 - 5.*/
15 uint8_t length
; /*< [bytes] This field is only present for page 0. Total bytes of authentication_data from all data pages. Allowed range is 0 - 109 (17 + 23*4).*/
16 uint8_t authentication_data
[23]; /*< Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field.*/
17 } mavlink_open_drone_id_authentication_t
;
19 #define MAVLINK_MSG_ID_OPEN_DRONE_ID_AUTHENTICATION_LEN 53
20 #define MAVLINK_MSG_ID_OPEN_DRONE_ID_AUTHENTICATION_MIN_LEN 53
21 #define MAVLINK_MSG_ID_12902_LEN 53
22 #define MAVLINK_MSG_ID_12902_MIN_LEN 53
24 #define MAVLINK_MSG_ID_OPEN_DRONE_ID_AUTHENTICATION_CRC 49
25 #define MAVLINK_MSG_ID_12902_CRC 49
27 #define MAVLINK_MSG_OPEN_DRONE_ID_AUTHENTICATION_FIELD_ID_OR_MAC_LEN 20
28 #define MAVLINK_MSG_OPEN_DRONE_ID_AUTHENTICATION_FIELD_AUTHENTICATION_DATA_LEN 23
30 #if MAVLINK_COMMAND_24BIT
31 #define MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_AUTHENTICATION { \
33 "OPEN_DRONE_ID_AUTHENTICATION", \
35 { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_open_drone_id_authentication_t, target_system) }, \
36 { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_open_drone_id_authentication_t, target_component) }, \
37 { "id_or_mac", NULL, MAVLINK_TYPE_UINT8_T, 20, 6, offsetof(mavlink_open_drone_id_authentication_t, id_or_mac) }, \
38 { "authentication_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 26, offsetof(mavlink_open_drone_id_authentication_t, authentication_type) }, \
39 { "data_page", NULL, MAVLINK_TYPE_UINT8_T, 0, 27, offsetof(mavlink_open_drone_id_authentication_t, data_page) }, \
40 { "page_count", NULL, MAVLINK_TYPE_UINT8_T, 0, 28, offsetof(mavlink_open_drone_id_authentication_t, page_count) }, \
41 { "length", NULL, MAVLINK_TYPE_UINT8_T, 0, 29, offsetof(mavlink_open_drone_id_authentication_t, length) }, \
42 { "timestamp", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_open_drone_id_authentication_t, timestamp) }, \
43 { "authentication_data", NULL, MAVLINK_TYPE_UINT8_T, 23, 30, offsetof(mavlink_open_drone_id_authentication_t, authentication_data) }, \
47 #define MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_AUTHENTICATION { \
48 "OPEN_DRONE_ID_AUTHENTICATION", \
50 { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_open_drone_id_authentication_t, target_system) }, \
51 { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_open_drone_id_authentication_t, target_component) }, \
52 { "id_or_mac", NULL, MAVLINK_TYPE_UINT8_T, 20, 6, offsetof(mavlink_open_drone_id_authentication_t, id_or_mac) }, \
53 { "authentication_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 26, offsetof(mavlink_open_drone_id_authentication_t, authentication_type) }, \
54 { "data_page", NULL, MAVLINK_TYPE_UINT8_T, 0, 27, offsetof(mavlink_open_drone_id_authentication_t, data_page) }, \
55 { "page_count", NULL, MAVLINK_TYPE_UINT8_T, 0, 28, offsetof(mavlink_open_drone_id_authentication_t, page_count) }, \
56 { "length", NULL, MAVLINK_TYPE_UINT8_T, 0, 29, offsetof(mavlink_open_drone_id_authentication_t, length) }, \
57 { "timestamp", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_open_drone_id_authentication_t, timestamp) }, \
58 { "authentication_data", NULL, MAVLINK_TYPE_UINT8_T, 23, 30, offsetof(mavlink_open_drone_id_authentication_t, authentication_data) }, \
64 * @brief Pack a open_drone_id_authentication message
65 * @param system_id ID of this system
66 * @param component_id ID of this component (e.g. 200 for IMU)
67 * @param msg The MAVLink message to compress the data into
69 * @param target_system System ID (0 for broadcast).
70 * @param target_component Component ID (0 for broadcast).
71 * @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.
72 * @param authentication_type Indicates the type of authentication.
73 * @param data_page Allowed range is 0 - 4.
74 * @param page_count This field is only present for page 0. Allowed range is 0 - 5.
75 * @param length [bytes] This field is only present for page 0. Total bytes of authentication_data from all data pages. Allowed range is 0 - 109 (17 + 23*4).
76 * @param timestamp [s] This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019.
77 * @param authentication_data Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field.
78 * @return length of the message in bytes (excluding serial stream start sign)
80 static inline uint16_t mavlink_msg_open_drone_id_authentication_pack(uint8_t system_id
, uint8_t component_id
, mavlink_message_t
* msg
,
81 uint8_t target_system
, uint8_t target_component
, const uint8_t *id_or_mac
, uint8_t authentication_type
, uint8_t data_page
, uint8_t page_count
, uint8_t length
, uint32_t timestamp
, const uint8_t *authentication_data
)
83 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
84 char buf
[MAVLINK_MSG_ID_OPEN_DRONE_ID_AUTHENTICATION_LEN
];
85 _mav_put_uint32_t(buf
, 0, timestamp
);
86 _mav_put_uint8_t(buf
, 4, target_system
);
87 _mav_put_uint8_t(buf
, 5, target_component
);
88 _mav_put_uint8_t(buf
, 26, authentication_type
);
89 _mav_put_uint8_t(buf
, 27, data_page
);
90 _mav_put_uint8_t(buf
, 28, page_count
);
91 _mav_put_uint8_t(buf
, 29, length
);
92 _mav_put_uint8_t_array(buf
, 6, id_or_mac
, 20);
93 _mav_put_uint8_t_array(buf
, 30, authentication_data
, 23);
94 memcpy(_MAV_PAYLOAD_NON_CONST(msg
), buf
, MAVLINK_MSG_ID_OPEN_DRONE_ID_AUTHENTICATION_LEN
);
96 mavlink_open_drone_id_authentication_t packet
;
97 packet
.timestamp
= timestamp
;
98 packet
.target_system
= target_system
;
99 packet
.target_component
= target_component
;
100 packet
.authentication_type
= authentication_type
;
101 packet
.data_page
= data_page
;
102 packet
.page_count
= page_count
;
103 packet
.length
= length
;
104 mav_array_memcpy(packet
.id_or_mac
, id_or_mac
, sizeof(uint8_t)*20);
105 mav_array_memcpy(packet
.authentication_data
, authentication_data
, sizeof(uint8_t)*23);
106 memcpy(_MAV_PAYLOAD_NON_CONST(msg
), &packet
, MAVLINK_MSG_ID_OPEN_DRONE_ID_AUTHENTICATION_LEN
);
109 msg
->msgid
= MAVLINK_MSG_ID_OPEN_DRONE_ID_AUTHENTICATION
;
110 return mavlink_finalize_message(msg
, system_id
, component_id
, MAVLINK_MSG_ID_OPEN_DRONE_ID_AUTHENTICATION_MIN_LEN
, MAVLINK_MSG_ID_OPEN_DRONE_ID_AUTHENTICATION_LEN
, MAVLINK_MSG_ID_OPEN_DRONE_ID_AUTHENTICATION_CRC
);
114 * @brief Pack a open_drone_id_authentication message on a channel
115 * @param system_id ID of this system
116 * @param component_id ID of this component (e.g. 200 for IMU)
117 * @param chan The MAVLink channel this message will be sent over
118 * @param msg The MAVLink message to compress the data into
119 * @param target_system System ID (0 for broadcast).
120 * @param target_component Component ID (0 for broadcast).
121 * @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.
122 * @param authentication_type Indicates the type of authentication.
123 * @param data_page Allowed range is 0 - 4.
124 * @param page_count This field is only present for page 0. Allowed range is 0 - 5.
125 * @param length [bytes] This field is only present for page 0. Total bytes of authentication_data from all data pages. Allowed range is 0 - 109 (17 + 23*4).
126 * @param timestamp [s] This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019.
127 * @param authentication_data Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field.
128 * @return length of the message in bytes (excluding serial stream start sign)
130 static inline uint16_t mavlink_msg_open_drone_id_authentication_pack_chan(uint8_t system_id
, uint8_t component_id
, uint8_t chan
,
131 mavlink_message_t
* msg
,
132 uint8_t target_system
,uint8_t target_component
,const uint8_t *id_or_mac
,uint8_t authentication_type
,uint8_t data_page
,uint8_t page_count
,uint8_t length
,uint32_t timestamp
,const uint8_t *authentication_data
)
134 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
135 char buf
[MAVLINK_MSG_ID_OPEN_DRONE_ID_AUTHENTICATION_LEN
];
136 _mav_put_uint32_t(buf
, 0, timestamp
);
137 _mav_put_uint8_t(buf
, 4, target_system
);
138 _mav_put_uint8_t(buf
, 5, target_component
);
139 _mav_put_uint8_t(buf
, 26, authentication_type
);
140 _mav_put_uint8_t(buf
, 27, data_page
);
141 _mav_put_uint8_t(buf
, 28, page_count
);
142 _mav_put_uint8_t(buf
, 29, length
);
143 _mav_put_uint8_t_array(buf
, 6, id_or_mac
, 20);
144 _mav_put_uint8_t_array(buf
, 30, authentication_data
, 23);
145 memcpy(_MAV_PAYLOAD_NON_CONST(msg
), buf
, MAVLINK_MSG_ID_OPEN_DRONE_ID_AUTHENTICATION_LEN
);
147 mavlink_open_drone_id_authentication_t packet
;
148 packet
.timestamp
= timestamp
;
149 packet
.target_system
= target_system
;
150 packet
.target_component
= target_component
;
151 packet
.authentication_type
= authentication_type
;
152 packet
.data_page
= data_page
;
153 packet
.page_count
= page_count
;
154 packet
.length
= length
;
155 mav_array_memcpy(packet
.id_or_mac
, id_or_mac
, sizeof(uint8_t)*20);
156 mav_array_memcpy(packet
.authentication_data
, authentication_data
, sizeof(uint8_t)*23);
157 memcpy(_MAV_PAYLOAD_NON_CONST(msg
), &packet
, MAVLINK_MSG_ID_OPEN_DRONE_ID_AUTHENTICATION_LEN
);
160 msg
->msgid
= MAVLINK_MSG_ID_OPEN_DRONE_ID_AUTHENTICATION
;
161 return mavlink_finalize_message_chan(msg
, system_id
, component_id
, chan
, MAVLINK_MSG_ID_OPEN_DRONE_ID_AUTHENTICATION_MIN_LEN
, MAVLINK_MSG_ID_OPEN_DRONE_ID_AUTHENTICATION_LEN
, MAVLINK_MSG_ID_OPEN_DRONE_ID_AUTHENTICATION_CRC
);
165 * @brief Encode a open_drone_id_authentication struct
167 * @param system_id ID of this system
168 * @param component_id ID of this component (e.g. 200 for IMU)
169 * @param msg The MAVLink message to compress the data into
170 * @param open_drone_id_authentication C-struct to read the message contents from
172 static inline uint16_t mavlink_msg_open_drone_id_authentication_encode(uint8_t system_id
, uint8_t component_id
, mavlink_message_t
* msg
, const mavlink_open_drone_id_authentication_t
* open_drone_id_authentication
)
174 return mavlink_msg_open_drone_id_authentication_pack(system_id
, component_id
, msg
, open_drone_id_authentication
->target_system
, open_drone_id_authentication
->target_component
, open_drone_id_authentication
->id_or_mac
, open_drone_id_authentication
->authentication_type
, open_drone_id_authentication
->data_page
, open_drone_id_authentication
->page_count
, open_drone_id_authentication
->length
, open_drone_id_authentication
->timestamp
, open_drone_id_authentication
->authentication_data
);
178 * @brief Encode a open_drone_id_authentication struct on a channel
180 * @param system_id ID of this system
181 * @param component_id ID of this component (e.g. 200 for IMU)
182 * @param chan The MAVLink channel this message will be sent over
183 * @param msg The MAVLink message to compress the data into
184 * @param open_drone_id_authentication C-struct to read the message contents from
186 static inline uint16_t mavlink_msg_open_drone_id_authentication_encode_chan(uint8_t system_id
, uint8_t component_id
, uint8_t chan
, mavlink_message_t
* msg
, const mavlink_open_drone_id_authentication_t
* open_drone_id_authentication
)
188 return mavlink_msg_open_drone_id_authentication_pack_chan(system_id
, component_id
, chan
, msg
, open_drone_id_authentication
->target_system
, open_drone_id_authentication
->target_component
, open_drone_id_authentication
->id_or_mac
, open_drone_id_authentication
->authentication_type
, open_drone_id_authentication
->data_page
, open_drone_id_authentication
->page_count
, open_drone_id_authentication
->length
, open_drone_id_authentication
->timestamp
, open_drone_id_authentication
->authentication_data
);
192 * @brief Send a open_drone_id_authentication message
193 * @param chan MAVLink channel to send the message
195 * @param target_system System ID (0 for broadcast).
196 * @param target_component Component ID (0 for broadcast).
197 * @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.
198 * @param authentication_type Indicates the type of authentication.
199 * @param data_page Allowed range is 0 - 4.
200 * @param page_count This field is only present for page 0. Allowed range is 0 - 5.
201 * @param length [bytes] This field is only present for page 0. Total bytes of authentication_data from all data pages. Allowed range is 0 - 109 (17 + 23*4).
202 * @param timestamp [s] This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019.
203 * @param authentication_data Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field.
205 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
207 static inline void mavlink_msg_open_drone_id_authentication_send(mavlink_channel_t chan
, uint8_t target_system
, uint8_t target_component
, const uint8_t *id_or_mac
, uint8_t authentication_type
, uint8_t data_page
, uint8_t page_count
, uint8_t length
, uint32_t timestamp
, const uint8_t *authentication_data
)
209 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
210 char buf
[MAVLINK_MSG_ID_OPEN_DRONE_ID_AUTHENTICATION_LEN
];
211 _mav_put_uint32_t(buf
, 0, timestamp
);
212 _mav_put_uint8_t(buf
, 4, target_system
);
213 _mav_put_uint8_t(buf
, 5, target_component
);
214 _mav_put_uint8_t(buf
, 26, authentication_type
);
215 _mav_put_uint8_t(buf
, 27, data_page
);
216 _mav_put_uint8_t(buf
, 28, page_count
);
217 _mav_put_uint8_t(buf
, 29, length
);
218 _mav_put_uint8_t_array(buf
, 6, id_or_mac
, 20);
219 _mav_put_uint8_t_array(buf
, 30, authentication_data
, 23);
220 _mav_finalize_message_chan_send(chan
, MAVLINK_MSG_ID_OPEN_DRONE_ID_AUTHENTICATION
, buf
, MAVLINK_MSG_ID_OPEN_DRONE_ID_AUTHENTICATION_MIN_LEN
, MAVLINK_MSG_ID_OPEN_DRONE_ID_AUTHENTICATION_LEN
, MAVLINK_MSG_ID_OPEN_DRONE_ID_AUTHENTICATION_CRC
);
222 mavlink_open_drone_id_authentication_t packet
;
223 packet
.timestamp
= timestamp
;
224 packet
.target_system
= target_system
;
225 packet
.target_component
= target_component
;
226 packet
.authentication_type
= authentication_type
;
227 packet
.data_page
= data_page
;
228 packet
.page_count
= page_count
;
229 packet
.length
= length
;
230 mav_array_memcpy(packet
.id_or_mac
, id_or_mac
, sizeof(uint8_t)*20);
231 mav_array_memcpy(packet
.authentication_data
, authentication_data
, sizeof(uint8_t)*23);
232 _mav_finalize_message_chan_send(chan
, MAVLINK_MSG_ID_OPEN_DRONE_ID_AUTHENTICATION
, (const char *)&packet
, MAVLINK_MSG_ID_OPEN_DRONE_ID_AUTHENTICATION_MIN_LEN
, MAVLINK_MSG_ID_OPEN_DRONE_ID_AUTHENTICATION_LEN
, MAVLINK_MSG_ID_OPEN_DRONE_ID_AUTHENTICATION_CRC
);
237 * @brief Send a open_drone_id_authentication message
238 * @param chan MAVLink channel to send the message
239 * @param struct The MAVLink struct to serialize
241 static inline void mavlink_msg_open_drone_id_authentication_send_struct(mavlink_channel_t chan
, const mavlink_open_drone_id_authentication_t
* open_drone_id_authentication
)
243 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
244 mavlink_msg_open_drone_id_authentication_send(chan
, open_drone_id_authentication
->target_system
, open_drone_id_authentication
->target_component
, open_drone_id_authentication
->id_or_mac
, open_drone_id_authentication
->authentication_type
, open_drone_id_authentication
->data_page
, open_drone_id_authentication
->page_count
, open_drone_id_authentication
->length
, open_drone_id_authentication
->timestamp
, open_drone_id_authentication
->authentication_data
);
246 _mav_finalize_message_chan_send(chan
, MAVLINK_MSG_ID_OPEN_DRONE_ID_AUTHENTICATION
, (const char *)open_drone_id_authentication
, MAVLINK_MSG_ID_OPEN_DRONE_ID_AUTHENTICATION_MIN_LEN
, MAVLINK_MSG_ID_OPEN_DRONE_ID_AUTHENTICATION_LEN
, MAVLINK_MSG_ID_OPEN_DRONE_ID_AUTHENTICATION_CRC
);
250 #if MAVLINK_MSG_ID_OPEN_DRONE_ID_AUTHENTICATION_LEN <= MAVLINK_MAX_PAYLOAD_LEN
252 This varient of _send() can be used to save stack space by re-using
253 memory from the receive buffer. The caller provides a
254 mavlink_message_t which is the size of a full mavlink message. This
255 is usually the receive buffer for the channel, and allows a reply to an
256 incoming message with minimum stack space usage.
258 static inline void mavlink_msg_open_drone_id_authentication_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 authentication_type
, uint8_t data_page
, uint8_t page_count
, uint8_t length
, uint32_t timestamp
, const uint8_t *authentication_data
)
260 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
261 char *buf
= (char *)msgbuf
;
262 _mav_put_uint32_t(buf
, 0, timestamp
);
263 _mav_put_uint8_t(buf
, 4, target_system
);
264 _mav_put_uint8_t(buf
, 5, target_component
);
265 _mav_put_uint8_t(buf
, 26, authentication_type
);
266 _mav_put_uint8_t(buf
, 27, data_page
);
267 _mav_put_uint8_t(buf
, 28, page_count
);
268 _mav_put_uint8_t(buf
, 29, length
);
269 _mav_put_uint8_t_array(buf
, 6, id_or_mac
, 20);
270 _mav_put_uint8_t_array(buf
, 30, authentication_data
, 23);
271 _mav_finalize_message_chan_send(chan
, MAVLINK_MSG_ID_OPEN_DRONE_ID_AUTHENTICATION
, buf
, MAVLINK_MSG_ID_OPEN_DRONE_ID_AUTHENTICATION_MIN_LEN
, MAVLINK_MSG_ID_OPEN_DRONE_ID_AUTHENTICATION_LEN
, MAVLINK_MSG_ID_OPEN_DRONE_ID_AUTHENTICATION_CRC
);
273 mavlink_open_drone_id_authentication_t
*packet
= (mavlink_open_drone_id_authentication_t
*)msgbuf
;
274 packet
->timestamp
= timestamp
;
275 packet
->target_system
= target_system
;
276 packet
->target_component
= target_component
;
277 packet
->authentication_type
= authentication_type
;
278 packet
->data_page
= data_page
;
279 packet
->page_count
= page_count
;
280 packet
->length
= length
;
281 mav_array_memcpy(packet
->id_or_mac
, id_or_mac
, sizeof(uint8_t)*20);
282 mav_array_memcpy(packet
->authentication_data
, authentication_data
, sizeof(uint8_t)*23);
283 _mav_finalize_message_chan_send(chan
, MAVLINK_MSG_ID_OPEN_DRONE_ID_AUTHENTICATION
, (const char *)packet
, MAVLINK_MSG_ID_OPEN_DRONE_ID_AUTHENTICATION_MIN_LEN
, MAVLINK_MSG_ID_OPEN_DRONE_ID_AUTHENTICATION_LEN
, MAVLINK_MSG_ID_OPEN_DRONE_ID_AUTHENTICATION_CRC
);
290 // MESSAGE OPEN_DRONE_ID_AUTHENTICATION UNPACKING
294 * @brief Get field target_system from open_drone_id_authentication message
296 * @return System ID (0 for broadcast).
298 static inline uint8_t mavlink_msg_open_drone_id_authentication_get_target_system(const mavlink_message_t
* msg
)
300 return _MAV_RETURN_uint8_t(msg
, 4);
304 * @brief Get field target_component from open_drone_id_authentication message
306 * @return Component ID (0 for broadcast).
308 static inline uint8_t mavlink_msg_open_drone_id_authentication_get_target_component(const mavlink_message_t
* msg
)
310 return _MAV_RETURN_uint8_t(msg
, 5);
314 * @brief Get field id_or_mac from open_drone_id_authentication message
316 * @return Only used for drone ID data received from other UAs. See detailed description at https://mavlink.io/en/services/opendroneid.html.
318 static inline uint16_t mavlink_msg_open_drone_id_authentication_get_id_or_mac(const mavlink_message_t
* msg
, uint8_t *id_or_mac
)
320 return _MAV_RETURN_uint8_t_array(msg
, id_or_mac
, 20, 6);
324 * @brief Get field authentication_type from open_drone_id_authentication message
326 * @return Indicates the type of authentication.
328 static inline uint8_t mavlink_msg_open_drone_id_authentication_get_authentication_type(const mavlink_message_t
* msg
)
330 return _MAV_RETURN_uint8_t(msg
, 26);
334 * @brief Get field data_page from open_drone_id_authentication message
336 * @return Allowed range is 0 - 4.
338 static inline uint8_t mavlink_msg_open_drone_id_authentication_get_data_page(const mavlink_message_t
* msg
)
340 return _MAV_RETURN_uint8_t(msg
, 27);
344 * @brief Get field page_count from open_drone_id_authentication message
346 * @return This field is only present for page 0. Allowed range is 0 - 5.
348 static inline uint8_t mavlink_msg_open_drone_id_authentication_get_page_count(const mavlink_message_t
* msg
)
350 return _MAV_RETURN_uint8_t(msg
, 28);
354 * @brief Get field length from open_drone_id_authentication message
356 * @return [bytes] This field is only present for page 0. Total bytes of authentication_data from all data pages. Allowed range is 0 - 109 (17 + 23*4).
358 static inline uint8_t mavlink_msg_open_drone_id_authentication_get_length(const mavlink_message_t
* msg
)
360 return _MAV_RETURN_uint8_t(msg
, 29);
364 * @brief Get field timestamp from open_drone_id_authentication message
366 * @return [s] This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019.
368 static inline uint32_t mavlink_msg_open_drone_id_authentication_get_timestamp(const mavlink_message_t
* msg
)
370 return _MAV_RETURN_uint32_t(msg
, 0);
374 * @brief Get field authentication_data from open_drone_id_authentication message
376 * @return Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field.
378 static inline uint16_t mavlink_msg_open_drone_id_authentication_get_authentication_data(const mavlink_message_t
* msg
, uint8_t *authentication_data
)
380 return _MAV_RETURN_uint8_t_array(msg
, authentication_data
, 23, 30);
384 * @brief Decode a open_drone_id_authentication message into a struct
386 * @param msg The message to decode
387 * @param open_drone_id_authentication C-struct to decode the message contents into
389 static inline void mavlink_msg_open_drone_id_authentication_decode(const mavlink_message_t
* msg
, mavlink_open_drone_id_authentication_t
* open_drone_id_authentication
)
391 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
392 open_drone_id_authentication
->timestamp
= mavlink_msg_open_drone_id_authentication_get_timestamp(msg
);
393 open_drone_id_authentication
->target_system
= mavlink_msg_open_drone_id_authentication_get_target_system(msg
);
394 open_drone_id_authentication
->target_component
= mavlink_msg_open_drone_id_authentication_get_target_component(msg
);
395 mavlink_msg_open_drone_id_authentication_get_id_or_mac(msg
, open_drone_id_authentication
->id_or_mac
);
396 open_drone_id_authentication
->authentication_type
= mavlink_msg_open_drone_id_authentication_get_authentication_type(msg
);
397 open_drone_id_authentication
->data_page
= mavlink_msg_open_drone_id_authentication_get_data_page(msg
);
398 open_drone_id_authentication
->page_count
= mavlink_msg_open_drone_id_authentication_get_page_count(msg
);
399 open_drone_id_authentication
->length
= mavlink_msg_open_drone_id_authentication_get_length(msg
);
400 mavlink_msg_open_drone_id_authentication_get_authentication_data(msg
, open_drone_id_authentication
->authentication_data
);
402 uint8_t len
= msg
->len
< MAVLINK_MSG_ID_OPEN_DRONE_ID_AUTHENTICATION_LEN
? msg
->len
: MAVLINK_MSG_ID_OPEN_DRONE_ID_AUTHENTICATION_LEN
;
403 memset(open_drone_id_authentication
, 0, MAVLINK_MSG_ID_OPEN_DRONE_ID_AUTHENTICATION_LEN
);
404 memcpy(open_drone_id_authentication
, _MAV_PAYLOAD(msg
), len
);