mavlink_msg_open_drone_id_message_pack.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  1. #pragma once
  2. // MESSAGE OPEN_DRONE_ID_MESSAGE_PACK PACKING
  3. #define MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK 12915
  4. typedef struct __mavlink_open_drone_id_message_pack_t {
  5. uint8_t target_system; /*< System ID (0 for broadcast).*/
  6. uint8_t target_component; /*< Component ID (0 for broadcast).*/
  7. 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. */
  8. 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.*/
  9. uint8_t msg_pack_size; /*< Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9.*/
  10. uint8_t messages[225]; /*< Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field.*/
  11. } mavlink_open_drone_id_message_pack_t;
  12. #define MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_LEN 249
  13. #define MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_MIN_LEN 249
  14. #define MAVLINK_MSG_ID_12915_LEN 249
  15. #define MAVLINK_MSG_ID_12915_MIN_LEN 249
  16. #define MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_CRC 94
  17. #define MAVLINK_MSG_ID_12915_CRC 94
  18. #define MAVLINK_MSG_OPEN_DRONE_ID_MESSAGE_PACK_FIELD_ID_OR_MAC_LEN 20
  19. #define MAVLINK_MSG_OPEN_DRONE_ID_MESSAGE_PACK_FIELD_MESSAGES_LEN 225
  20. #if MAVLINK_COMMAND_24BIT
  21. #define MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_MESSAGE_PACK { \
  22. 12915, \
  23. "OPEN_DRONE_ID_MESSAGE_PACK", \
  24. 6, \
  25. { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_open_drone_id_message_pack_t, target_system) }, \
  26. { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_open_drone_id_message_pack_t, target_component) }, \
  27. { "id_or_mac", NULL, MAVLINK_TYPE_UINT8_T, 20, 2, offsetof(mavlink_open_drone_id_message_pack_t, id_or_mac) }, \
  28. { "single_message_size", NULL, MAVLINK_TYPE_UINT8_T, 0, 22, offsetof(mavlink_open_drone_id_message_pack_t, single_message_size) }, \
  29. { "msg_pack_size", NULL, MAVLINK_TYPE_UINT8_T, 0, 23, offsetof(mavlink_open_drone_id_message_pack_t, msg_pack_size) }, \
  30. { "messages", NULL, MAVLINK_TYPE_UINT8_T, 225, 24, offsetof(mavlink_open_drone_id_message_pack_t, messages) }, \
  31. } \
  32. }
  33. #else
  34. #define MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_MESSAGE_PACK { \
  35. "OPEN_DRONE_ID_MESSAGE_PACK", \
  36. 6, \
  37. { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_open_drone_id_message_pack_t, target_system) }, \
  38. { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_open_drone_id_message_pack_t, target_component) }, \
  39. { "id_or_mac", NULL, MAVLINK_TYPE_UINT8_T, 20, 2, offsetof(mavlink_open_drone_id_message_pack_t, id_or_mac) }, \
  40. { "single_message_size", NULL, MAVLINK_TYPE_UINT8_T, 0, 22, offsetof(mavlink_open_drone_id_message_pack_t, single_message_size) }, \
  41. { "msg_pack_size", NULL, MAVLINK_TYPE_UINT8_T, 0, 23, offsetof(mavlink_open_drone_id_message_pack_t, msg_pack_size) }, \
  42. { "messages", NULL, MAVLINK_TYPE_UINT8_T, 225, 24, offsetof(mavlink_open_drone_id_message_pack_t, messages) }, \
  43. } \
  44. }
  45. #endif
  46. /**
  47. * @brief Pack a open_drone_id_message_pack message
  48. * @param system_id ID of this system
  49. * @param component_id ID of this component (e.g. 200 for IMU)
  50. * @param msg The MAVLink message to compress the data into
  51. *
  52. * @param target_system System ID (0 for broadcast).
  53. * @param target_component Component ID (0 for broadcast).
  54. * @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.
  55. * @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.
  56. * @param msg_pack_size Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9.
  57. * @param messages Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field.
  58. * @return length of the message in bytes (excluding serial stream start sign)
  59. */
  60. static inline uint16_t mavlink_msg_open_drone_id_message_pack_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
  61. 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)
  62. {
  63. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  64. char buf[MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_LEN];
  65. _mav_put_uint8_t(buf, 0, target_system);
  66. _mav_put_uint8_t(buf, 1, target_component);
  67. _mav_put_uint8_t(buf, 22, single_message_size);
  68. _mav_put_uint8_t(buf, 23, msg_pack_size);
  69. _mav_put_uint8_t_array(buf, 2, id_or_mac, 20);
  70. _mav_put_uint8_t_array(buf, 24, messages, 225);
  71. memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_LEN);
  72. #else
  73. mavlink_open_drone_id_message_pack_t packet;
  74. packet.target_system = target_system;
  75. packet.target_component = target_component;
  76. packet.single_message_size = single_message_size;
  77. packet.msg_pack_size = msg_pack_size;
  78. mav_array_memcpy(packet.id_or_mac, id_or_mac, sizeof(uint8_t)*20);
  79. mav_array_memcpy(packet.messages, messages, sizeof(uint8_t)*225);
  80. memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_LEN);
  81. #endif
  82. msg->msgid = MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK;
  83. return mavlink_finalize_message(msg, system_id, component_id, 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);
  84. }
  85. /**
  86. * @brief Pack a open_drone_id_message_pack message on a channel
  87. * @param system_id ID of this system
  88. * @param component_id ID of this component (e.g. 200 for IMU)
  89. * @param chan The MAVLink channel this message will be sent over
  90. * @param msg The MAVLink message to compress the data into
  91. * @param target_system System ID (0 for broadcast).
  92. * @param target_component Component ID (0 for broadcast).
  93. * @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.
  94. * @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.
  95. * @param msg_pack_size Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9.
  96. * @param messages Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field.
  97. * @return length of the message in bytes (excluding serial stream start sign)
  98. */
  99. static inline uint16_t mavlink_msg_open_drone_id_message_pack_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
  100. mavlink_message_t* msg,
  101. 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)
  102. {
  103. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  104. char buf[MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_LEN];
  105. _mav_put_uint8_t(buf, 0, target_system);
  106. _mav_put_uint8_t(buf, 1, target_component);
  107. _mav_put_uint8_t(buf, 22, single_message_size);
  108. _mav_put_uint8_t(buf, 23, msg_pack_size);
  109. _mav_put_uint8_t_array(buf, 2, id_or_mac, 20);
  110. _mav_put_uint8_t_array(buf, 24, messages, 225);
  111. memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_LEN);
  112. #else
  113. mavlink_open_drone_id_message_pack_t packet;
  114. packet.target_system = target_system;
  115. packet.target_component = target_component;
  116. packet.single_message_size = single_message_size;
  117. packet.msg_pack_size = msg_pack_size;
  118. mav_array_memcpy(packet.id_or_mac, id_or_mac, sizeof(uint8_t)*20);
  119. mav_array_memcpy(packet.messages, messages, sizeof(uint8_t)*225);
  120. memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_LEN);
  121. #endif
  122. msg->msgid = MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK;
  123. return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 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);
  124. }
  125. /**
  126. * @brief Encode a open_drone_id_message_pack struct
  127. *
  128. * @param system_id ID of this system
  129. * @param component_id ID of this component (e.g. 200 for IMU)
  130. * @param msg The MAVLink message to compress the data into
  131. * @param open_drone_id_message_pack C-struct to read the message contents from
  132. */
  133. static 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)
  134. {
  135. 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);
  136. }
  137. /**
  138. * @brief Encode a open_drone_id_message_pack struct on a channel
  139. *
  140. * @param system_id ID of this system
  141. * @param component_id ID of this component (e.g. 200 for IMU)
  142. * @param chan The MAVLink channel this message will be sent over
  143. * @param msg The MAVLink message to compress the data into
  144. * @param open_drone_id_message_pack C-struct to read the message contents from
  145. */
  146. static 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)
  147. {
  148. 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);
  149. }
  150. /**
  151. * @brief Send a open_drone_id_message_pack message
  152. * @param chan MAVLink channel to send the message
  153. *
  154. * @param target_system System ID (0 for broadcast).
  155. * @param target_component Component ID (0 for broadcast).
  156. * @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.
  157. * @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.
  158. * @param msg_pack_size Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9.
  159. * @param messages Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field.
  160. */
  161. #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
  162. static 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)
  163. {
  164. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  165. char buf[MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_LEN];
  166. _mav_put_uint8_t(buf, 0, target_system);
  167. _mav_put_uint8_t(buf, 1, target_component);
  168. _mav_put_uint8_t(buf, 22, single_message_size);
  169. _mav_put_uint8_t(buf, 23, msg_pack_size);
  170. _mav_put_uint8_t_array(buf, 2, id_or_mac, 20);
  171. _mav_put_uint8_t_array(buf, 24, messages, 225);
  172. _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);
  173. #else
  174. mavlink_open_drone_id_message_pack_t packet;
  175. packet.target_system = target_system;
  176. packet.target_component = target_component;
  177. packet.single_message_size = single_message_size;
  178. packet.msg_pack_size = msg_pack_size;
  179. mav_array_memcpy(packet.id_or_mac, id_or_mac, sizeof(uint8_t)*20);
  180. mav_array_memcpy(packet.messages, messages, sizeof(uint8_t)*225);
  181. _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);
  182. #endif
  183. }
  184. /**
  185. * @brief Send a open_drone_id_message_pack message
  186. * @param chan MAVLink channel to send the message
  187. * @param struct The MAVLink struct to serialize
  188. */
  189. static 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)
  190. {
  191. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  192. 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);
  193. #else
  194. _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);
  195. #endif
  196. }
  197. #if MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_LEN <= MAVLINK_MAX_PAYLOAD_LEN
  198. /*
  199. This variant of _send() can be used to save stack space by re-using
  200. memory from the receive buffer. The caller provides a
  201. mavlink_message_t which is the size of a full mavlink message. This
  202. is usually the receive buffer for the channel, and allows a reply to an
  203. incoming message with minimum stack space usage.
  204. */
  205. static 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)
  206. {
  207. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  208. char *buf = (char *)msgbuf;
  209. _mav_put_uint8_t(buf, 0, target_system);
  210. _mav_put_uint8_t(buf, 1, target_component);
  211. _mav_put_uint8_t(buf, 22, single_message_size);
  212. _mav_put_uint8_t(buf, 23, msg_pack_size);
  213. _mav_put_uint8_t_array(buf, 2, id_or_mac, 20);
  214. _mav_put_uint8_t_array(buf, 24, messages, 225);
  215. _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);
  216. #else
  217. mavlink_open_drone_id_message_pack_t *packet = (mavlink_open_drone_id_message_pack_t *)msgbuf;
  218. packet->target_system = target_system;
  219. packet->target_component = target_component;
  220. packet->single_message_size = single_message_size;
  221. packet->msg_pack_size = msg_pack_size;
  222. mav_array_memcpy(packet->id_or_mac, id_or_mac, sizeof(uint8_t)*20);
  223. mav_array_memcpy(packet->messages, messages, sizeof(uint8_t)*225);
  224. _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);
  225. #endif
  226. }
  227. #endif
  228. #endif
  229. // MESSAGE OPEN_DRONE_ID_MESSAGE_PACK UNPACKING
  230. /**
  231. * @brief Get field target_system from open_drone_id_message_pack message
  232. *
  233. * @return System ID (0 for broadcast).
  234. */
  235. static inline uint8_t mavlink_msg_open_drone_id_message_pack_get_target_system(const mavlink_message_t* msg)
  236. {
  237. return _MAV_RETURN_uint8_t(msg, 0);
  238. }
  239. /**
  240. * @brief Get field target_component from open_drone_id_message_pack message
  241. *
  242. * @return Component ID (0 for broadcast).
  243. */
  244. static inline uint8_t mavlink_msg_open_drone_id_message_pack_get_target_component(const mavlink_message_t* msg)
  245. {
  246. return _MAV_RETURN_uint8_t(msg, 1);
  247. }
  248. /**
  249. * @brief Get field id_or_mac from open_drone_id_message_pack message
  250. *
  251. * @return Only used for drone ID data received from other UAs. See detailed description at https://mavlink.io/en/services/opendroneid.html.
  252. */
  253. static inline uint16_t mavlink_msg_open_drone_id_message_pack_get_id_or_mac(const mavlink_message_t* msg, uint8_t *id_or_mac)
  254. {
  255. return _MAV_RETURN_uint8_t_array(msg, id_or_mac, 20, 2);
  256. }
  257. /**
  258. * @brief Get field single_message_size from open_drone_id_message_pack message
  259. *
  260. * @return [bytes] This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length.
  261. */
  262. static inline uint8_t mavlink_msg_open_drone_id_message_pack_get_single_message_size(const mavlink_message_t* msg)
  263. {
  264. return _MAV_RETURN_uint8_t(msg, 22);
  265. }
  266. /**
  267. * @brief Get field msg_pack_size from open_drone_id_message_pack message
  268. *
  269. * @return Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9.
  270. */
  271. static inline uint8_t mavlink_msg_open_drone_id_message_pack_get_msg_pack_size(const mavlink_message_t* msg)
  272. {
  273. return _MAV_RETURN_uint8_t(msg, 23);
  274. }
  275. /**
  276. * @brief Get field messages from open_drone_id_message_pack message
  277. *
  278. * @return Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field.
  279. */
  280. static inline uint16_t mavlink_msg_open_drone_id_message_pack_get_messages(const mavlink_message_t* msg, uint8_t *messages)
  281. {
  282. return _MAV_RETURN_uint8_t_array(msg, messages, 225, 24);
  283. }
  284. /**
  285. * @brief Decode a open_drone_id_message_pack message into a struct
  286. *
  287. * @param msg The message to decode
  288. * @param open_drone_id_message_pack C-struct to decode the message contents into
  289. */
  290. static 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)
  291. {
  292. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  293. open_drone_id_message_pack->target_system = mavlink_msg_open_drone_id_message_pack_get_target_system(msg);
  294. open_drone_id_message_pack->target_component = mavlink_msg_open_drone_id_message_pack_get_target_component(msg);
  295. mavlink_msg_open_drone_id_message_pack_get_id_or_mac(msg, open_drone_id_message_pack->id_or_mac);
  296. open_drone_id_message_pack->single_message_size = mavlink_msg_open_drone_id_message_pack_get_single_message_size(msg);
  297. open_drone_id_message_pack->msg_pack_size = mavlink_msg_open_drone_id_message_pack_get_msg_pack_size(msg);
  298. mavlink_msg_open_drone_id_message_pack_get_messages(msg, open_drone_id_message_pack->messages);
  299. #else
  300. 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;
  301. memset(open_drone_id_message_pack, 0, MAVLINK_MSG_ID_OPEN_DRONE_ID_MESSAGE_PACK_LEN);
  302. memcpy(open_drone_id_message_pack, _MAV_PAYLOAD(msg), len);
  303. #endif
  304. }