Merge pull request #10476 from radiolinkW/RADIOLINKF722
[inav.git] / lib / main / MAVLink / common / mavlink_msg_uavcan_node_info.h
bloba042c5c4e5f1d75ffc771534a79cbe7a9b12d5d0
1 #pragma once
2 // MESSAGE UAVCAN_NODE_INFO PACKING
4 #define MAVLINK_MSG_ID_UAVCAN_NODE_INFO 311
7 typedef struct __mavlink_uavcan_node_info_t {
8 uint64_t time_usec; /*< [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number.*/
9 uint32_t uptime_sec; /*< [s] Time since the start-up of the node.*/
10 uint32_t sw_vcs_commit; /*< Version control system (VCS) revision identifier (e.g. git short commit hash). Zero if unknown.*/
11 char name[80]; /*< Node name string. For example, "sapog.px4.io".*/
12 uint8_t hw_version_major; /*< Hardware major version number.*/
13 uint8_t hw_version_minor; /*< Hardware minor version number.*/
14 uint8_t hw_unique_id[16]; /*< Hardware unique 128-bit ID.*/
15 uint8_t sw_version_major; /*< Software major version number.*/
16 uint8_t sw_version_minor; /*< Software minor version number.*/
17 } mavlink_uavcan_node_info_t;
19 #define MAVLINK_MSG_ID_UAVCAN_NODE_INFO_LEN 116
20 #define MAVLINK_MSG_ID_UAVCAN_NODE_INFO_MIN_LEN 116
21 #define MAVLINK_MSG_ID_311_LEN 116
22 #define MAVLINK_MSG_ID_311_MIN_LEN 116
24 #define MAVLINK_MSG_ID_UAVCAN_NODE_INFO_CRC 95
25 #define MAVLINK_MSG_ID_311_CRC 95
27 #define MAVLINK_MSG_UAVCAN_NODE_INFO_FIELD_NAME_LEN 80
28 #define MAVLINK_MSG_UAVCAN_NODE_INFO_FIELD_HW_UNIQUE_ID_LEN 16
30 #if MAVLINK_COMMAND_24BIT
31 #define MAVLINK_MESSAGE_INFO_UAVCAN_NODE_INFO { \
32 311, \
33 "UAVCAN_NODE_INFO", \
34 9, \
35 { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_uavcan_node_info_t, time_usec) }, \
36 { "uptime_sec", NULL, MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_uavcan_node_info_t, uptime_sec) }, \
37 { "name", NULL, MAVLINK_TYPE_CHAR, 80, 16, offsetof(mavlink_uavcan_node_info_t, name) }, \
38 { "hw_version_major", NULL, MAVLINK_TYPE_UINT8_T, 0, 96, offsetof(mavlink_uavcan_node_info_t, hw_version_major) }, \
39 { "hw_version_minor", NULL, MAVLINK_TYPE_UINT8_T, 0, 97, offsetof(mavlink_uavcan_node_info_t, hw_version_minor) }, \
40 { "hw_unique_id", NULL, MAVLINK_TYPE_UINT8_T, 16, 98, offsetof(mavlink_uavcan_node_info_t, hw_unique_id) }, \
41 { "sw_version_major", NULL, MAVLINK_TYPE_UINT8_T, 0, 114, offsetof(mavlink_uavcan_node_info_t, sw_version_major) }, \
42 { "sw_version_minor", NULL, MAVLINK_TYPE_UINT8_T, 0, 115, offsetof(mavlink_uavcan_node_info_t, sw_version_minor) }, \
43 { "sw_vcs_commit", NULL, MAVLINK_TYPE_UINT32_T, 0, 12, offsetof(mavlink_uavcan_node_info_t, sw_vcs_commit) }, \
44 } \
46 #else
47 #define MAVLINK_MESSAGE_INFO_UAVCAN_NODE_INFO { \
48 "UAVCAN_NODE_INFO", \
49 9, \
50 { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_uavcan_node_info_t, time_usec) }, \
51 { "uptime_sec", NULL, MAVLINK_TYPE_UINT32_T, 0, 8, offsetof(mavlink_uavcan_node_info_t, uptime_sec) }, \
52 { "name", NULL, MAVLINK_TYPE_CHAR, 80, 16, offsetof(mavlink_uavcan_node_info_t, name) }, \
53 { "hw_version_major", NULL, MAVLINK_TYPE_UINT8_T, 0, 96, offsetof(mavlink_uavcan_node_info_t, hw_version_major) }, \
54 { "hw_version_minor", NULL, MAVLINK_TYPE_UINT8_T, 0, 97, offsetof(mavlink_uavcan_node_info_t, hw_version_minor) }, \
55 { "hw_unique_id", NULL, MAVLINK_TYPE_UINT8_T, 16, 98, offsetof(mavlink_uavcan_node_info_t, hw_unique_id) }, \
56 { "sw_version_major", NULL, MAVLINK_TYPE_UINT8_T, 0, 114, offsetof(mavlink_uavcan_node_info_t, sw_version_major) }, \
57 { "sw_version_minor", NULL, MAVLINK_TYPE_UINT8_T, 0, 115, offsetof(mavlink_uavcan_node_info_t, sw_version_minor) }, \
58 { "sw_vcs_commit", NULL, MAVLINK_TYPE_UINT32_T, 0, 12, offsetof(mavlink_uavcan_node_info_t, sw_vcs_commit) }, \
59 } \
61 #endif
63 /**
64 * @brief Pack a uavcan_node_info message
65 * @param system_id ID of this system
66 * @param component_id ID of this component (e.g. 200 for IMU)
67 * @param msg The MAVLink message to compress the data into
69 * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number.
70 * @param uptime_sec [s] Time since the start-up of the node.
71 * @param name Node name string. For example, "sapog.px4.io".
72 * @param hw_version_major Hardware major version number.
73 * @param hw_version_minor Hardware minor version number.
74 * @param hw_unique_id Hardware unique 128-bit ID.
75 * @param sw_version_major Software major version number.
76 * @param sw_version_minor Software minor version number.
77 * @param sw_vcs_commit Version control system (VCS) revision identifier (e.g. git short commit hash). Zero if unknown.
78 * @return length of the message in bytes (excluding serial stream start sign)
80 static inline uint16_t mavlink_msg_uavcan_node_info_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
81 uint64_t time_usec, uint32_t uptime_sec, const char *name, uint8_t hw_version_major, uint8_t hw_version_minor, const uint8_t *hw_unique_id, uint8_t sw_version_major, uint8_t sw_version_minor, uint32_t sw_vcs_commit)
83 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
84 char buf[MAVLINK_MSG_ID_UAVCAN_NODE_INFO_LEN];
85 _mav_put_uint64_t(buf, 0, time_usec);
86 _mav_put_uint32_t(buf, 8, uptime_sec);
87 _mav_put_uint32_t(buf, 12, sw_vcs_commit);
88 _mav_put_uint8_t(buf, 96, hw_version_major);
89 _mav_put_uint8_t(buf, 97, hw_version_minor);
90 _mav_put_uint8_t(buf, 114, sw_version_major);
91 _mav_put_uint8_t(buf, 115, sw_version_minor);
92 _mav_put_char_array(buf, 16, name, 80);
93 _mav_put_uint8_t_array(buf, 98, hw_unique_id, 16);
94 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_LEN);
95 #else
96 mavlink_uavcan_node_info_t packet;
97 packet.time_usec = time_usec;
98 packet.uptime_sec = uptime_sec;
99 packet.sw_vcs_commit = sw_vcs_commit;
100 packet.hw_version_major = hw_version_major;
101 packet.hw_version_minor = hw_version_minor;
102 packet.sw_version_major = sw_version_major;
103 packet.sw_version_minor = sw_version_minor;
104 mav_array_memcpy(packet.name, name, sizeof(char)*80);
105 mav_array_memcpy(packet.hw_unique_id, hw_unique_id, sizeof(uint8_t)*16);
106 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_LEN);
107 #endif
109 msg->msgid = MAVLINK_MSG_ID_UAVCAN_NODE_INFO;
110 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_MIN_LEN, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_LEN, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_CRC);
114 * @brief Pack a uavcan_node_info message on a channel
115 * @param system_id ID of this system
116 * @param component_id ID of this component (e.g. 200 for IMU)
117 * @param chan The MAVLink channel this message will be sent over
118 * @param msg The MAVLink message to compress the data into
119 * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number.
120 * @param uptime_sec [s] Time since the start-up of the node.
121 * @param name Node name string. For example, "sapog.px4.io".
122 * @param hw_version_major Hardware major version number.
123 * @param hw_version_minor Hardware minor version number.
124 * @param hw_unique_id Hardware unique 128-bit ID.
125 * @param sw_version_major Software major version number.
126 * @param sw_version_minor Software minor version number.
127 * @param sw_vcs_commit Version control system (VCS) revision identifier (e.g. git short commit hash). Zero if unknown.
128 * @return length of the message in bytes (excluding serial stream start sign)
130 static inline uint16_t mavlink_msg_uavcan_node_info_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
131 mavlink_message_t* msg,
132 uint64_t time_usec,uint32_t uptime_sec,const char *name,uint8_t hw_version_major,uint8_t hw_version_minor,const uint8_t *hw_unique_id,uint8_t sw_version_major,uint8_t sw_version_minor,uint32_t sw_vcs_commit)
134 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
135 char buf[MAVLINK_MSG_ID_UAVCAN_NODE_INFO_LEN];
136 _mav_put_uint64_t(buf, 0, time_usec);
137 _mav_put_uint32_t(buf, 8, uptime_sec);
138 _mav_put_uint32_t(buf, 12, sw_vcs_commit);
139 _mav_put_uint8_t(buf, 96, hw_version_major);
140 _mav_put_uint8_t(buf, 97, hw_version_minor);
141 _mav_put_uint8_t(buf, 114, sw_version_major);
142 _mav_put_uint8_t(buf, 115, sw_version_minor);
143 _mav_put_char_array(buf, 16, name, 80);
144 _mav_put_uint8_t_array(buf, 98, hw_unique_id, 16);
145 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_LEN);
146 #else
147 mavlink_uavcan_node_info_t packet;
148 packet.time_usec = time_usec;
149 packet.uptime_sec = uptime_sec;
150 packet.sw_vcs_commit = sw_vcs_commit;
151 packet.hw_version_major = hw_version_major;
152 packet.hw_version_minor = hw_version_minor;
153 packet.sw_version_major = sw_version_major;
154 packet.sw_version_minor = sw_version_minor;
155 mav_array_memcpy(packet.name, name, sizeof(char)*80);
156 mav_array_memcpy(packet.hw_unique_id, hw_unique_id, sizeof(uint8_t)*16);
157 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_LEN);
158 #endif
160 msg->msgid = MAVLINK_MSG_ID_UAVCAN_NODE_INFO;
161 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_MIN_LEN, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_LEN, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_CRC);
165 * @brief Encode a uavcan_node_info struct
167 * @param system_id ID of this system
168 * @param component_id ID of this component (e.g. 200 for IMU)
169 * @param msg The MAVLink message to compress the data into
170 * @param uavcan_node_info C-struct to read the message contents from
172 static inline uint16_t mavlink_msg_uavcan_node_info_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_uavcan_node_info_t* uavcan_node_info)
174 return mavlink_msg_uavcan_node_info_pack(system_id, component_id, msg, uavcan_node_info->time_usec, uavcan_node_info->uptime_sec, uavcan_node_info->name, uavcan_node_info->hw_version_major, uavcan_node_info->hw_version_minor, uavcan_node_info->hw_unique_id, uavcan_node_info->sw_version_major, uavcan_node_info->sw_version_minor, uavcan_node_info->sw_vcs_commit);
178 * @brief Encode a uavcan_node_info struct on a channel
180 * @param system_id ID of this system
181 * @param component_id ID of this component (e.g. 200 for IMU)
182 * @param chan The MAVLink channel this message will be sent over
183 * @param msg The MAVLink message to compress the data into
184 * @param uavcan_node_info C-struct to read the message contents from
186 static inline uint16_t mavlink_msg_uavcan_node_info_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_uavcan_node_info_t* uavcan_node_info)
188 return mavlink_msg_uavcan_node_info_pack_chan(system_id, component_id, chan, msg, uavcan_node_info->time_usec, uavcan_node_info->uptime_sec, uavcan_node_info->name, uavcan_node_info->hw_version_major, uavcan_node_info->hw_version_minor, uavcan_node_info->hw_unique_id, uavcan_node_info->sw_version_major, uavcan_node_info->sw_version_minor, uavcan_node_info->sw_vcs_commit);
192 * @brief Send a uavcan_node_info message
193 * @param chan MAVLink channel to send the message
195 * @param time_usec [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number.
196 * @param uptime_sec [s] Time since the start-up of the node.
197 * @param name Node name string. For example, "sapog.px4.io".
198 * @param hw_version_major Hardware major version number.
199 * @param hw_version_minor Hardware minor version number.
200 * @param hw_unique_id Hardware unique 128-bit ID.
201 * @param sw_version_major Software major version number.
202 * @param sw_version_minor Software minor version number.
203 * @param sw_vcs_commit Version control system (VCS) revision identifier (e.g. git short commit hash). Zero if unknown.
205 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
207 static inline void mavlink_msg_uavcan_node_info_send(mavlink_channel_t chan, uint64_t time_usec, uint32_t uptime_sec, const char *name, uint8_t hw_version_major, uint8_t hw_version_minor, const uint8_t *hw_unique_id, uint8_t sw_version_major, uint8_t sw_version_minor, uint32_t sw_vcs_commit)
209 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
210 char buf[MAVLINK_MSG_ID_UAVCAN_NODE_INFO_LEN];
211 _mav_put_uint64_t(buf, 0, time_usec);
212 _mav_put_uint32_t(buf, 8, uptime_sec);
213 _mav_put_uint32_t(buf, 12, sw_vcs_commit);
214 _mav_put_uint8_t(buf, 96, hw_version_major);
215 _mav_put_uint8_t(buf, 97, hw_version_minor);
216 _mav_put_uint8_t(buf, 114, sw_version_major);
217 _mav_put_uint8_t(buf, 115, sw_version_minor);
218 _mav_put_char_array(buf, 16, name, 80);
219 _mav_put_uint8_t_array(buf, 98, hw_unique_id, 16);
220 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_UAVCAN_NODE_INFO, buf, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_MIN_LEN, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_LEN, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_CRC);
221 #else
222 mavlink_uavcan_node_info_t packet;
223 packet.time_usec = time_usec;
224 packet.uptime_sec = uptime_sec;
225 packet.sw_vcs_commit = sw_vcs_commit;
226 packet.hw_version_major = hw_version_major;
227 packet.hw_version_minor = hw_version_minor;
228 packet.sw_version_major = sw_version_major;
229 packet.sw_version_minor = sw_version_minor;
230 mav_array_memcpy(packet.name, name, sizeof(char)*80);
231 mav_array_memcpy(packet.hw_unique_id, hw_unique_id, sizeof(uint8_t)*16);
232 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_UAVCAN_NODE_INFO, (const char *)&packet, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_MIN_LEN, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_LEN, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_CRC);
233 #endif
237 * @brief Send a uavcan_node_info message
238 * @param chan MAVLink channel to send the message
239 * @param struct The MAVLink struct to serialize
241 static inline void mavlink_msg_uavcan_node_info_send_struct(mavlink_channel_t chan, const mavlink_uavcan_node_info_t* uavcan_node_info)
243 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
244 mavlink_msg_uavcan_node_info_send(chan, uavcan_node_info->time_usec, uavcan_node_info->uptime_sec, uavcan_node_info->name, uavcan_node_info->hw_version_major, uavcan_node_info->hw_version_minor, uavcan_node_info->hw_unique_id, uavcan_node_info->sw_version_major, uavcan_node_info->sw_version_minor, uavcan_node_info->sw_vcs_commit);
245 #else
246 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_UAVCAN_NODE_INFO, (const char *)uavcan_node_info, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_MIN_LEN, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_LEN, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_CRC);
247 #endif
250 #if MAVLINK_MSG_ID_UAVCAN_NODE_INFO_LEN <= MAVLINK_MAX_PAYLOAD_LEN
252 This varient of _send() can be used to save stack space by re-using
253 memory from the receive buffer. The caller provides a
254 mavlink_message_t which is the size of a full mavlink message. This
255 is usually the receive buffer for the channel, and allows a reply to an
256 incoming message with minimum stack space usage.
258 static inline void mavlink_msg_uavcan_node_info_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_t time_usec, uint32_t uptime_sec, const char *name, uint8_t hw_version_major, uint8_t hw_version_minor, const uint8_t *hw_unique_id, uint8_t sw_version_major, uint8_t sw_version_minor, uint32_t sw_vcs_commit)
260 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
261 char *buf = (char *)msgbuf;
262 _mav_put_uint64_t(buf, 0, time_usec);
263 _mav_put_uint32_t(buf, 8, uptime_sec);
264 _mav_put_uint32_t(buf, 12, sw_vcs_commit);
265 _mav_put_uint8_t(buf, 96, hw_version_major);
266 _mav_put_uint8_t(buf, 97, hw_version_minor);
267 _mav_put_uint8_t(buf, 114, sw_version_major);
268 _mav_put_uint8_t(buf, 115, sw_version_minor);
269 _mav_put_char_array(buf, 16, name, 80);
270 _mav_put_uint8_t_array(buf, 98, hw_unique_id, 16);
271 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_UAVCAN_NODE_INFO, buf, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_MIN_LEN, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_LEN, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_CRC);
272 #else
273 mavlink_uavcan_node_info_t *packet = (mavlink_uavcan_node_info_t *)msgbuf;
274 packet->time_usec = time_usec;
275 packet->uptime_sec = uptime_sec;
276 packet->sw_vcs_commit = sw_vcs_commit;
277 packet->hw_version_major = hw_version_major;
278 packet->hw_version_minor = hw_version_minor;
279 packet->sw_version_major = sw_version_major;
280 packet->sw_version_minor = sw_version_minor;
281 mav_array_memcpy(packet->name, name, sizeof(char)*80);
282 mav_array_memcpy(packet->hw_unique_id, hw_unique_id, sizeof(uint8_t)*16);
283 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_UAVCAN_NODE_INFO, (const char *)packet, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_MIN_LEN, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_LEN, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_CRC);
284 #endif
286 #endif
288 #endif
290 // MESSAGE UAVCAN_NODE_INFO UNPACKING
294 * @brief Get field time_usec from uavcan_node_info message
296 * @return [us] Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number.
298 static inline uint64_t mavlink_msg_uavcan_node_info_get_time_usec(const mavlink_message_t* msg)
300 return _MAV_RETURN_uint64_t(msg, 0);
304 * @brief Get field uptime_sec from uavcan_node_info message
306 * @return [s] Time since the start-up of the node.
308 static inline uint32_t mavlink_msg_uavcan_node_info_get_uptime_sec(const mavlink_message_t* msg)
310 return _MAV_RETURN_uint32_t(msg, 8);
314 * @brief Get field name from uavcan_node_info message
316 * @return Node name string. For example, "sapog.px4.io".
318 static inline uint16_t mavlink_msg_uavcan_node_info_get_name(const mavlink_message_t* msg, char *name)
320 return _MAV_RETURN_char_array(msg, name, 80, 16);
324 * @brief Get field hw_version_major from uavcan_node_info message
326 * @return Hardware major version number.
328 static inline uint8_t mavlink_msg_uavcan_node_info_get_hw_version_major(const mavlink_message_t* msg)
330 return _MAV_RETURN_uint8_t(msg, 96);
334 * @brief Get field hw_version_minor from uavcan_node_info message
336 * @return Hardware minor version number.
338 static inline uint8_t mavlink_msg_uavcan_node_info_get_hw_version_minor(const mavlink_message_t* msg)
340 return _MAV_RETURN_uint8_t(msg, 97);
344 * @brief Get field hw_unique_id from uavcan_node_info message
346 * @return Hardware unique 128-bit ID.
348 static inline uint16_t mavlink_msg_uavcan_node_info_get_hw_unique_id(const mavlink_message_t* msg, uint8_t *hw_unique_id)
350 return _MAV_RETURN_uint8_t_array(msg, hw_unique_id, 16, 98);
354 * @brief Get field sw_version_major from uavcan_node_info message
356 * @return Software major version number.
358 static inline uint8_t mavlink_msg_uavcan_node_info_get_sw_version_major(const mavlink_message_t* msg)
360 return _MAV_RETURN_uint8_t(msg, 114);
364 * @brief Get field sw_version_minor from uavcan_node_info message
366 * @return Software minor version number.
368 static inline uint8_t mavlink_msg_uavcan_node_info_get_sw_version_minor(const mavlink_message_t* msg)
370 return _MAV_RETURN_uint8_t(msg, 115);
374 * @brief Get field sw_vcs_commit from uavcan_node_info message
376 * @return Version control system (VCS) revision identifier (e.g. git short commit hash). Zero if unknown.
378 static inline uint32_t mavlink_msg_uavcan_node_info_get_sw_vcs_commit(const mavlink_message_t* msg)
380 return _MAV_RETURN_uint32_t(msg, 12);
384 * @brief Decode a uavcan_node_info message into a struct
386 * @param msg The message to decode
387 * @param uavcan_node_info C-struct to decode the message contents into
389 static inline void mavlink_msg_uavcan_node_info_decode(const mavlink_message_t* msg, mavlink_uavcan_node_info_t* uavcan_node_info)
391 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
392 uavcan_node_info->time_usec = mavlink_msg_uavcan_node_info_get_time_usec(msg);
393 uavcan_node_info->uptime_sec = mavlink_msg_uavcan_node_info_get_uptime_sec(msg);
394 uavcan_node_info->sw_vcs_commit = mavlink_msg_uavcan_node_info_get_sw_vcs_commit(msg);
395 mavlink_msg_uavcan_node_info_get_name(msg, uavcan_node_info->name);
396 uavcan_node_info->hw_version_major = mavlink_msg_uavcan_node_info_get_hw_version_major(msg);
397 uavcan_node_info->hw_version_minor = mavlink_msg_uavcan_node_info_get_hw_version_minor(msg);
398 mavlink_msg_uavcan_node_info_get_hw_unique_id(msg, uavcan_node_info->hw_unique_id);
399 uavcan_node_info->sw_version_major = mavlink_msg_uavcan_node_info_get_sw_version_major(msg);
400 uavcan_node_info->sw_version_minor = mavlink_msg_uavcan_node_info_get_sw_version_minor(msg);
401 #else
402 uint8_t len = msg->len < MAVLINK_MSG_ID_UAVCAN_NODE_INFO_LEN? msg->len : MAVLINK_MSG_ID_UAVCAN_NODE_INFO_LEN;
403 memset(uavcan_node_info, 0, MAVLINK_MSG_ID_UAVCAN_NODE_INFO_LEN);
404 memcpy(uavcan_node_info, _MAV_PAYLOAD(msg), len);
405 #endif