3 #define MAVLINK_MSG_ID_AUTOPILOT_VERSION 148
12 #define MAVLINK_MSG_ID_AUTOPILOT_VERSION_LEN 20
13 #define MAVLINK_MSG_ID_148_LEN 20
15 #define MAVLINK_MSG_ID_AUTOPILOT_VERSION_CRC 49
16 #define MAVLINK_MSG_ID_148_CRC 49
18 #define MAVLINK_MSG_AUTOPILOT_VERSION_FIELD_CUSTOM_VERSION_LEN 8
20 #define MAVLINK_MESSAGE_INFO_AUTOPILOT_VERSION { \
21 "AUTOPILOT_VERSION", \
23 { { "capabilities", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_autopilot_version_t, capabilities) }, \
24 { "version", NULL, MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_autopilot_version_t, version) }, \
25 { "custom_version", NULL, MAVLINK_TYPE_UINT8_T, 8, 12, offsetof(mavlink_autopilot_version_t, custom_version) }, \
41 static inline uint16_t mavlink_msg_autopilot_version_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
42 uint64_t capabilities, uint32_t version,
const uint8_t *custom_version)
44 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
45 char buf[MAVLINK_MSG_ID_AUTOPILOT_VERSION_LEN];
46 _mav_put_uint64_t(buf, 0, capabilities);
47 _mav_put_uint32_t(buf, 8, version);
48 _mav_put_uint8_t_array(buf, 12, custom_version, 8);
49 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AUTOPILOT_VERSION_LEN);
54 mav_array_memcpy(packet.
custom_version, custom_version,
sizeof(uint8_t)*8);
55 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AUTOPILOT_VERSION_LEN);
58 msg->msgid = MAVLINK_MSG_ID_AUTOPILOT_VERSION;
60 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_AUTOPILOT_VERSION_LEN, MAVLINK_MSG_ID_AUTOPILOT_VERSION_CRC);
62 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_AUTOPILOT_VERSION_LEN);
77 static inline uint16_t mavlink_msg_autopilot_version_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
78 mavlink_message_t* msg,
79 uint64_t capabilities,uint32_t version,
const uint8_t *custom_version)
81 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
82 char buf[MAVLINK_MSG_ID_AUTOPILOT_VERSION_LEN];
83 _mav_put_uint64_t(buf, 0, capabilities);
84 _mav_put_uint32_t(buf, 8, version);
85 _mav_put_uint8_t_array(buf, 12, custom_version, 8);
86 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_AUTOPILOT_VERSION_LEN);
91 mav_array_memcpy(packet.
custom_version, custom_version,
sizeof(uint8_t)*8);
92 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AUTOPILOT_VERSION_LEN);
95 msg->msgid = MAVLINK_MSG_ID_AUTOPILOT_VERSION;
97 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_AUTOPILOT_VERSION_LEN, MAVLINK_MSG_ID_AUTOPILOT_VERSION_CRC);
99 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_AUTOPILOT_VERSION_LEN);
111 static inline uint16_t mavlink_msg_autopilot_version_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_autopilot_version_t* autopilot_version)
113 return mavlink_msg_autopilot_version_pack(system_id, component_id, msg, autopilot_version->
capabilities, autopilot_version->
version, autopilot_version->
custom_version);
125 static inline uint16_t mavlink_msg_autopilot_version_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_autopilot_version_t* autopilot_version)
127 return mavlink_msg_autopilot_version_pack_chan(system_id, component_id, chan, msg, autopilot_version->
capabilities, autopilot_version->
version, autopilot_version->
custom_version);
138 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
140 static inline void mavlink_msg_autopilot_version_send(mavlink_channel_t chan, uint64_t capabilities, uint32_t version,
const uint8_t *custom_version)
142 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
143 char buf[MAVLINK_MSG_ID_AUTOPILOT_VERSION_LEN];
144 _mav_put_uint64_t(buf, 0, capabilities);
145 _mav_put_uint32_t(buf, 8, version);
146 _mav_put_uint8_t_array(buf, 12, custom_version, 8);
147 #if MAVLINK_CRC_EXTRA
148 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AUTOPILOT_VERSION, buf, MAVLINK_MSG_ID_AUTOPILOT_VERSION_LEN, MAVLINK_MSG_ID_AUTOPILOT_VERSION_CRC);
150 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AUTOPILOT_VERSION, buf, MAVLINK_MSG_ID_AUTOPILOT_VERSION_LEN);
156 mav_array_memcpy(packet.
custom_version, custom_version,
sizeof(uint8_t)*8);
157 #if MAVLINK_CRC_EXTRA
158 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AUTOPILOT_VERSION, (
const char *)&packet, MAVLINK_MSG_ID_AUTOPILOT_VERSION_LEN, MAVLINK_MSG_ID_AUTOPILOT_VERSION_CRC);
160 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AUTOPILOT_VERSION, (
const char *)&packet, MAVLINK_MSG_ID_AUTOPILOT_VERSION_LEN);
165 #if MAVLINK_MSG_ID_AUTOPILOT_VERSION_LEN <= MAVLINK_MAX_PAYLOAD_LEN
173 static inline void mavlink_msg_autopilot_version_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_t capabilities, uint32_t version,
const uint8_t *custom_version)
175 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
176 char *buf = (
char *)msgbuf;
177 _mav_put_uint64_t(buf, 0, capabilities);
178 _mav_put_uint32_t(buf, 8, version);
179 _mav_put_uint8_t_array(buf, 12, custom_version, 8);
180 #if MAVLINK_CRC_EXTRA
181 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AUTOPILOT_VERSION, buf, MAVLINK_MSG_ID_AUTOPILOT_VERSION_LEN, MAVLINK_MSG_ID_AUTOPILOT_VERSION_CRC);
183 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AUTOPILOT_VERSION, buf, MAVLINK_MSG_ID_AUTOPILOT_VERSION_LEN);
189 mav_array_memcpy(packet->
custom_version, custom_version,
sizeof(uint8_t)*8);
190 #if MAVLINK_CRC_EXTRA
191 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AUTOPILOT_VERSION, (
const char *)packet, MAVLINK_MSG_ID_AUTOPILOT_VERSION_LEN, MAVLINK_MSG_ID_AUTOPILOT_VERSION_CRC);
193 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AUTOPILOT_VERSION, (
const char *)packet, MAVLINK_MSG_ID_AUTOPILOT_VERSION_LEN);
209 static inline uint64_t mavlink_msg_autopilot_version_get_capabilities(
const mavlink_message_t* msg)
211 return _MAV_RETURN_uint64_t(msg, 0);
219 static inline uint32_t mavlink_msg_autopilot_version_get_version(
const mavlink_message_t* msg)
221 return _MAV_RETURN_uint32_t(msg, 8);
229 static inline uint16_t mavlink_msg_autopilot_version_get_custom_version(
const mavlink_message_t* msg, uint8_t *custom_version)
231 return _MAV_RETURN_uint8_t_array(msg, custom_version, 8, 12);
240 static inline void mavlink_msg_autopilot_version_decode(
const mavlink_message_t* msg,
mavlink_autopilot_version_t* autopilot_version)
242 #if MAVLINK_NEED_BYTE_SWAP
243 autopilot_version->
capabilities = mavlink_msg_autopilot_version_get_capabilities(msg);
244 autopilot_version->
version = mavlink_msg_autopilot_version_get_version(msg);
245 mavlink_msg_autopilot_version_get_custom_version(msg, autopilot_version->
custom_version);
247 memcpy(autopilot_version, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_AUTOPILOT_VERSION_LEN);
uint8_t custom_version[8]
Custom version field, commonly the first 8 bytes (16 characters) of the git hash. This is not an uniq...
Definition: mavlink_msg_autopilot_version.h:9
Definition: mavlink_msg_autopilot_version.h:5
uint32_t version
Firmware version number.
Definition: mavlink_msg_autopilot_version.h:8
uint64_t capabilities
bitmask of capabilities (see MAV_PROTOCOL_CAPABILITY enum)
Definition: mavlink_msg_autopilot_version.h:7