2
0

mavlink_msg_open_drone_id_system.h 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642
  1. #pragma once
  2. // MESSAGE OPEN_DRONE_ID_SYSTEM PACKING
  3. #define MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM 12904
  4. typedef struct __mavlink_open_drone_id_system_t {
  5. int32_t operator_latitude; /*< [degE7] Latitude of the operator. If unknown: 0 (both Lat/Lon).*/
  6. int32_t operator_longitude; /*< [degE7] Longitude of the operator. If unknown: 0 (both Lat/Lon).*/
  7. float area_ceiling; /*< [m] Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA.*/
  8. float area_floor; /*< [m] Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA.*/
  9. float operator_altitude_geo; /*< [m] Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m.*/
  10. uint32_t timestamp; /*< [s] 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019.*/
  11. uint16_t area_count; /*< Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA.*/
  12. uint16_t area_radius; /*< [m] Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA.*/
  13. uint8_t target_system; /*< System ID (0 for broadcast).*/
  14. uint8_t target_component; /*< Component ID (0 for broadcast).*/
  15. 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. */
  16. uint8_t operator_location_type; /*< Specifies the operator location type.*/
  17. uint8_t classification_type; /*< Specifies the classification type of the UA.*/
  18. uint8_t category_eu; /*< When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA.*/
  19. uint8_t class_eu; /*< When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA.*/
  20. } mavlink_open_drone_id_system_t;
  21. #define MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM_LEN 54
  22. #define MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM_MIN_LEN 54
  23. #define MAVLINK_MSG_ID_12904_LEN 54
  24. #define MAVLINK_MSG_ID_12904_MIN_LEN 54
  25. #define MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM_CRC 77
  26. #define MAVLINK_MSG_ID_12904_CRC 77
  27. #define MAVLINK_MSG_OPEN_DRONE_ID_SYSTEM_FIELD_ID_OR_MAC_LEN 20
  28. #if MAVLINK_COMMAND_24BIT
  29. #define MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SYSTEM { \
  30. 12904, \
  31. "OPEN_DRONE_ID_SYSTEM", \
  32. 15, \
  33. { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 28, offsetof(mavlink_open_drone_id_system_t, target_system) }, \
  34. { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 29, offsetof(mavlink_open_drone_id_system_t, target_component) }, \
  35. { "id_or_mac", NULL, MAVLINK_TYPE_UINT8_T, 20, 30, offsetof(mavlink_open_drone_id_system_t, id_or_mac) }, \
  36. { "operator_location_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 50, offsetof(mavlink_open_drone_id_system_t, operator_location_type) }, \
  37. { "classification_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 51, offsetof(mavlink_open_drone_id_system_t, classification_type) }, \
  38. { "operator_latitude", NULL, MAVLINK_TYPE_INT32_T, 0, 0, offsetof(mavlink_open_drone_id_system_t, operator_latitude) }, \
  39. { "operator_longitude", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_open_drone_id_system_t, operator_longitude) }, \
  40. { "area_count", NULL, MAVLINK_TYPE_UINT16_T, 0, 24, offsetof(mavlink_open_drone_id_system_t, area_count) }, \
  41. { "area_radius", NULL, MAVLINK_TYPE_UINT16_T, 0, 26, offsetof(mavlink_open_drone_id_system_t, area_radius) }, \
  42. { "area_ceiling", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_open_drone_id_system_t, area_ceiling) }, \
  43. { "area_floor", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_open_drone_id_system_t, area_floor) }, \
  44. { "category_eu", NULL, MAVLINK_TYPE_UINT8_T, 0, 52, offsetof(mavlink_open_drone_id_system_t, category_eu) }, \
  45. { "class_eu", NULL, MAVLINK_TYPE_UINT8_T, 0, 53, offsetof(mavlink_open_drone_id_system_t, class_eu) }, \
  46. { "operator_altitude_geo", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_open_drone_id_system_t, operator_altitude_geo) }, \
  47. { "timestamp", NULL, MAVLINK_TYPE_UINT32_T, 0, 20, offsetof(mavlink_open_drone_id_system_t, timestamp) }, \
  48. } \
  49. }
  50. #else
  51. #define MAVLINK_MESSAGE_INFO_OPEN_DRONE_ID_SYSTEM { \
  52. "OPEN_DRONE_ID_SYSTEM", \
  53. 15, \
  54. { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 28, offsetof(mavlink_open_drone_id_system_t, target_system) }, \
  55. { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 29, offsetof(mavlink_open_drone_id_system_t, target_component) }, \
  56. { "id_or_mac", NULL, MAVLINK_TYPE_UINT8_T, 20, 30, offsetof(mavlink_open_drone_id_system_t, id_or_mac) }, \
  57. { "operator_location_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 50, offsetof(mavlink_open_drone_id_system_t, operator_location_type) }, \
  58. { "classification_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 51, offsetof(mavlink_open_drone_id_system_t, classification_type) }, \
  59. { "operator_latitude", NULL, MAVLINK_TYPE_INT32_T, 0, 0, offsetof(mavlink_open_drone_id_system_t, operator_latitude) }, \
  60. { "operator_longitude", NULL, MAVLINK_TYPE_INT32_T, 0, 4, offsetof(mavlink_open_drone_id_system_t, operator_longitude) }, \
  61. { "area_count", NULL, MAVLINK_TYPE_UINT16_T, 0, 24, offsetof(mavlink_open_drone_id_system_t, area_count) }, \
  62. { "area_radius", NULL, MAVLINK_TYPE_UINT16_T, 0, 26, offsetof(mavlink_open_drone_id_system_t, area_radius) }, \
  63. { "area_ceiling", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_open_drone_id_system_t, area_ceiling) }, \
  64. { "area_floor", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_open_drone_id_system_t, area_floor) }, \
  65. { "category_eu", NULL, MAVLINK_TYPE_UINT8_T, 0, 52, offsetof(mavlink_open_drone_id_system_t, category_eu) }, \
  66. { "class_eu", NULL, MAVLINK_TYPE_UINT8_T, 0, 53, offsetof(mavlink_open_drone_id_system_t, class_eu) }, \
  67. { "operator_altitude_geo", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_open_drone_id_system_t, operator_altitude_geo) }, \
  68. { "timestamp", NULL, MAVLINK_TYPE_UINT32_T, 0, 20, offsetof(mavlink_open_drone_id_system_t, timestamp) }, \
  69. } \
  70. }
  71. #endif
  72. /**
  73. * @brief Pack a open_drone_id_system message
  74. * @param system_id ID of this system
  75. * @param component_id ID of this component (e.g. 200 for IMU)
  76. * @param msg The MAVLink message to compress the data into
  77. *
  78. * @param target_system System ID (0 for broadcast).
  79. * @param target_component Component ID (0 for broadcast).
  80. * @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.
  81. * @param operator_location_type Specifies the operator location type.
  82. * @param classification_type Specifies the classification type of the UA.
  83. * @param operator_latitude [degE7] Latitude of the operator. If unknown: 0 (both Lat/Lon).
  84. * @param operator_longitude [degE7] Longitude of the operator. If unknown: 0 (both Lat/Lon).
  85. * @param area_count Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA.
  86. * @param area_radius [m] Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA.
  87. * @param area_ceiling [m] Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA.
  88. * @param area_floor [m] Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA.
  89. * @param category_eu When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA.
  90. * @param class_eu When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA.
  91. * @param operator_altitude_geo [m] Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m.
  92. * @param timestamp [s] 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019.
  93. * @return length of the message in bytes (excluding serial stream start sign)
  94. */
  95. static inline uint16_t mavlink_msg_open_drone_id_system_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
  96. uint8_t target_system, uint8_t target_component, const uint8_t *id_or_mac, uint8_t operator_location_type, uint8_t classification_type, int32_t operator_latitude, int32_t operator_longitude, uint16_t area_count, uint16_t area_radius, float area_ceiling, float area_floor, uint8_t category_eu, uint8_t class_eu, float operator_altitude_geo, uint32_t timestamp)
  97. {
  98. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  99. char buf[MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM_LEN];
  100. _mav_put_int32_t(buf, 0, operator_latitude);
  101. _mav_put_int32_t(buf, 4, operator_longitude);
  102. _mav_put_float(buf, 8, area_ceiling);
  103. _mav_put_float(buf, 12, area_floor);
  104. _mav_put_float(buf, 16, operator_altitude_geo);
  105. _mav_put_uint32_t(buf, 20, timestamp);
  106. _mav_put_uint16_t(buf, 24, area_count);
  107. _mav_put_uint16_t(buf, 26, area_radius);
  108. _mav_put_uint8_t(buf, 28, target_system);
  109. _mav_put_uint8_t(buf, 29, target_component);
  110. _mav_put_uint8_t(buf, 50, operator_location_type);
  111. _mav_put_uint8_t(buf, 51, classification_type);
  112. _mav_put_uint8_t(buf, 52, category_eu);
  113. _mav_put_uint8_t(buf, 53, class_eu);
  114. _mav_put_uint8_t_array(buf, 30, id_or_mac, 20);
  115. memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM_LEN);
  116. #else
  117. mavlink_open_drone_id_system_t packet;
  118. packet.operator_latitude = operator_latitude;
  119. packet.operator_longitude = operator_longitude;
  120. packet.area_ceiling = area_ceiling;
  121. packet.area_floor = area_floor;
  122. packet.operator_altitude_geo = operator_altitude_geo;
  123. packet.timestamp = timestamp;
  124. packet.area_count = area_count;
  125. packet.area_radius = area_radius;
  126. packet.target_system = target_system;
  127. packet.target_component = target_component;
  128. packet.operator_location_type = operator_location_type;
  129. packet.classification_type = classification_type;
  130. packet.category_eu = category_eu;
  131. packet.class_eu = class_eu;
  132. mav_array_memcpy(packet.id_or_mac, id_or_mac, sizeof(uint8_t)*20);
  133. memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM_LEN);
  134. #endif
  135. msg->msgid = MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM;
  136. return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM_MIN_LEN, MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM_LEN, MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM_CRC);
  137. }
  138. /**
  139. * @brief Pack a open_drone_id_system message
  140. * @param system_id ID of this system
  141. * @param component_id ID of this component (e.g. 200 for IMU)
  142. * @param status MAVLink status structure
  143. * @param msg The MAVLink message to compress the data into
  144. *
  145. * @param target_system System ID (0 for broadcast).
  146. * @param target_component Component ID (0 for broadcast).
  147. * @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.
  148. * @param operator_location_type Specifies the operator location type.
  149. * @param classification_type Specifies the classification type of the UA.
  150. * @param operator_latitude [degE7] Latitude of the operator. If unknown: 0 (both Lat/Lon).
  151. * @param operator_longitude [degE7] Longitude of the operator. If unknown: 0 (both Lat/Lon).
  152. * @param area_count Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA.
  153. * @param area_radius [m] Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA.
  154. * @param area_ceiling [m] Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA.
  155. * @param area_floor [m] Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA.
  156. * @param category_eu When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA.
  157. * @param class_eu When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA.
  158. * @param operator_altitude_geo [m] Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m.
  159. * @param timestamp [s] 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019.
  160. * @return length of the message in bytes (excluding serial stream start sign)
  161. */
  162. static inline uint16_t mavlink_msg_open_drone_id_system_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
  163. uint8_t target_system, uint8_t target_component, const uint8_t *id_or_mac, uint8_t operator_location_type, uint8_t classification_type, int32_t operator_latitude, int32_t operator_longitude, uint16_t area_count, uint16_t area_radius, float area_ceiling, float area_floor, uint8_t category_eu, uint8_t class_eu, float operator_altitude_geo, uint32_t timestamp)
  164. {
  165. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  166. char buf[MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM_LEN];
  167. _mav_put_int32_t(buf, 0, operator_latitude);
  168. _mav_put_int32_t(buf, 4, operator_longitude);
  169. _mav_put_float(buf, 8, area_ceiling);
  170. _mav_put_float(buf, 12, area_floor);
  171. _mav_put_float(buf, 16, operator_altitude_geo);
  172. _mav_put_uint32_t(buf, 20, timestamp);
  173. _mav_put_uint16_t(buf, 24, area_count);
  174. _mav_put_uint16_t(buf, 26, area_radius);
  175. _mav_put_uint8_t(buf, 28, target_system);
  176. _mav_put_uint8_t(buf, 29, target_component);
  177. _mav_put_uint8_t(buf, 50, operator_location_type);
  178. _mav_put_uint8_t(buf, 51, classification_type);
  179. _mav_put_uint8_t(buf, 52, category_eu);
  180. _mav_put_uint8_t(buf, 53, class_eu);
  181. _mav_put_uint8_t_array(buf, 30, id_or_mac, 20);
  182. memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM_LEN);
  183. #else
  184. mavlink_open_drone_id_system_t packet;
  185. packet.operator_latitude = operator_latitude;
  186. packet.operator_longitude = operator_longitude;
  187. packet.area_ceiling = area_ceiling;
  188. packet.area_floor = area_floor;
  189. packet.operator_altitude_geo = operator_altitude_geo;
  190. packet.timestamp = timestamp;
  191. packet.area_count = area_count;
  192. packet.area_radius = area_radius;
  193. packet.target_system = target_system;
  194. packet.target_component = target_component;
  195. packet.operator_location_type = operator_location_type;
  196. packet.classification_type = classification_type;
  197. packet.category_eu = category_eu;
  198. packet.class_eu = class_eu;
  199. mav_array_memcpy(packet.id_or_mac, id_or_mac, sizeof(uint8_t)*20);
  200. memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM_LEN);
  201. #endif
  202. msg->msgid = MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM;
  203. #if MAVLINK_CRC_EXTRA
  204. return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM_MIN_LEN, MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM_LEN, MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM_CRC);
  205. #else
  206. return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM_MIN_LEN, MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM_LEN);
  207. #endif
  208. }
  209. /**
  210. * @brief Pack a open_drone_id_system message on a channel
  211. * @param system_id ID of this system
  212. * @param component_id ID of this component (e.g. 200 for IMU)
  213. * @param chan The MAVLink channel this message will be sent over
  214. * @param msg The MAVLink message to compress the data into
  215. * @param target_system System ID (0 for broadcast).
  216. * @param target_component Component ID (0 for broadcast).
  217. * @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.
  218. * @param operator_location_type Specifies the operator location type.
  219. * @param classification_type Specifies the classification type of the UA.
  220. * @param operator_latitude [degE7] Latitude of the operator. If unknown: 0 (both Lat/Lon).
  221. * @param operator_longitude [degE7] Longitude of the operator. If unknown: 0 (both Lat/Lon).
  222. * @param area_count Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA.
  223. * @param area_radius [m] Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA.
  224. * @param area_ceiling [m] Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA.
  225. * @param area_floor [m] Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA.
  226. * @param category_eu When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA.
  227. * @param class_eu When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA.
  228. * @param operator_altitude_geo [m] Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m.
  229. * @param timestamp [s] 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019.
  230. * @return length of the message in bytes (excluding serial stream start sign)
  231. */
  232. static inline uint16_t mavlink_msg_open_drone_id_system_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
  233. mavlink_message_t* msg,
  234. uint8_t target_system,uint8_t target_component,const uint8_t *id_or_mac,uint8_t operator_location_type,uint8_t classification_type,int32_t operator_latitude,int32_t operator_longitude,uint16_t area_count,uint16_t area_radius,float area_ceiling,float area_floor,uint8_t category_eu,uint8_t class_eu,float operator_altitude_geo,uint32_t timestamp)
  235. {
  236. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  237. char buf[MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM_LEN];
  238. _mav_put_int32_t(buf, 0, operator_latitude);
  239. _mav_put_int32_t(buf, 4, operator_longitude);
  240. _mav_put_float(buf, 8, area_ceiling);
  241. _mav_put_float(buf, 12, area_floor);
  242. _mav_put_float(buf, 16, operator_altitude_geo);
  243. _mav_put_uint32_t(buf, 20, timestamp);
  244. _mav_put_uint16_t(buf, 24, area_count);
  245. _mav_put_uint16_t(buf, 26, area_radius);
  246. _mav_put_uint8_t(buf, 28, target_system);
  247. _mav_put_uint8_t(buf, 29, target_component);
  248. _mav_put_uint8_t(buf, 50, operator_location_type);
  249. _mav_put_uint8_t(buf, 51, classification_type);
  250. _mav_put_uint8_t(buf, 52, category_eu);
  251. _mav_put_uint8_t(buf, 53, class_eu);
  252. _mav_put_uint8_t_array(buf, 30, id_or_mac, 20);
  253. memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM_LEN);
  254. #else
  255. mavlink_open_drone_id_system_t packet;
  256. packet.operator_latitude = operator_latitude;
  257. packet.operator_longitude = operator_longitude;
  258. packet.area_ceiling = area_ceiling;
  259. packet.area_floor = area_floor;
  260. packet.operator_altitude_geo = operator_altitude_geo;
  261. packet.timestamp = timestamp;
  262. packet.area_count = area_count;
  263. packet.area_radius = area_radius;
  264. packet.target_system = target_system;
  265. packet.target_component = target_component;
  266. packet.operator_location_type = operator_location_type;
  267. packet.classification_type = classification_type;
  268. packet.category_eu = category_eu;
  269. packet.class_eu = class_eu;
  270. mav_array_memcpy(packet.id_or_mac, id_or_mac, sizeof(uint8_t)*20);
  271. memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM_LEN);
  272. #endif
  273. msg->msgid = MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM;
  274. return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM_MIN_LEN, MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM_LEN, MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM_CRC);
  275. }
  276. /**
  277. * @brief Encode a open_drone_id_system struct
  278. *
  279. * @param system_id ID of this system
  280. * @param component_id ID of this component (e.g. 200 for IMU)
  281. * @param msg The MAVLink message to compress the data into
  282. * @param open_drone_id_system C-struct to read the message contents from
  283. */
  284. static inline uint16_t mavlink_msg_open_drone_id_system_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_open_drone_id_system_t* open_drone_id_system)
  285. {
  286. return mavlink_msg_open_drone_id_system_pack(system_id, component_id, msg, open_drone_id_system->target_system, open_drone_id_system->target_component, open_drone_id_system->id_or_mac, open_drone_id_system->operator_location_type, open_drone_id_system->classification_type, open_drone_id_system->operator_latitude, open_drone_id_system->operator_longitude, open_drone_id_system->area_count, open_drone_id_system->area_radius, open_drone_id_system->area_ceiling, open_drone_id_system->area_floor, open_drone_id_system->category_eu, open_drone_id_system->class_eu, open_drone_id_system->operator_altitude_geo, open_drone_id_system->timestamp);
  287. }
  288. /**
  289. * @brief Encode a open_drone_id_system struct on a channel
  290. *
  291. * @param system_id ID of this system
  292. * @param component_id ID of this component (e.g. 200 for IMU)
  293. * @param chan The MAVLink channel this message will be sent over
  294. * @param msg The MAVLink message to compress the data into
  295. * @param open_drone_id_system C-struct to read the message contents from
  296. */
  297. static inline uint16_t mavlink_msg_open_drone_id_system_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_open_drone_id_system_t* open_drone_id_system)
  298. {
  299. return mavlink_msg_open_drone_id_system_pack_chan(system_id, component_id, chan, msg, open_drone_id_system->target_system, open_drone_id_system->target_component, open_drone_id_system->id_or_mac, open_drone_id_system->operator_location_type, open_drone_id_system->classification_type, open_drone_id_system->operator_latitude, open_drone_id_system->operator_longitude, open_drone_id_system->area_count, open_drone_id_system->area_radius, open_drone_id_system->area_ceiling, open_drone_id_system->area_floor, open_drone_id_system->category_eu, open_drone_id_system->class_eu, open_drone_id_system->operator_altitude_geo, open_drone_id_system->timestamp);
  300. }
  301. /**
  302. * @brief Encode a open_drone_id_system struct with provided status structure
  303. *
  304. * @param system_id ID of this system
  305. * @param component_id ID of this component (e.g. 200 for IMU)
  306. * @param status MAVLink status structure
  307. * @param msg The MAVLink message to compress the data into
  308. * @param open_drone_id_system C-struct to read the message contents from
  309. */
  310. static inline uint16_t mavlink_msg_open_drone_id_system_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_open_drone_id_system_t* open_drone_id_system)
  311. {
  312. return mavlink_msg_open_drone_id_system_pack_status(system_id, component_id, _status, msg, open_drone_id_system->target_system, open_drone_id_system->target_component, open_drone_id_system->id_or_mac, open_drone_id_system->operator_location_type, open_drone_id_system->classification_type, open_drone_id_system->operator_latitude, open_drone_id_system->operator_longitude, open_drone_id_system->area_count, open_drone_id_system->area_radius, open_drone_id_system->area_ceiling, open_drone_id_system->area_floor, open_drone_id_system->category_eu, open_drone_id_system->class_eu, open_drone_id_system->operator_altitude_geo, open_drone_id_system->timestamp);
  313. }
  314. /**
  315. * @brief Send a open_drone_id_system message
  316. * @param chan MAVLink channel to send the message
  317. *
  318. * @param target_system System ID (0 for broadcast).
  319. * @param target_component Component ID (0 for broadcast).
  320. * @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.
  321. * @param operator_location_type Specifies the operator location type.
  322. * @param classification_type Specifies the classification type of the UA.
  323. * @param operator_latitude [degE7] Latitude of the operator. If unknown: 0 (both Lat/Lon).
  324. * @param operator_longitude [degE7] Longitude of the operator. If unknown: 0 (both Lat/Lon).
  325. * @param area_count Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA.
  326. * @param area_radius [m] Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA.
  327. * @param area_ceiling [m] Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA.
  328. * @param area_floor [m] Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA.
  329. * @param category_eu When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA.
  330. * @param class_eu When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA.
  331. * @param operator_altitude_geo [m] Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m.
  332. * @param timestamp [s] 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019.
  333. */
  334. #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
  335. static inline void mavlink_msg_open_drone_id_system_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, const uint8_t *id_or_mac, uint8_t operator_location_type, uint8_t classification_type, int32_t operator_latitude, int32_t operator_longitude, uint16_t area_count, uint16_t area_radius, float area_ceiling, float area_floor, uint8_t category_eu, uint8_t class_eu, float operator_altitude_geo, uint32_t timestamp)
  336. {
  337. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  338. char buf[MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM_LEN];
  339. _mav_put_int32_t(buf, 0, operator_latitude);
  340. _mav_put_int32_t(buf, 4, operator_longitude);
  341. _mav_put_float(buf, 8, area_ceiling);
  342. _mav_put_float(buf, 12, area_floor);
  343. _mav_put_float(buf, 16, operator_altitude_geo);
  344. _mav_put_uint32_t(buf, 20, timestamp);
  345. _mav_put_uint16_t(buf, 24, area_count);
  346. _mav_put_uint16_t(buf, 26, area_radius);
  347. _mav_put_uint8_t(buf, 28, target_system);
  348. _mav_put_uint8_t(buf, 29, target_component);
  349. _mav_put_uint8_t(buf, 50, operator_location_type);
  350. _mav_put_uint8_t(buf, 51, classification_type);
  351. _mav_put_uint8_t(buf, 52, category_eu);
  352. _mav_put_uint8_t(buf, 53, class_eu);
  353. _mav_put_uint8_t_array(buf, 30, id_or_mac, 20);
  354. _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM, buf, MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM_MIN_LEN, MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM_LEN, MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM_CRC);
  355. #else
  356. mavlink_open_drone_id_system_t packet;
  357. packet.operator_latitude = operator_latitude;
  358. packet.operator_longitude = operator_longitude;
  359. packet.area_ceiling = area_ceiling;
  360. packet.area_floor = area_floor;
  361. packet.operator_altitude_geo = operator_altitude_geo;
  362. packet.timestamp = timestamp;
  363. packet.area_count = area_count;
  364. packet.area_radius = area_radius;
  365. packet.target_system = target_system;
  366. packet.target_component = target_component;
  367. packet.operator_location_type = operator_location_type;
  368. packet.classification_type = classification_type;
  369. packet.category_eu = category_eu;
  370. packet.class_eu = class_eu;
  371. mav_array_memcpy(packet.id_or_mac, id_or_mac, sizeof(uint8_t)*20);
  372. _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM, (const char *)&packet, MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM_MIN_LEN, MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM_LEN, MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM_CRC);
  373. #endif
  374. }
  375. /**
  376. * @brief Send a open_drone_id_system message
  377. * @param chan MAVLink channel to send the message
  378. * @param struct The MAVLink struct to serialize
  379. */
  380. static inline void mavlink_msg_open_drone_id_system_send_struct(mavlink_channel_t chan, const mavlink_open_drone_id_system_t* open_drone_id_system)
  381. {
  382. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  383. mavlink_msg_open_drone_id_system_send(chan, open_drone_id_system->target_system, open_drone_id_system->target_component, open_drone_id_system->id_or_mac, open_drone_id_system->operator_location_type, open_drone_id_system->classification_type, open_drone_id_system->operator_latitude, open_drone_id_system->operator_longitude, open_drone_id_system->area_count, open_drone_id_system->area_radius, open_drone_id_system->area_ceiling, open_drone_id_system->area_floor, open_drone_id_system->category_eu, open_drone_id_system->class_eu, open_drone_id_system->operator_altitude_geo, open_drone_id_system->timestamp);
  384. #else
  385. _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM, (const char *)open_drone_id_system, MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM_MIN_LEN, MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM_LEN, MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM_CRC);
  386. #endif
  387. }
  388. #if MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM_LEN <= MAVLINK_MAX_PAYLOAD_LEN
  389. /*
  390. This variant of _send() can be used to save stack space by re-using
  391. memory from the receive buffer. The caller provides a
  392. mavlink_message_t which is the size of a full mavlink message. This
  393. is usually the receive buffer for the channel, and allows a reply to an
  394. incoming message with minimum stack space usage.
  395. */
  396. static inline void mavlink_msg_open_drone_id_system_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 operator_location_type, uint8_t classification_type, int32_t operator_latitude, int32_t operator_longitude, uint16_t area_count, uint16_t area_radius, float area_ceiling, float area_floor, uint8_t category_eu, uint8_t class_eu, float operator_altitude_geo, uint32_t timestamp)
  397. {
  398. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  399. char *buf = (char *)msgbuf;
  400. _mav_put_int32_t(buf, 0, operator_latitude);
  401. _mav_put_int32_t(buf, 4, operator_longitude);
  402. _mav_put_float(buf, 8, area_ceiling);
  403. _mav_put_float(buf, 12, area_floor);
  404. _mav_put_float(buf, 16, operator_altitude_geo);
  405. _mav_put_uint32_t(buf, 20, timestamp);
  406. _mav_put_uint16_t(buf, 24, area_count);
  407. _mav_put_uint16_t(buf, 26, area_radius);
  408. _mav_put_uint8_t(buf, 28, target_system);
  409. _mav_put_uint8_t(buf, 29, target_component);
  410. _mav_put_uint8_t(buf, 50, operator_location_type);
  411. _mav_put_uint8_t(buf, 51, classification_type);
  412. _mav_put_uint8_t(buf, 52, category_eu);
  413. _mav_put_uint8_t(buf, 53, class_eu);
  414. _mav_put_uint8_t_array(buf, 30, id_or_mac, 20);
  415. _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM, buf, MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM_MIN_LEN, MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM_LEN, MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM_CRC);
  416. #else
  417. mavlink_open_drone_id_system_t *packet = (mavlink_open_drone_id_system_t *)msgbuf;
  418. packet->operator_latitude = operator_latitude;
  419. packet->operator_longitude = operator_longitude;
  420. packet->area_ceiling = area_ceiling;
  421. packet->area_floor = area_floor;
  422. packet->operator_altitude_geo = operator_altitude_geo;
  423. packet->timestamp = timestamp;
  424. packet->area_count = area_count;
  425. packet->area_radius = area_radius;
  426. packet->target_system = target_system;
  427. packet->target_component = target_component;
  428. packet->operator_location_type = operator_location_type;
  429. packet->classification_type = classification_type;
  430. packet->category_eu = category_eu;
  431. packet->class_eu = class_eu;
  432. mav_array_memcpy(packet->id_or_mac, id_or_mac, sizeof(uint8_t)*20);
  433. _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM, (const char *)packet, MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM_MIN_LEN, MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM_LEN, MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM_CRC);
  434. #endif
  435. }
  436. #endif
  437. #endif
  438. // MESSAGE OPEN_DRONE_ID_SYSTEM UNPACKING
  439. /**
  440. * @brief Get field target_system from open_drone_id_system message
  441. *
  442. * @return System ID (0 for broadcast).
  443. */
  444. static inline uint8_t mavlink_msg_open_drone_id_system_get_target_system(const mavlink_message_t* msg)
  445. {
  446. return _MAV_RETURN_uint8_t(msg, 28);
  447. }
  448. /**
  449. * @brief Get field target_component from open_drone_id_system message
  450. *
  451. * @return Component ID (0 for broadcast).
  452. */
  453. static inline uint8_t mavlink_msg_open_drone_id_system_get_target_component(const mavlink_message_t* msg)
  454. {
  455. return _MAV_RETURN_uint8_t(msg, 29);
  456. }
  457. /**
  458. * @brief Get field id_or_mac from open_drone_id_system message
  459. *
  460. * @return Only used for drone ID data received from other UAs. See detailed description at https://mavlink.io/en/services/opendroneid.html.
  461. */
  462. static inline uint16_t mavlink_msg_open_drone_id_system_get_id_or_mac(const mavlink_message_t* msg, uint8_t *id_or_mac)
  463. {
  464. return _MAV_RETURN_uint8_t_array(msg, id_or_mac, 20, 30);
  465. }
  466. /**
  467. * @brief Get field operator_location_type from open_drone_id_system message
  468. *
  469. * @return Specifies the operator location type.
  470. */
  471. static inline uint8_t mavlink_msg_open_drone_id_system_get_operator_location_type(const mavlink_message_t* msg)
  472. {
  473. return _MAV_RETURN_uint8_t(msg, 50);
  474. }
  475. /**
  476. * @brief Get field classification_type from open_drone_id_system message
  477. *
  478. * @return Specifies the classification type of the UA.
  479. */
  480. static inline uint8_t mavlink_msg_open_drone_id_system_get_classification_type(const mavlink_message_t* msg)
  481. {
  482. return _MAV_RETURN_uint8_t(msg, 51);
  483. }
  484. /**
  485. * @brief Get field operator_latitude from open_drone_id_system message
  486. *
  487. * @return [degE7] Latitude of the operator. If unknown: 0 (both Lat/Lon).
  488. */
  489. static inline int32_t mavlink_msg_open_drone_id_system_get_operator_latitude(const mavlink_message_t* msg)
  490. {
  491. return _MAV_RETURN_int32_t(msg, 0);
  492. }
  493. /**
  494. * @brief Get field operator_longitude from open_drone_id_system message
  495. *
  496. * @return [degE7] Longitude of the operator. If unknown: 0 (both Lat/Lon).
  497. */
  498. static inline int32_t mavlink_msg_open_drone_id_system_get_operator_longitude(const mavlink_message_t* msg)
  499. {
  500. return _MAV_RETURN_int32_t(msg, 4);
  501. }
  502. /**
  503. * @brief Get field area_count from open_drone_id_system message
  504. *
  505. * @return Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA.
  506. */
  507. static inline uint16_t mavlink_msg_open_drone_id_system_get_area_count(const mavlink_message_t* msg)
  508. {
  509. return _MAV_RETURN_uint16_t(msg, 24);
  510. }
  511. /**
  512. * @brief Get field area_radius from open_drone_id_system message
  513. *
  514. * @return [m] Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA.
  515. */
  516. static inline uint16_t mavlink_msg_open_drone_id_system_get_area_radius(const mavlink_message_t* msg)
  517. {
  518. return _MAV_RETURN_uint16_t(msg, 26);
  519. }
  520. /**
  521. * @brief Get field area_ceiling from open_drone_id_system message
  522. *
  523. * @return [m] Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA.
  524. */
  525. static inline float mavlink_msg_open_drone_id_system_get_area_ceiling(const mavlink_message_t* msg)
  526. {
  527. return _MAV_RETURN_float(msg, 8);
  528. }
  529. /**
  530. * @brief Get field area_floor from open_drone_id_system message
  531. *
  532. * @return [m] Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA.
  533. */
  534. static inline float mavlink_msg_open_drone_id_system_get_area_floor(const mavlink_message_t* msg)
  535. {
  536. return _MAV_RETURN_float(msg, 12);
  537. }
  538. /**
  539. * @brief Get field category_eu from open_drone_id_system message
  540. *
  541. * @return When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA.
  542. */
  543. static inline uint8_t mavlink_msg_open_drone_id_system_get_category_eu(const mavlink_message_t* msg)
  544. {
  545. return _MAV_RETURN_uint8_t(msg, 52);
  546. }
  547. /**
  548. * @brief Get field class_eu from open_drone_id_system message
  549. *
  550. * @return When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA.
  551. */
  552. static inline uint8_t mavlink_msg_open_drone_id_system_get_class_eu(const mavlink_message_t* msg)
  553. {
  554. return _MAV_RETURN_uint8_t(msg, 53);
  555. }
  556. /**
  557. * @brief Get field operator_altitude_geo from open_drone_id_system message
  558. *
  559. * @return [m] Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m.
  560. */
  561. static inline float mavlink_msg_open_drone_id_system_get_operator_altitude_geo(const mavlink_message_t* msg)
  562. {
  563. return _MAV_RETURN_float(msg, 16);
  564. }
  565. /**
  566. * @brief Get field timestamp from open_drone_id_system message
  567. *
  568. * @return [s] 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019.
  569. */
  570. static inline uint32_t mavlink_msg_open_drone_id_system_get_timestamp(const mavlink_message_t* msg)
  571. {
  572. return _MAV_RETURN_uint32_t(msg, 20);
  573. }
  574. /**
  575. * @brief Decode a open_drone_id_system message into a struct
  576. *
  577. * @param msg The message to decode
  578. * @param open_drone_id_system C-struct to decode the message contents into
  579. */
  580. static inline void mavlink_msg_open_drone_id_system_decode(const mavlink_message_t* msg, mavlink_open_drone_id_system_t* open_drone_id_system)
  581. {
  582. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  583. open_drone_id_system->operator_latitude = mavlink_msg_open_drone_id_system_get_operator_latitude(msg);
  584. open_drone_id_system->operator_longitude = mavlink_msg_open_drone_id_system_get_operator_longitude(msg);
  585. open_drone_id_system->area_ceiling = mavlink_msg_open_drone_id_system_get_area_ceiling(msg);
  586. open_drone_id_system->area_floor = mavlink_msg_open_drone_id_system_get_area_floor(msg);
  587. open_drone_id_system->operator_altitude_geo = mavlink_msg_open_drone_id_system_get_operator_altitude_geo(msg);
  588. open_drone_id_system->timestamp = mavlink_msg_open_drone_id_system_get_timestamp(msg);
  589. open_drone_id_system->area_count = mavlink_msg_open_drone_id_system_get_area_count(msg);
  590. open_drone_id_system->area_radius = mavlink_msg_open_drone_id_system_get_area_radius(msg);
  591. open_drone_id_system->target_system = mavlink_msg_open_drone_id_system_get_target_system(msg);
  592. open_drone_id_system->target_component = mavlink_msg_open_drone_id_system_get_target_component(msg);
  593. mavlink_msg_open_drone_id_system_get_id_or_mac(msg, open_drone_id_system->id_or_mac);
  594. open_drone_id_system->operator_location_type = mavlink_msg_open_drone_id_system_get_operator_location_type(msg);
  595. open_drone_id_system->classification_type = mavlink_msg_open_drone_id_system_get_classification_type(msg);
  596. open_drone_id_system->category_eu = mavlink_msg_open_drone_id_system_get_category_eu(msg);
  597. open_drone_id_system->class_eu = mavlink_msg_open_drone_id_system_get_class_eu(msg);
  598. #else
  599. uint8_t len = msg->len < MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM_LEN? msg->len : MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM_LEN;
  600. memset(open_drone_id_system, 0, MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM_LEN);
  601. memcpy(open_drone_id_system, _MAV_PAYLOAD(msg), len);
  602. #endif
  603. }