Arduino Mavlink
Loading...
Searching...
No Matches
mavlink_msg_isbd_link_status.h
Go to the documentation of this file.
1#pragma once
2// MESSAGE ISBD_LINK_STATUS PACKING
3
4#define MAVLINK_MSG_ID_ISBD_LINK_STATUS 335
5
6
8 uint64_t timestamp; /*< [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 uint64_t last_heartbeat; /*< [us] Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number.*/
10 uint16_t failed_sessions; /*< Number of failed SBD sessions.*/
11 uint16_t successful_sessions; /*< Number of successful SBD sessions.*/
12 uint8_t signal_quality; /*< Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength.*/
13 uint8_t ring_pending; /*< 1: Ring call pending, 0: No call pending.*/
14 uint8_t tx_session_pending; /*< 1: Transmission session pending, 0: No transmission session pending.*/
15 uint8_t rx_session_pending; /*< 1: Receiving session pending, 0: No receiving session pending.*/
16} mavlink_isbd_link_status_t;
17
18#define MAVLINK_MSG_ID_ISBD_LINK_STATUS_LEN 24
19#define MAVLINK_MSG_ID_ISBD_LINK_STATUS_MIN_LEN 24
20#define MAVLINK_MSG_ID_335_LEN 24
21#define MAVLINK_MSG_ID_335_MIN_LEN 24
22
23#define MAVLINK_MSG_ID_ISBD_LINK_STATUS_CRC 225
24#define MAVLINK_MSG_ID_335_CRC 225
25
26
27
28#if MAVLINK_COMMAND_24BIT
29#define MAVLINK_MESSAGE_INFO_ISBD_LINK_STATUS {
30 335,
31 "ISBD_LINK_STATUS",
32 8,
33 { { "timestamp", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_isbd_link_status_t, timestamp) },
34 { "last_heartbeat", NULL, MAVLINK_TYPE_UINT64_T, 0, 8, offsetof(mavlink_isbd_link_status_t, last_heartbeat) },
35 { "failed_sessions", NULL, MAVLINK_TYPE_UINT16_T, 0, 16, offsetof(mavlink_isbd_link_status_t, failed_sessions) },
36 { "successful_sessions", NULL, MAVLINK_TYPE_UINT16_T, 0, 18, offsetof(mavlink_isbd_link_status_t, successful_sessions) },
37 { "signal_quality", NULL, MAVLINK_TYPE_UINT8_T, 0, 20, offsetof(mavlink_isbd_link_status_t, signal_quality) },
38 { "ring_pending", NULL, MAVLINK_TYPE_UINT8_T, 0, 21, offsetof(mavlink_isbd_link_status_t, ring_pending) },
39 { "tx_session_pending", NULL, MAVLINK_TYPE_UINT8_T, 0, 22, offsetof(mavlink_isbd_link_status_t, tx_session_pending) },
40 { "rx_session_pending", NULL, MAVLINK_TYPE_UINT8_T, 0, 23, offsetof(mavlink_isbd_link_status_t, rx_session_pending) },
41 } \
42}
43#else
44#define MAVLINK_MESSAGE_INFO_ISBD_LINK_STATUS {
45 "ISBD_LINK_STATUS",
46 8,
47 { { "timestamp", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_isbd_link_status_t, timestamp) },
48 { "last_heartbeat", NULL, MAVLINK_TYPE_UINT64_T, 0, 8, offsetof(mavlink_isbd_link_status_t, last_heartbeat) },
49 { "failed_sessions", NULL, MAVLINK_TYPE_UINT16_T, 0, 16, offsetof(mavlink_isbd_link_status_t, failed_sessions) },
50 { "successful_sessions", NULL, MAVLINK_TYPE_UINT16_T, 0, 18, offsetof(mavlink_isbd_link_status_t, successful_sessions) },
51 { "signal_quality", NULL, MAVLINK_TYPE_UINT8_T, 0, 20, offsetof(mavlink_isbd_link_status_t, signal_quality) },
52 { "ring_pending", NULL, MAVLINK_TYPE_UINT8_T, 0, 21, offsetof(mavlink_isbd_link_status_t, ring_pending) },
53 { "tx_session_pending", NULL, MAVLINK_TYPE_UINT8_T, 0, 22, offsetof(mavlink_isbd_link_status_t, tx_session_pending) },
54 { "rx_session_pending", NULL, MAVLINK_TYPE_UINT8_T, 0, 23, offsetof(mavlink_isbd_link_status_t, rx_session_pending) },
55 } \
56}
57#endif
58
59/**
60 * @brief Pack a isbd_link_status message
61 * @param system_id ID of this system
62 * @param component_id ID of this component (e.g. 200 for IMU)
63 * @param msg The MAVLink message to compress the data into
64 *
65 * @param timestamp [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.
66 * @param last_heartbeat [us] Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number.
67 * @param failed_sessions Number of failed SBD sessions.
68 * @param successful_sessions Number of successful SBD sessions.
69 * @param signal_quality Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength.
70 * @param ring_pending 1: Ring call pending, 0: No call pending.
71 * @param tx_session_pending 1: Transmission session pending, 0: No transmission session pending.
72 * @param rx_session_pending 1: Receiving session pending, 0: No receiving session pending.
73 * @return length of the message in bytes (excluding serial stream start sign)
74 */
75static inline uint16_t mavlink_msg_isbd_link_status_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
76 uint64_t timestamp, uint64_t last_heartbeat, uint16_t failed_sessions, uint16_t successful_sessions, uint8_t signal_quality, uint8_t ring_pending, uint8_t tx_session_pending, uint8_t rx_session_pending)
77{
78#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
80 _mav_put_uint64_t(buf, 0, timestamp);
81 _mav_put_uint64_t(buf, 8, last_heartbeat);
82 _mav_put_uint16_t(buf, 16, failed_sessions);
83 _mav_put_uint16_t(buf, 18, successful_sessions);
84 _mav_put_uint8_t(buf, 20, signal_quality);
85 _mav_put_uint8_t(buf, 21, ring_pending);
86 _mav_put_uint8_t(buf, 22, tx_session_pending);
87 _mav_put_uint8_t(buf, 23, rx_session_pending);
88
89 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ISBD_LINK_STATUS_LEN);
90#else
91 mavlink_isbd_link_status_t packet;
92 packet.timestamp = timestamp;
93 packet.last_heartbeat = last_heartbeat;
94 packet.failed_sessions = failed_sessions;
95 packet.successful_sessions = successful_sessions;
96 packet.signal_quality = signal_quality;
97 packet.ring_pending = ring_pending;
98 packet.tx_session_pending = tx_session_pending;
99 packet.rx_session_pending = rx_session_pending;
100
101 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ISBD_LINK_STATUS_LEN);
102#endif
103
105 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_ISBD_LINK_STATUS_MIN_LEN, MAVLINK_MSG_ID_ISBD_LINK_STATUS_LEN, MAVLINK_MSG_ID_ISBD_LINK_STATUS_CRC);
106}
107
108/**
109 * @brief Pack a isbd_link_status message
110 * @param system_id ID of this system
111 * @param component_id ID of this component (e.g. 200 for IMU)
112 * @param status MAVLink status structure
113 * @param msg The MAVLink message to compress the data into
114 *
115 * @param timestamp [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.
116 * @param last_heartbeat [us] Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number.
117 * @param failed_sessions Number of failed SBD sessions.
118 * @param successful_sessions Number of successful SBD sessions.
119 * @param signal_quality Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength.
120 * @param ring_pending 1: Ring call pending, 0: No call pending.
121 * @param tx_session_pending 1: Transmission session pending, 0: No transmission session pending.
122 * @param rx_session_pending 1: Receiving session pending, 0: No receiving session pending.
123 * @return length of the message in bytes (excluding serial stream start sign)
124 */
125static inline uint16_t mavlink_msg_isbd_link_status_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
126 uint64_t timestamp, uint64_t last_heartbeat, uint16_t failed_sessions, uint16_t successful_sessions, uint8_t signal_quality, uint8_t ring_pending, uint8_t tx_session_pending, uint8_t rx_session_pending)
127{
128#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
130 _mav_put_uint64_t(buf, 0, timestamp);
131 _mav_put_uint64_t(buf, 8, last_heartbeat);
132 _mav_put_uint16_t(buf, 16, failed_sessions);
133 _mav_put_uint16_t(buf, 18, successful_sessions);
134 _mav_put_uint8_t(buf, 20, signal_quality);
135 _mav_put_uint8_t(buf, 21, ring_pending);
136 _mav_put_uint8_t(buf, 22, tx_session_pending);
137 _mav_put_uint8_t(buf, 23, rx_session_pending);
138
139 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ISBD_LINK_STATUS_LEN);
140#else
141 mavlink_isbd_link_status_t packet;
142 packet.timestamp = timestamp;
143 packet.last_heartbeat = last_heartbeat;
144 packet.failed_sessions = failed_sessions;
145 packet.successful_sessions = successful_sessions;
146 packet.signal_quality = signal_quality;
147 packet.ring_pending = ring_pending;
148 packet.tx_session_pending = tx_session_pending;
149 packet.rx_session_pending = rx_session_pending;
150
151 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ISBD_LINK_STATUS_LEN);
152#endif
153
155#if MAVLINK_CRC_EXTRA
156 return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ISBD_LINK_STATUS_MIN_LEN, MAVLINK_MSG_ID_ISBD_LINK_STATUS_LEN, MAVLINK_MSG_ID_ISBD_LINK_STATUS_CRC);
157#else
158 return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_ISBD_LINK_STATUS_MIN_LEN, MAVLINK_MSG_ID_ISBD_LINK_STATUS_LEN);
159#endif
160}
161
162/**
163 * @brief Pack a isbd_link_status message on a channel
164 * @param system_id ID of this system
165 * @param component_id ID of this component (e.g. 200 for IMU)
166 * @param chan The MAVLink channel this message will be sent over
167 * @param msg The MAVLink message to compress the data into
168 * @param timestamp [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.
169 * @param last_heartbeat [us] Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number.
170 * @param failed_sessions Number of failed SBD sessions.
171 * @param successful_sessions Number of successful SBD sessions.
172 * @param signal_quality Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength.
173 * @param ring_pending 1: Ring call pending, 0: No call pending.
174 * @param tx_session_pending 1: Transmission session pending, 0: No transmission session pending.
175 * @param rx_session_pending 1: Receiving session pending, 0: No receiving session pending.
176 * @return length of the message in bytes (excluding serial stream start sign)
177 */
178static inline uint16_t mavlink_msg_isbd_link_status_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
179 mavlink_message_t* msg,
180 uint64_t timestamp,uint64_t last_heartbeat,uint16_t failed_sessions,uint16_t successful_sessions,uint8_t signal_quality,uint8_t ring_pending,uint8_t tx_session_pending,uint8_t rx_session_pending)
181{
182#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
184 _mav_put_uint64_t(buf, 0, timestamp);
185 _mav_put_uint64_t(buf, 8, last_heartbeat);
186 _mav_put_uint16_t(buf, 16, failed_sessions);
187 _mav_put_uint16_t(buf, 18, successful_sessions);
188 _mav_put_uint8_t(buf, 20, signal_quality);
189 _mav_put_uint8_t(buf, 21, ring_pending);
190 _mav_put_uint8_t(buf, 22, tx_session_pending);
191 _mav_put_uint8_t(buf, 23, rx_session_pending);
192
193 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_ISBD_LINK_STATUS_LEN);
194#else
195 mavlink_isbd_link_status_t packet;
196 packet.timestamp = timestamp;
197 packet.last_heartbeat = last_heartbeat;
198 packet.failed_sessions = failed_sessions;
199 packet.successful_sessions = successful_sessions;
200 packet.signal_quality = signal_quality;
201 packet.ring_pending = ring_pending;
202 packet.tx_session_pending = tx_session_pending;
203 packet.rx_session_pending = rx_session_pending;
204
205 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_ISBD_LINK_STATUS_LEN);
206#endif
207
209 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_ISBD_LINK_STATUS_MIN_LEN, MAVLINK_MSG_ID_ISBD_LINK_STATUS_LEN, MAVLINK_MSG_ID_ISBD_LINK_STATUS_CRC);
210}
211
212/**
213 * @brief Encode a isbd_link_status struct
214 *
215 * @param system_id ID of this system
216 * @param component_id ID of this component (e.g. 200 for IMU)
217 * @param msg The MAVLink message to compress the data into
218 * @param isbd_link_status C-struct to read the message contents from
219 */
220static inline uint16_t mavlink_msg_isbd_link_status_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_isbd_link_status_t* isbd_link_status)
221{
222 return mavlink_msg_isbd_link_status_pack(system_id, component_id, msg, isbd_link_status->timestamp, isbd_link_status->last_heartbeat, isbd_link_status->failed_sessions, isbd_link_status->successful_sessions, isbd_link_status->signal_quality, isbd_link_status->ring_pending, isbd_link_status->tx_session_pending, isbd_link_status->rx_session_pending);
223}
224
225/**
226 * @brief Encode a isbd_link_status struct on a channel
227 *
228 * @param system_id ID of this system
229 * @param component_id ID of this component (e.g. 200 for IMU)
230 * @param chan The MAVLink channel this message will be sent over
231 * @param msg The MAVLink message to compress the data into
232 * @param isbd_link_status C-struct to read the message contents from
233 */
234static inline uint16_t mavlink_msg_isbd_link_status_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_isbd_link_status_t* isbd_link_status)
235{
236 return mavlink_msg_isbd_link_status_pack_chan(system_id, component_id, chan, msg, isbd_link_status->timestamp, isbd_link_status->last_heartbeat, isbd_link_status->failed_sessions, isbd_link_status->successful_sessions, isbd_link_status->signal_quality, isbd_link_status->ring_pending, isbd_link_status->tx_session_pending, isbd_link_status->rx_session_pending);
237}
238
239/**
240 * @brief Encode a isbd_link_status struct with provided status structure
241 *
242 * @param system_id ID of this system
243 * @param component_id ID of this component (e.g. 200 for IMU)
244 * @param status MAVLink status structure
245 * @param msg The MAVLink message to compress the data into
246 * @param isbd_link_status C-struct to read the message contents from
247 */
248static inline uint16_t mavlink_msg_isbd_link_status_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg, const mavlink_isbd_link_status_t* isbd_link_status)
249{
250 return mavlink_msg_isbd_link_status_pack_status(system_id, component_id, _status, msg, isbd_link_status->timestamp, isbd_link_status->last_heartbeat, isbd_link_status->failed_sessions, isbd_link_status->successful_sessions, isbd_link_status->signal_quality, isbd_link_status->ring_pending, isbd_link_status->tx_session_pending, isbd_link_status->rx_session_pending);
251}
252
253/**
254 * @brief Send a isbd_link_status message
255 * @param chan MAVLink channel to send the message
256 *
257 * @param timestamp [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.
258 * @param last_heartbeat [us] Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number.
259 * @param failed_sessions Number of failed SBD sessions.
260 * @param successful_sessions Number of successful SBD sessions.
261 * @param signal_quality Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength.
262 * @param ring_pending 1: Ring call pending, 0: No call pending.
263 * @param tx_session_pending 1: Transmission session pending, 0: No transmission session pending.
264 * @param rx_session_pending 1: Receiving session pending, 0: No receiving session pending.
265 */
266#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
267
268static inline void mavlink_msg_isbd_link_status_send(mavlink_channel_t chan, uint64_t timestamp, uint64_t last_heartbeat, uint16_t failed_sessions, uint16_t successful_sessions, uint8_t signal_quality, uint8_t ring_pending, uint8_t tx_session_pending, uint8_t rx_session_pending)
269{
270#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
271 char buf[MAVLINK_MSG_ID_ISBD_LINK_STATUS_LEN];
272 _mav_put_uint64_t(buf, 0, timestamp);
273 _mav_put_uint64_t(buf, 8, last_heartbeat);
274 _mav_put_uint16_t(buf, 16, failed_sessions);
275 _mav_put_uint16_t(buf, 18, successful_sessions);
276 _mav_put_uint8_t(buf, 20, signal_quality);
277 _mav_put_uint8_t(buf, 21, ring_pending);
278 _mav_put_uint8_t(buf, 22, tx_session_pending);
279 _mav_put_uint8_t(buf, 23, rx_session_pending);
280
281 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ISBD_LINK_STATUS, buf, MAVLINK_MSG_ID_ISBD_LINK_STATUS_MIN_LEN, MAVLINK_MSG_ID_ISBD_LINK_STATUS_LEN, MAVLINK_MSG_ID_ISBD_LINK_STATUS_CRC);
282#else
283 mavlink_isbd_link_status_t packet;
284 packet.timestamp = timestamp;
285 packet.last_heartbeat = last_heartbeat;
286 packet.failed_sessions = failed_sessions;
287 packet.successful_sessions = successful_sessions;
288 packet.signal_quality = signal_quality;
289 packet.ring_pending = ring_pending;
290 packet.tx_session_pending = tx_session_pending;
291 packet.rx_session_pending = rx_session_pending;
292
293 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ISBD_LINK_STATUS, (const char *)&packet, MAVLINK_MSG_ID_ISBD_LINK_STATUS_MIN_LEN, MAVLINK_MSG_ID_ISBD_LINK_STATUS_LEN, MAVLINK_MSG_ID_ISBD_LINK_STATUS_CRC);
294#endif
295}
296
297/**
298 * @brief Send a isbd_link_status message
299 * @param chan MAVLink channel to send the message
300 * @param struct The MAVLink struct to serialize
301 */
302static inline void mavlink_msg_isbd_link_status_send_struct(mavlink_channel_t chan, const mavlink_isbd_link_status_t* isbd_link_status)
303{
304#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
305 mavlink_msg_isbd_link_status_send(chan, isbd_link_status->timestamp, isbd_link_status->last_heartbeat, isbd_link_status->failed_sessions, isbd_link_status->successful_sessions, isbd_link_status->signal_quality, isbd_link_status->ring_pending, isbd_link_status->tx_session_pending, isbd_link_status->rx_session_pending);
306#else
307 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ISBD_LINK_STATUS, (const char *)isbd_link_status, MAVLINK_MSG_ID_ISBD_LINK_STATUS_MIN_LEN, MAVLINK_MSG_ID_ISBD_LINK_STATUS_LEN, MAVLINK_MSG_ID_ISBD_LINK_STATUS_CRC);
308#endif
309}
310
311#if MAVLINK_MSG_ID_ISBD_LINK_STATUS_LEN <= MAVLINK_MAX_PAYLOAD_LEN
312/*
313 This variant of _send() can be used to save stack space by reusing
314 memory from the receive buffer. The caller provides a
315 mavlink_message_t which is the size of a full mavlink message. This
316 is usually the receive buffer for the channel, and allows a reply to an
317 incoming message with minimum stack space usage.
318 */
319static inline void mavlink_msg_isbd_link_status_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_t timestamp, uint64_t last_heartbeat, uint16_t failed_sessions, uint16_t successful_sessions, uint8_t signal_quality, uint8_t ring_pending, uint8_t tx_session_pending, uint8_t rx_session_pending)
320{
321#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
322 char *buf = (char *)msgbuf;
323 _mav_put_uint64_t(buf, 0, timestamp);
324 _mav_put_uint64_t(buf, 8, last_heartbeat);
325 _mav_put_uint16_t(buf, 16, failed_sessions);
326 _mav_put_uint16_t(buf, 18, successful_sessions);
327 _mav_put_uint8_t(buf, 20, signal_quality);
328 _mav_put_uint8_t(buf, 21, ring_pending);
329 _mav_put_uint8_t(buf, 22, tx_session_pending);
330 _mav_put_uint8_t(buf, 23, rx_session_pending);
331
332 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ISBD_LINK_STATUS, buf, MAVLINK_MSG_ID_ISBD_LINK_STATUS_MIN_LEN, MAVLINK_MSG_ID_ISBD_LINK_STATUS_LEN, MAVLINK_MSG_ID_ISBD_LINK_STATUS_CRC);
333#else
334 mavlink_isbd_link_status_t *packet = (mavlink_isbd_link_status_t *)msgbuf;
335 packet->timestamp = timestamp;
336 packet->last_heartbeat = last_heartbeat;
337 packet->failed_sessions = failed_sessions;
338 packet->successful_sessions = successful_sessions;
339 packet->signal_quality = signal_quality;
340 packet->ring_pending = ring_pending;
341 packet->tx_session_pending = tx_session_pending;
342 packet->rx_session_pending = rx_session_pending;
343
344 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_ISBD_LINK_STATUS, (const char *)packet, MAVLINK_MSG_ID_ISBD_LINK_STATUS_MIN_LEN, MAVLINK_MSG_ID_ISBD_LINK_STATUS_LEN, MAVLINK_MSG_ID_ISBD_LINK_STATUS_CRC);
345#endif
346}
347#endif
348
349#endif
350
351// MESSAGE ISBD_LINK_STATUS UNPACKING
352
353
354/**
355 * @brief Get field timestamp from isbd_link_status message
356 *
357 * @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.
358 */
359static inline uint64_t mavlink_msg_isbd_link_status_get_timestamp(const mavlink_message_t* msg)
360{
361 return _MAV_RETURN_uint64_t(msg, 0);
362}
363
364/**
365 * @brief Get field last_heartbeat from isbd_link_status message
366 *
367 * @return [us] Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number.
368 */
369static inline uint64_t mavlink_msg_isbd_link_status_get_last_heartbeat(const mavlink_message_t* msg)
370{
371 return _MAV_RETURN_uint64_t(msg, 8);
372}
373
374/**
375 * @brief Get field failed_sessions from isbd_link_status message
376 *
377 * @return Number of failed SBD sessions.
378 */
379static inline uint16_t mavlink_msg_isbd_link_status_get_failed_sessions(const mavlink_message_t* msg)
380{
381 return _MAV_RETURN_uint16_t(msg, 16);
382}
383
384/**
385 * @brief Get field successful_sessions from isbd_link_status message
386 *
387 * @return Number of successful SBD sessions.
388 */
389static inline uint16_t mavlink_msg_isbd_link_status_get_successful_sessions(const mavlink_message_t* msg)
390{
391 return _MAV_RETURN_uint16_t(msg, 18);
392}
393
394/**
395 * @brief Get field signal_quality from isbd_link_status message
396 *
397 * @return Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength.
398 */
399static inline uint8_t mavlink_msg_isbd_link_status_get_signal_quality(const mavlink_message_t* msg)
400{
401 return _MAV_RETURN_uint8_t(msg, 20);
402}
403
404/**
405 * @brief Get field ring_pending from isbd_link_status message
406 *
407 * @return 1: Ring call pending, 0: No call pending.
408 */
409static inline uint8_t mavlink_msg_isbd_link_status_get_ring_pending(const mavlink_message_t* msg)
410{
411 return _MAV_RETURN_uint8_t(msg, 21);
412}
413
414/**
415 * @brief Get field tx_session_pending from isbd_link_status message
416 *
417 * @return 1: Transmission session pending, 0: No transmission session pending.
418 */
419static inline uint8_t mavlink_msg_isbd_link_status_get_tx_session_pending(const mavlink_message_t* msg)
420{
421 return _MAV_RETURN_uint8_t(msg, 22);
422}
423
424/**
425 * @brief Get field rx_session_pending from isbd_link_status message
426 *
427 * @return 1: Receiving session pending, 0: No receiving session pending.
428 */
429static inline uint8_t mavlink_msg_isbd_link_status_get_rx_session_pending(const mavlink_message_t* msg)
430{
431 return _MAV_RETURN_uint8_t(msg, 23);
432}
433
434/**
435 * @brief Decode a isbd_link_status message into a struct
436 *
437 * @param msg The message to decode
438 * @param isbd_link_status C-struct to decode the message contents into
439 */
440static inline void mavlink_msg_isbd_link_status_decode(const mavlink_message_t* msg, mavlink_isbd_link_status_t* isbd_link_status)
441{
442#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
443 isbd_link_status->timestamp = mavlink_msg_isbd_link_status_get_timestamp(msg);
444 isbd_link_status->last_heartbeat = mavlink_msg_isbd_link_status_get_last_heartbeat(msg);
445 isbd_link_status->failed_sessions = mavlink_msg_isbd_link_status_get_failed_sessions(msg);
446 isbd_link_status->successful_sessions = mavlink_msg_isbd_link_status_get_successful_sessions(msg);
447 isbd_link_status->signal_quality = mavlink_msg_isbd_link_status_get_signal_quality(msg);
448 isbd_link_status->ring_pending = mavlink_msg_isbd_link_status_get_ring_pending(msg);
449 isbd_link_status->tx_session_pending = mavlink_msg_isbd_link_status_get_tx_session_pending(msg);
450 isbd_link_status->rx_session_pending = mavlink_msg_isbd_link_status_get_rx_session_pending(msg);
451#else
452 uint8_t len = msg->len < MAVLINK_MSG_ID_ISBD_LINK_STATUS_LEN? msg->len : MAVLINK_MSG_ID_ISBD_LINK_STATUS_LEN;
453 memset(isbd_link_status, 0, MAVLINK_MSG_ID_ISBD_LINK_STATUS_LEN);
454 memcpy(isbd_link_status, _MAV_PAYLOAD(msg), len);
455#endif
456}