4#define MAVLINK_MSG_ID_CELLULAR_STATUS 334
15} mavlink_cellular_status_t;
17#define MAVLINK_MSG_ID_CELLULAR_STATUS_LEN 10
18#define MAVLINK_MSG_ID_CELLULAR_STATUS_MIN_LEN 10
19#define MAVLINK_MSG_ID_334_LEN 10
20#define MAVLINK_MSG_ID_334_MIN_LEN 10
22#define MAVLINK_MSG_ID_CELLULAR_STATUS_CRC 72
23#define MAVLINK_MSG_ID_334_CRC 72
27#if MAVLINK_COMMAND_24BIT
28#define MAVLINK_MESSAGE_INFO_CELLULAR_STATUS {
32 { { "status", NULL, MAVLINK_TYPE_UINT8_T, 0
, 6
, offsetof(mavlink_cellular_status_t, status) },
33 { "failure_reason", NULL, MAVLINK_TYPE_UINT8_T, 0
, 7
, offsetof(mavlink_cellular_status_t, failure_reason) },
34 { "type", NULL, MAVLINK_TYPE_UINT8_T, 0
, 8
, offsetof(mavlink_cellular_status_t, type) },
35 { "quality", NULL, MAVLINK_TYPE_UINT8_T, 0
, 9
, offsetof(mavlink_cellular_status_t, quality) },
36 { "mcc", NULL, MAVLINK_TYPE_UINT16_T, 0
, 0
, offsetof(mavlink_cellular_status_t, mcc) },
37 { "mnc", NULL, MAVLINK_TYPE_UINT16_T, 0
, 2
, offsetof(mavlink_cellular_status_t, mnc) },
38 { "lac", NULL, MAVLINK_TYPE_UINT16_T, 0
, 4
, offsetof(mavlink_cellular_status_t, lac) },
40}
42#define MAVLINK_MESSAGE_INFO_CELLULAR_STATUS {
45 { { "status", NULL, MAVLINK_TYPE_UINT8_T, 0
, 6
, offsetof(mavlink_cellular_status_t, status) },
46 { "failure_reason", NULL, MAVLINK_TYPE_UINT8_T, 0
, 7
, offsetof(mavlink_cellular_status_t, failure_reason) },
47 { "type", NULL, MAVLINK_TYPE_UINT8_T, 0
, 8
, offsetof(mavlink_cellular_status_t, type) },
48 { "quality", NULL, MAVLINK_TYPE_UINT8_T, 0
, 9
, offsetof(mavlink_cellular_status_t, quality) },
49 { "mcc", NULL, MAVLINK_TYPE_UINT16_T, 0
, 0
, offsetof(mavlink_cellular_status_t, mcc) },
50 { "mnc", NULL, MAVLINK_TYPE_UINT16_T, 0
, 2
, offsetof(mavlink_cellular_status_t, mnc) },
51 { "lac", NULL, MAVLINK_TYPE_UINT16_T, 0
, 4
, offsetof(mavlink_cellular_status_t, lac) },
53}
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71static inline uint16_t mavlink_msg_cellular_status_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
72 uint8_t status, uint8_t failure_reason, uint8_t type, uint8_t quality, uint16_t mcc, uint16_t mnc, uint16_t lac)
74#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
76 _mav_put_uint16_t(buf, 0, mcc);
77 _mav_put_uint16_t(buf, 2, mnc);
78 _mav_put_uint16_t(buf, 4, lac);
79 _mav_put_uint8_t(buf, 6, status);
80 _mav_put_uint8_t(buf, 7, failure_reason);
81 _mav_put_uint8_t(buf, 8, type);
82 _mav_put_uint8_t(buf, 9, quality);
86 mavlink_cellular_status_t packet;
90 packet.status = status;
91 packet.failure_reason = failure_reason;
93 packet.quality = quality;
95 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CELLULAR_STATUS_LEN);
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118static inline uint16_t mavlink_msg_cellular_status_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
119 uint8_t status, uint8_t failure_reason, uint8_t type, uint8_t quality, uint16_t mcc, uint16_t mnc, uint16_t lac)
121#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
123 _mav_put_uint16_t(buf, 0, mcc);
124 _mav_put_uint16_t(buf, 2, mnc);
125 _mav_put_uint16_t(buf, 4, lac);
126 _mav_put_uint8_t(buf, 6, status);
127 _mav_put_uint8_t(buf, 7, failure_reason);
128 _mav_put_uint8_t(buf, 8, type);
129 _mav_put_uint8_t(buf, 9, quality);
133 mavlink_cellular_status_t packet;
137 packet.status = status;
138 packet.failure_reason = failure_reason;
140 packet.quality = quality;
142 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CELLULAR_STATUS_LEN);
147 return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_CELLULAR_STATUS_MIN_LEN, MAVLINK_MSG_ID_CELLULAR_STATUS_LEN, MAVLINK_MSG_ID_CELLULAR_STATUS_CRC);
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168static inline uint16_t mavlink_msg_cellular_status_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
169 mavlink_message_t* msg,
170 uint8_t status,uint8_t failure_reason,uint8_t type,uint8_t quality,uint16_t mcc,uint16_t mnc,uint16_t lac)
172#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
174 _mav_put_uint16_t(buf, 0, mcc);
175 _mav_put_uint16_t(buf, 2, mnc);
176 _mav_put_uint16_t(buf, 4, lac);
177 _mav_put_uint8_t(buf, 6, status);
178 _mav_put_uint8_t(buf, 7, failure_reason);
179 _mav_put_uint8_t(buf, 8, type);
180 _mav_put_uint8_t(buf, 9, quality);
184 mavlink_cellular_status_t packet;
188 packet.status = status;
189 packet.failure_reason = failure_reason;
191 packet.quality = quality;
193 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CELLULAR_STATUS_LEN);
201
202
203
204
205
206
207
208static inline uint16_t mavlink_msg_cellular_status_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_cellular_status_t* cellular_status)
210 return mavlink_msg_cellular_status_pack(system_id, component_id, msg, cellular_status->status, cellular_status->failure_reason, cellular_status->type, cellular_status->quality, cellular_status->mcc, cellular_status->mnc, cellular_status->lac);
214
215
216
217
218
219
220
221
222static inline uint16_t mavlink_msg_cellular_status_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_cellular_status_t* cellular_status)
224 return mavlink_msg_cellular_status_pack_chan(system_id, component_id, chan, msg, cellular_status->status, cellular_status->failure_reason, cellular_status->type, cellular_status->quality, cellular_status->mcc, cellular_status->mnc, cellular_status->lac);
228
229
230
231
232
233
234
235
236static inline uint16_t mavlink_msg_cellular_status_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg,
const mavlink_cellular_status_t* cellular_status)
238 return mavlink_msg_cellular_status_pack_status(system_id, component_id, _status, msg, cellular_status->status, cellular_status->failure_reason, cellular_status->type, cellular_status->quality, cellular_status->mcc, cellular_status->mnc, cellular_status->lac);
242
243
244
245
246
247
248
249
250
251
252
253#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
255static inline void mavlink_msg_cellular_status_send(mavlink_channel_t chan, uint8_t status, uint8_t failure_reason, uint8_t type, uint8_t quality, uint16_t mcc, uint16_t mnc, uint16_t lac)
257#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
258 char buf[MAVLINK_MSG_ID_CELLULAR_STATUS_LEN];
259 _mav_put_uint16_t(buf, 0, mcc);
260 _mav_put_uint16_t(buf, 2, mnc);
261 _mav_put_uint16_t(buf, 4, lac);
262 _mav_put_uint8_t(buf, 6, status);
263 _mav_put_uint8_t(buf, 7, failure_reason);
264 _mav_put_uint8_t(buf, 8, type);
265 _mav_put_uint8_t(buf, 9, quality);
267 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CELLULAR_STATUS, buf, MAVLINK_MSG_ID_CELLULAR_STATUS_MIN_LEN, MAVLINK_MSG_ID_CELLULAR_STATUS_LEN, MAVLINK_MSG_ID_CELLULAR_STATUS_CRC);
269 mavlink_cellular_status_t packet;
273 packet.status = status;
274 packet.failure_reason = failure_reason;
276 packet.quality = quality;
278 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CELLULAR_STATUS, (
const char *)&packet, MAVLINK_MSG_ID_CELLULAR_STATUS_MIN_LEN, MAVLINK_MSG_ID_CELLULAR_STATUS_LEN, MAVLINK_MSG_ID_CELLULAR_STATUS_CRC);
283
284
285
286
287static inline void mavlink_msg_cellular_status_send_struct(mavlink_channel_t chan,
const mavlink_cellular_status_t* cellular_status)
289#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
290 mavlink_msg_cellular_status_send(chan, cellular_status->status, cellular_status->failure_reason, cellular_status->type, cellular_status->quality, cellular_status->mcc, cellular_status->mnc, cellular_status->lac);
292 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CELLULAR_STATUS, (
const char *)cellular_status, MAVLINK_MSG_ID_CELLULAR_STATUS_MIN_LEN, MAVLINK_MSG_ID_CELLULAR_STATUS_LEN, MAVLINK_MSG_ID_CELLULAR_STATUS_CRC);
296#if MAVLINK_MSG_ID_CELLULAR_STATUS_LEN <= MAVLINK_MAX_PAYLOAD_LEN
298
299
300
301
302
303
304static inline void mavlink_msg_cellular_status_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t status, uint8_t failure_reason, uint8_t type, uint8_t quality, uint16_t mcc, uint16_t mnc, uint16_t lac)
306#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
307 char *buf = (
char *)msgbuf;
308 _mav_put_uint16_t(buf, 0, mcc);
309 _mav_put_uint16_t(buf, 2, mnc);
310 _mav_put_uint16_t(buf, 4, lac);
311 _mav_put_uint8_t(buf, 6, status);
312 _mav_put_uint8_t(buf, 7, failure_reason);
313 _mav_put_uint8_t(buf, 8, type);
314 _mav_put_uint8_t(buf, 9, quality);
316 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CELLULAR_STATUS, buf, MAVLINK_MSG_ID_CELLULAR_STATUS_MIN_LEN, MAVLINK_MSG_ID_CELLULAR_STATUS_LEN, MAVLINK_MSG_ID_CELLULAR_STATUS_CRC);
318 mavlink_cellular_status_t *packet = (mavlink_cellular_status_t *)msgbuf;
322 packet->status = status;
323 packet->failure_reason = failure_reason;
325 packet->quality = quality;
327 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CELLULAR_STATUS, (
const char *)packet, MAVLINK_MSG_ID_CELLULAR_STATUS_MIN_LEN, MAVLINK_MSG_ID_CELLULAR_STATUS_LEN, MAVLINK_MSG_ID_CELLULAR_STATUS_CRC);
338
339
340
341
342static inline uint8_t mavlink_msg_cellular_status_get_status(
const mavlink_message_t* msg)
344 return _MAV_RETURN_uint8_t(msg, 6);
348
349
350
351
352static inline uint8_t mavlink_msg_cellular_status_get_failure_reason(
const mavlink_message_t* msg)
354 return _MAV_RETURN_uint8_t(msg, 7);
358
359
360
361
362static inline uint8_t mavlink_msg_cellular_status_get_type(
const mavlink_message_t* msg)
364 return _MAV_RETURN_uint8_t(msg, 8);
368
369
370
371
372static inline uint8_t mavlink_msg_cellular_status_get_quality(
const mavlink_message_t* msg)
374 return _MAV_RETURN_uint8_t(msg, 9);
378
379
380
381
382static inline uint16_t mavlink_msg_cellular_status_get_mcc(
const mavlink_message_t* msg)
384 return _MAV_RETURN_uint16_t(msg, 0);
388
389
390
391
392static inline uint16_t mavlink_msg_cellular_status_get_mnc(
const mavlink_message_t* msg)
394 return _MAV_RETURN_uint16_t(msg, 2);
398
399
400
401
402static inline uint16_t mavlink_msg_cellular_status_get_lac(
const mavlink_message_t* msg)
404 return _MAV_RETURN_uint16_t(msg, 4);
408
409
410
411
412
413static inline void mavlink_msg_cellular_status_decode(
const mavlink_message_t* msg, mavlink_cellular_status_t* cellular_status)
415#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
416 cellular_status->mcc = mavlink_msg_cellular_status_get_mcc(msg);
417 cellular_status->mnc = mavlink_msg_cellular_status_get_mnc(msg);
418 cellular_status->lac = mavlink_msg_cellular_status_get_lac(msg);
419 cellular_status->status = mavlink_msg_cellular_status_get_status(msg);
420 cellular_status->failure_reason = mavlink_msg_cellular_status_get_failure_reason(msg);
421 cellular_status->type = mavlink_msg_cellular_status_get_type(msg);
422 cellular_status->quality = mavlink_msg_cellular_status_get_quality(msg);
424 uint8_t len = msg->len < MAVLINK_MSG_ID_CELLULAR_STATUS_LEN? msg->len : MAVLINK_MSG_ID_CELLULAR_STATUS_LEN;
425 memset(cellular_status, 0, MAVLINK_MSG_ID_CELLULAR_STATUS_LEN);
426 memcpy(cellular_status, _MAV_PAYLOAD(msg), len);
#define MAVLINK_MSG_ID_CELLULAR_STATUS_LEN
Definition: mavlink_msg_cellular_status.h:17
#define MAVLINK_MSG_ID_CELLULAR_STATUS_MIN_LEN
Definition: mavlink_msg_cellular_status.h:18
#define MAVLINK_MSG_ID_CELLULAR_STATUS
Definition: mavlink_msg_cellular_status.h:4
#define MAVLINK_MSG_ID_CELLULAR_STATUS_CRC
Definition: mavlink_msg_cellular_status.h:22
Definition: mavlink_msg_cellular_status.h:7
uint8_t quality
Definition: mavlink_msg_cellular_status.h:14
uint8_t type
Definition: mavlink_msg_cellular_status.h:13
uint16_t lac
Definition: mavlink_msg_cellular_status.h:10
uint16_t mnc
Definition: mavlink_msg_cellular_status.h:9
uint8_t failure_reason
Definition: mavlink_msg_cellular_status.h:12
uint16_t mcc
Definition: mavlink_msg_cellular_status.h:8
uint8_t status
Definition: mavlink_msg_cellular_status.h:11