mavlink_msg_vk_comp_version.h 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423
  1. #pragma once
  2. // MESSAGE VK_COMP_VERSION PACKING
  3. #define MAVLINK_MSG_ID_VK_COMP_VERSION 53006
  4. typedef struct __mavlink_vk_comp_version_t {
  5. uint16_t comp_id; /*< component id*/
  6. uint8_t hw_ver[16]; /*< hardware version*/
  7. uint8_t fw_ver[16]; /*< firmware version*/
  8. uint8_t SN[16]; /*< SN number*/
  9. uint8_t manufactory[16]; /*< manufactory*/
  10. uint8_t model[16]; /*< model*/
  11. uint8_t priv_data[16]; /*< gnss configuration*/
  12. } mavlink_vk_comp_version_t;
  13. #define MAVLINK_MSG_ID_VK_COMP_VERSION_LEN 98
  14. #define MAVLINK_MSG_ID_VK_COMP_VERSION_MIN_LEN 98
  15. #define MAVLINK_MSG_ID_53006_LEN 98
  16. #define MAVLINK_MSG_ID_53006_MIN_LEN 98
  17. #define MAVLINK_MSG_ID_VK_COMP_VERSION_CRC 227
  18. #define MAVLINK_MSG_ID_53006_CRC 227
  19. #define MAVLINK_MSG_VK_COMP_VERSION_FIELD_HW_VER_LEN 16
  20. #define MAVLINK_MSG_VK_COMP_VERSION_FIELD_FW_VER_LEN 16
  21. #define MAVLINK_MSG_VK_COMP_VERSION_FIELD_SN_LEN 16
  22. #define MAVLINK_MSG_VK_COMP_VERSION_FIELD_MANUFACTORY_LEN 16
  23. #define MAVLINK_MSG_VK_COMP_VERSION_FIELD_MODEL_LEN 16
  24. #define MAVLINK_MSG_VK_COMP_VERSION_FIELD_PRIV_DATA_LEN 16
  25. #if MAVLINK_COMMAND_24BIT
  26. #define MAVLINK_MESSAGE_INFO_VK_COMP_VERSION { \
  27. 53006, \
  28. "VK_COMP_VERSION", \
  29. 7, \
  30. { { "comp_id", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_vk_comp_version_t, comp_id) }, \
  31. { "hw_ver", NULL, MAVLINK_TYPE_UINT8_T, 16, 2, offsetof(mavlink_vk_comp_version_t, hw_ver) }, \
  32. { "fw_ver", NULL, MAVLINK_TYPE_UINT8_T, 16, 18, offsetof(mavlink_vk_comp_version_t, fw_ver) }, \
  33. { "SN", NULL, MAVLINK_TYPE_UINT8_T, 16, 34, offsetof(mavlink_vk_comp_version_t, SN) }, \
  34. { "manufactory", NULL, MAVLINK_TYPE_UINT8_T, 16, 50, offsetof(mavlink_vk_comp_version_t, manufactory) }, \
  35. { "model", NULL, MAVLINK_TYPE_UINT8_T, 16, 66, offsetof(mavlink_vk_comp_version_t, model) }, \
  36. { "priv_data", NULL, MAVLINK_TYPE_UINT8_T, 16, 82, offsetof(mavlink_vk_comp_version_t, priv_data) }, \
  37. } \
  38. }
  39. #else
  40. #define MAVLINK_MESSAGE_INFO_VK_COMP_VERSION { \
  41. "VK_COMP_VERSION", \
  42. 7, \
  43. { { "comp_id", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_vk_comp_version_t, comp_id) }, \
  44. { "hw_ver", NULL, MAVLINK_TYPE_UINT8_T, 16, 2, offsetof(mavlink_vk_comp_version_t, hw_ver) }, \
  45. { "fw_ver", NULL, MAVLINK_TYPE_UINT8_T, 16, 18, offsetof(mavlink_vk_comp_version_t, fw_ver) }, \
  46. { "SN", NULL, MAVLINK_TYPE_UINT8_T, 16, 34, offsetof(mavlink_vk_comp_version_t, SN) }, \
  47. { "manufactory", NULL, MAVLINK_TYPE_UINT8_T, 16, 50, offsetof(mavlink_vk_comp_version_t, manufactory) }, \
  48. { "model", NULL, MAVLINK_TYPE_UINT8_T, 16, 66, offsetof(mavlink_vk_comp_version_t, model) }, \
  49. { "priv_data", NULL, MAVLINK_TYPE_UINT8_T, 16, 82, offsetof(mavlink_vk_comp_version_t, priv_data) }, \
  50. } \
  51. }
  52. #endif
  53. /**
  54. * @brief Pack a vk_comp_version message
  55. * @param system_id ID of this system
  56. * @param component_id ID of this component (e.g. 200 for IMU)
  57. * @param msg The MAVLink message to compress the data into
  58. *
  59. * @param comp_id component id
  60. * @param hw_ver hardware version
  61. * @param fw_ver firmware version
  62. * @param SN SN number
  63. * @param manufactory manufactory
  64. * @param model model
  65. * @param priv_data gnss configuration
  66. * @return length of the message in bytes (excluding serial stream start sign)
  67. */
  68. static inline uint16_t mavlink_msg_vk_comp_version_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
  69. uint16_t comp_id, const uint8_t *hw_ver, const uint8_t *fw_ver, const uint8_t *SN, const uint8_t *manufactory, const uint8_t *model, const uint8_t *priv_data)
  70. {
  71. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  72. char buf[MAVLINK_MSG_ID_VK_COMP_VERSION_LEN];
  73. _mav_put_uint16_t(buf, 0, comp_id);
  74. _mav_put_uint8_t_array(buf, 2, hw_ver, 16);
  75. _mav_put_uint8_t_array(buf, 18, fw_ver, 16);
  76. _mav_put_uint8_t_array(buf, 34, SN, 16);
  77. _mav_put_uint8_t_array(buf, 50, manufactory, 16);
  78. _mav_put_uint8_t_array(buf, 66, model, 16);
  79. _mav_put_uint8_t_array(buf, 82, priv_data, 16);
  80. memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VK_COMP_VERSION_LEN);
  81. #else
  82. mavlink_vk_comp_version_t packet;
  83. packet.comp_id = comp_id;
  84. mav_array_memcpy(packet.hw_ver, hw_ver, sizeof(uint8_t)*16);
  85. mav_array_memcpy(packet.fw_ver, fw_ver, sizeof(uint8_t)*16);
  86. mav_array_memcpy(packet.SN, SN, sizeof(uint8_t)*16);
  87. mav_array_memcpy(packet.manufactory, manufactory, sizeof(uint8_t)*16);
  88. mav_array_memcpy(packet.model, model, sizeof(uint8_t)*16);
  89. mav_array_memcpy(packet.priv_data, priv_data, sizeof(uint8_t)*16);
  90. memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VK_COMP_VERSION_LEN);
  91. #endif
  92. msg->msgid = MAVLINK_MSG_ID_VK_COMP_VERSION;
  93. return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_VK_COMP_VERSION_MIN_LEN, MAVLINK_MSG_ID_VK_COMP_VERSION_LEN, MAVLINK_MSG_ID_VK_COMP_VERSION_CRC);
  94. }
  95. /**
  96. * @brief Pack a vk_comp_version 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 comp_id component id
  103. * @param hw_ver hardware version
  104. * @param fw_ver firmware version
  105. * @param SN SN number
  106. * @param manufactory manufactory
  107. * @param model model
  108. * @param priv_data gnss configuration
  109. * @return length of the message in bytes (excluding serial stream start sign)
  110. */
  111. static inline uint16_t mavlink_msg_vk_comp_version_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
  112. uint16_t comp_id, const uint8_t *hw_ver, const uint8_t *fw_ver, const uint8_t *SN, const uint8_t *manufactory, const uint8_t *model, const uint8_t *priv_data)
  113. {
  114. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  115. char buf[MAVLINK_MSG_ID_VK_COMP_VERSION_LEN];
  116. _mav_put_uint16_t(buf, 0, comp_id);
  117. _mav_put_uint8_t_array(buf, 2, hw_ver, 16);
  118. _mav_put_uint8_t_array(buf, 18, fw_ver, 16);
  119. _mav_put_uint8_t_array(buf, 34, SN, 16);
  120. _mav_put_uint8_t_array(buf, 50, manufactory, 16);
  121. _mav_put_uint8_t_array(buf, 66, model, 16);
  122. _mav_put_uint8_t_array(buf, 82, priv_data, 16);
  123. memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VK_COMP_VERSION_LEN);
  124. #else
  125. mavlink_vk_comp_version_t packet;
  126. packet.comp_id = comp_id;
  127. mav_array_memcpy(packet.hw_ver, hw_ver, sizeof(uint8_t)*16);
  128. mav_array_memcpy(packet.fw_ver, fw_ver, sizeof(uint8_t)*16);
  129. mav_array_memcpy(packet.SN, SN, sizeof(uint8_t)*16);
  130. mav_array_memcpy(packet.manufactory, manufactory, sizeof(uint8_t)*16);
  131. mav_array_memcpy(packet.model, model, sizeof(uint8_t)*16);
  132. mav_array_memcpy(packet.priv_data, priv_data, sizeof(uint8_t)*16);
  133. memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VK_COMP_VERSION_LEN);
  134. #endif
  135. msg->msgid = MAVLINK_MSG_ID_VK_COMP_VERSION;
  136. #if MAVLINK_CRC_EXTRA
  137. return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_VK_COMP_VERSION_MIN_LEN, MAVLINK_MSG_ID_VK_COMP_VERSION_LEN, MAVLINK_MSG_ID_VK_COMP_VERSION_CRC);
  138. #else
  139. return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_VK_COMP_VERSION_MIN_LEN, MAVLINK_MSG_ID_VK_COMP_VERSION_LEN);
  140. #endif
  141. }
  142. /**
  143. * @brief Pack a vk_comp_version message on a channel
  144. * @param system_id ID of this system
  145. * @param component_id ID of this component (e.g. 200 for IMU)
  146. * @param chan The MAVLink channel this message will be sent over
  147. * @param msg The MAVLink message to compress the data into
  148. * @param comp_id component id
  149. * @param hw_ver hardware version
  150. * @param fw_ver firmware version
  151. * @param SN SN number
  152. * @param manufactory manufactory
  153. * @param model model
  154. * @param priv_data gnss configuration
  155. * @return length of the message in bytes (excluding serial stream start sign)
  156. */
  157. static inline uint16_t mavlink_msg_vk_comp_version_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
  158. mavlink_message_t* msg,
  159. uint16_t comp_id,const uint8_t *hw_ver,const uint8_t *fw_ver,const uint8_t *SN,const uint8_t *manufactory,const uint8_t *model,const uint8_t *priv_data)
  160. {
  161. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  162. char buf[MAVLINK_MSG_ID_VK_COMP_VERSION_LEN];
  163. _mav_put_uint16_t(buf, 0, comp_id);
  164. _mav_put_uint8_t_array(buf, 2, hw_ver, 16);
  165. _mav_put_uint8_t_array(buf, 18, fw_ver, 16);
  166. _mav_put_uint8_t_array(buf, 34, SN, 16);
  167. _mav_put_uint8_t_array(buf, 50, manufactory, 16);
  168. _mav_put_uint8_t_array(buf, 66, model, 16);
  169. _mav_put_uint8_t_array(buf, 82, priv_data, 16);
  170. memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_VK_COMP_VERSION_LEN);
  171. #else
  172. mavlink_vk_comp_version_t packet;
  173. packet.comp_id = comp_id;
  174. mav_array_memcpy(packet.hw_ver, hw_ver, sizeof(uint8_t)*16);
  175. mav_array_memcpy(packet.fw_ver, fw_ver, sizeof(uint8_t)*16);
  176. mav_array_memcpy(packet.SN, SN, sizeof(uint8_t)*16);
  177. mav_array_memcpy(packet.manufactory, manufactory, sizeof(uint8_t)*16);
  178. mav_array_memcpy(packet.model, model, sizeof(uint8_t)*16);
  179. mav_array_memcpy(packet.priv_data, priv_data, sizeof(uint8_t)*16);
  180. memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_VK_COMP_VERSION_LEN);
  181. #endif
  182. msg->msgid = MAVLINK_MSG_ID_VK_COMP_VERSION;
  183. return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_VK_COMP_VERSION_MIN_LEN, MAVLINK_MSG_ID_VK_COMP_VERSION_LEN, MAVLINK_MSG_ID_VK_COMP_VERSION_CRC);
  184. }
  185. /**
  186. * @brief Encode a vk_comp_version struct
  187. *
  188. * @param system_id ID of this system
  189. * @param component_id ID of this component (e.g. 200 for IMU)
  190. * @param msg The MAVLink message to compress the data into
  191. * @param vk_comp_version C-struct to read the message contents from
  192. */
  193. static inline uint16_t mavlink_msg_vk_comp_version_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_vk_comp_version_t* vk_comp_version)
  194. {
  195. return mavlink_msg_vk_comp_version_pack(system_id, component_id, msg, vk_comp_version->comp_id, vk_comp_version->hw_ver, vk_comp_version->fw_ver, vk_comp_version->SN, vk_comp_version->manufactory, vk_comp_version->model, vk_comp_version->priv_data);
  196. }
  197. /**
  198. * @brief Encode a vk_comp_version struct on a channel
  199. *
  200. * @param system_id ID of this system
  201. * @param component_id ID of this component (e.g. 200 for IMU)
  202. * @param chan The MAVLink channel this message will be sent over
  203. * @param msg The MAVLink message to compress the data into
  204. * @param vk_comp_version C-struct to read the message contents from
  205. */
  206. static inline uint16_t mavlink_msg_vk_comp_version_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_vk_comp_version_t* vk_comp_version)
  207. {
  208. return mavlink_msg_vk_comp_version_pack_chan(system_id, component_id, chan, msg, vk_comp_version->comp_id, vk_comp_version->hw_ver, vk_comp_version->fw_ver, vk_comp_version->SN, vk_comp_version->manufactory, vk_comp_version->model, vk_comp_version->priv_data);
  209. }
  210. /**
  211. * @brief Encode a vk_comp_version 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 vk_comp_version C-struct to read the message contents from
  218. */
  219. static inline uint16_t mavlink_msg_vk_comp_version_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_vk_comp_version_t* vk_comp_version)
  220. {
  221. return mavlink_msg_vk_comp_version_pack_status(system_id, component_id, _status, msg, vk_comp_version->comp_id, vk_comp_version->hw_ver, vk_comp_version->fw_ver, vk_comp_version->SN, vk_comp_version->manufactory, vk_comp_version->model, vk_comp_version->priv_data);
  222. }
  223. /**
  224. * @brief Send a vk_comp_version message
  225. * @param chan MAVLink channel to send the message
  226. *
  227. * @param comp_id component id
  228. * @param hw_ver hardware version
  229. * @param fw_ver firmware version
  230. * @param SN SN number
  231. * @param manufactory manufactory
  232. * @param model model
  233. * @param priv_data gnss configuration
  234. */
  235. #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
  236. static inline void mavlink_msg_vk_comp_version_send(mavlink_channel_t chan, uint16_t comp_id, const uint8_t *hw_ver, const uint8_t *fw_ver, const uint8_t *SN, const uint8_t *manufactory, const uint8_t *model, const uint8_t *priv_data)
  237. {
  238. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  239. char buf[MAVLINK_MSG_ID_VK_COMP_VERSION_LEN];
  240. _mav_put_uint16_t(buf, 0, comp_id);
  241. _mav_put_uint8_t_array(buf, 2, hw_ver, 16);
  242. _mav_put_uint8_t_array(buf, 18, fw_ver, 16);
  243. _mav_put_uint8_t_array(buf, 34, SN, 16);
  244. _mav_put_uint8_t_array(buf, 50, manufactory, 16);
  245. _mav_put_uint8_t_array(buf, 66, model, 16);
  246. _mav_put_uint8_t_array(buf, 82, priv_data, 16);
  247. _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_COMP_VERSION, buf, MAVLINK_MSG_ID_VK_COMP_VERSION_MIN_LEN, MAVLINK_MSG_ID_VK_COMP_VERSION_LEN, MAVLINK_MSG_ID_VK_COMP_VERSION_CRC);
  248. #else
  249. mavlink_vk_comp_version_t packet;
  250. packet.comp_id = comp_id;
  251. mav_array_memcpy(packet.hw_ver, hw_ver, sizeof(uint8_t)*16);
  252. mav_array_memcpy(packet.fw_ver, fw_ver, sizeof(uint8_t)*16);
  253. mav_array_memcpy(packet.SN, SN, sizeof(uint8_t)*16);
  254. mav_array_memcpy(packet.manufactory, manufactory, sizeof(uint8_t)*16);
  255. mav_array_memcpy(packet.model, model, sizeof(uint8_t)*16);
  256. mav_array_memcpy(packet.priv_data, priv_data, sizeof(uint8_t)*16);
  257. _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_COMP_VERSION, (const char *)&packet, MAVLINK_MSG_ID_VK_COMP_VERSION_MIN_LEN, MAVLINK_MSG_ID_VK_COMP_VERSION_LEN, MAVLINK_MSG_ID_VK_COMP_VERSION_CRC);
  258. #endif
  259. }
  260. /**
  261. * @brief Send a vk_comp_version message
  262. * @param chan MAVLink channel to send the message
  263. * @param struct The MAVLink struct to serialize
  264. */
  265. static inline void mavlink_msg_vk_comp_version_send_struct(mavlink_channel_t chan, const mavlink_vk_comp_version_t* vk_comp_version)
  266. {
  267. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  268. mavlink_msg_vk_comp_version_send(chan, vk_comp_version->comp_id, vk_comp_version->hw_ver, vk_comp_version->fw_ver, vk_comp_version->SN, vk_comp_version->manufactory, vk_comp_version->model, vk_comp_version->priv_data);
  269. #else
  270. _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_COMP_VERSION, (const char *)vk_comp_version, MAVLINK_MSG_ID_VK_COMP_VERSION_MIN_LEN, MAVLINK_MSG_ID_VK_COMP_VERSION_LEN, MAVLINK_MSG_ID_VK_COMP_VERSION_CRC);
  271. #endif
  272. }
  273. #if MAVLINK_MSG_ID_VK_COMP_VERSION_LEN <= MAVLINK_MAX_PAYLOAD_LEN
  274. /*
  275. This variant of _send() can be used to save stack space by re-using
  276. memory from the receive buffer. The caller provides a
  277. mavlink_message_t which is the size of a full mavlink message. This
  278. is usually the receive buffer for the channel, and allows a reply to an
  279. incoming message with minimum stack space usage.
  280. */
  281. static inline void mavlink_msg_vk_comp_version_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint16_t comp_id, const uint8_t *hw_ver, const uint8_t *fw_ver, const uint8_t *SN, const uint8_t *manufactory, const uint8_t *model, const uint8_t *priv_data)
  282. {
  283. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  284. char *buf = (char *)msgbuf;
  285. _mav_put_uint16_t(buf, 0, comp_id);
  286. _mav_put_uint8_t_array(buf, 2, hw_ver, 16);
  287. _mav_put_uint8_t_array(buf, 18, fw_ver, 16);
  288. _mav_put_uint8_t_array(buf, 34, SN, 16);
  289. _mav_put_uint8_t_array(buf, 50, manufactory, 16);
  290. _mav_put_uint8_t_array(buf, 66, model, 16);
  291. _mav_put_uint8_t_array(buf, 82, priv_data, 16);
  292. _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_COMP_VERSION, buf, MAVLINK_MSG_ID_VK_COMP_VERSION_MIN_LEN, MAVLINK_MSG_ID_VK_COMP_VERSION_LEN, MAVLINK_MSG_ID_VK_COMP_VERSION_CRC);
  293. #else
  294. mavlink_vk_comp_version_t *packet = (mavlink_vk_comp_version_t *)msgbuf;
  295. packet->comp_id = comp_id;
  296. mav_array_memcpy(packet->hw_ver, hw_ver, sizeof(uint8_t)*16);
  297. mav_array_memcpy(packet->fw_ver, fw_ver, sizeof(uint8_t)*16);
  298. mav_array_memcpy(packet->SN, SN, sizeof(uint8_t)*16);
  299. mav_array_memcpy(packet->manufactory, manufactory, sizeof(uint8_t)*16);
  300. mav_array_memcpy(packet->model, model, sizeof(uint8_t)*16);
  301. mav_array_memcpy(packet->priv_data, priv_data, sizeof(uint8_t)*16);
  302. _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_VK_COMP_VERSION, (const char *)packet, MAVLINK_MSG_ID_VK_COMP_VERSION_MIN_LEN, MAVLINK_MSG_ID_VK_COMP_VERSION_LEN, MAVLINK_MSG_ID_VK_COMP_VERSION_CRC);
  303. #endif
  304. }
  305. #endif
  306. #endif
  307. // MESSAGE VK_COMP_VERSION UNPACKING
  308. /**
  309. * @brief Get field comp_id from vk_comp_version message
  310. *
  311. * @return component id
  312. */
  313. static inline uint16_t mavlink_msg_vk_comp_version_get_comp_id(const mavlink_message_t* msg)
  314. {
  315. return _MAV_RETURN_uint16_t(msg, 0);
  316. }
  317. /**
  318. * @brief Get field hw_ver from vk_comp_version message
  319. *
  320. * @return hardware version
  321. */
  322. static inline uint16_t mavlink_msg_vk_comp_version_get_hw_ver(const mavlink_message_t* msg, uint8_t *hw_ver)
  323. {
  324. return _MAV_RETURN_uint8_t_array(msg, hw_ver, 16, 2);
  325. }
  326. /**
  327. * @brief Get field fw_ver from vk_comp_version message
  328. *
  329. * @return firmware version
  330. */
  331. static inline uint16_t mavlink_msg_vk_comp_version_get_fw_ver(const mavlink_message_t* msg, uint8_t *fw_ver)
  332. {
  333. return _MAV_RETURN_uint8_t_array(msg, fw_ver, 16, 18);
  334. }
  335. /**
  336. * @brief Get field SN from vk_comp_version message
  337. *
  338. * @return SN number
  339. */
  340. static inline uint16_t mavlink_msg_vk_comp_version_get_SN(const mavlink_message_t* msg, uint8_t *SN)
  341. {
  342. return _MAV_RETURN_uint8_t_array(msg, SN, 16, 34);
  343. }
  344. /**
  345. * @brief Get field manufactory from vk_comp_version message
  346. *
  347. * @return manufactory
  348. */
  349. static inline uint16_t mavlink_msg_vk_comp_version_get_manufactory(const mavlink_message_t* msg, uint8_t *manufactory)
  350. {
  351. return _MAV_RETURN_uint8_t_array(msg, manufactory, 16, 50);
  352. }
  353. /**
  354. * @brief Get field model from vk_comp_version message
  355. *
  356. * @return model
  357. */
  358. static inline uint16_t mavlink_msg_vk_comp_version_get_model(const mavlink_message_t* msg, uint8_t *model)
  359. {
  360. return _MAV_RETURN_uint8_t_array(msg, model, 16, 66);
  361. }
  362. /**
  363. * @brief Get field priv_data from vk_comp_version message
  364. *
  365. * @return gnss configuration
  366. */
  367. static inline uint16_t mavlink_msg_vk_comp_version_get_priv_data(const mavlink_message_t* msg, uint8_t *priv_data)
  368. {
  369. return _MAV_RETURN_uint8_t_array(msg, priv_data, 16, 82);
  370. }
  371. /**
  372. * @brief Decode a vk_comp_version message into a struct
  373. *
  374. * @param msg The message to decode
  375. * @param vk_comp_version C-struct to decode the message contents into
  376. */
  377. static inline void mavlink_msg_vk_comp_version_decode(const mavlink_message_t* msg, mavlink_vk_comp_version_t* vk_comp_version)
  378. {
  379. #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
  380. vk_comp_version->comp_id = mavlink_msg_vk_comp_version_get_comp_id(msg);
  381. mavlink_msg_vk_comp_version_get_hw_ver(msg, vk_comp_version->hw_ver);
  382. mavlink_msg_vk_comp_version_get_fw_ver(msg, vk_comp_version->fw_ver);
  383. mavlink_msg_vk_comp_version_get_SN(msg, vk_comp_version->SN);
  384. mavlink_msg_vk_comp_version_get_manufactory(msg, vk_comp_version->manufactory);
  385. mavlink_msg_vk_comp_version_get_model(msg, vk_comp_version->model);
  386. mavlink_msg_vk_comp_version_get_priv_data(msg, vk_comp_version->priv_data);
  387. #else
  388. uint8_t len = msg->len < MAVLINK_MSG_ID_VK_COMP_VERSION_LEN? msg->len : MAVLINK_MSG_ID_VK_COMP_VERSION_LEN;
  389. memset(vk_comp_version, 0, MAVLINK_MSG_ID_VK_COMP_VERSION_LEN);
  390. memcpy(vk_comp_version, _MAV_PAYLOAD(msg), len);
  391. #endif
  392. }