tarask
6 days ago 532005c6573d95199ce0ffbc33df4c7a0a4c3ef9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
#pragma once
// MESSAGE CELLULAR_CONFIG PACKING
 
#define MAVLINK_MSG_ID_CELLULAR_CONFIG 336
 
 
typedef struct __mavlink_cellular_config_t {
 uint8_t enable_lte; /*<  Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response.*/
 uint8_t enable_pin; /*<  Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response.*/
 char pin[16]; /*<  PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response.*/
 char new_pin[16]; /*<  New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response.*/
 char apn[32]; /*<  Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response.*/
 char puk[16]; /*<  Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response.*/
 uint8_t roaming; /*<  Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response.*/
 uint8_t response; /*<  Message acceptance response (sent back to GS).*/
} mavlink_cellular_config_t;
 
#define MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN 84
#define MAVLINK_MSG_ID_CELLULAR_CONFIG_MIN_LEN 84
#define MAVLINK_MSG_ID_336_LEN 84
#define MAVLINK_MSG_ID_336_MIN_LEN 84
 
#define MAVLINK_MSG_ID_CELLULAR_CONFIG_CRC 245
#define MAVLINK_MSG_ID_336_CRC 245
 
#define MAVLINK_MSG_CELLULAR_CONFIG_FIELD_PIN_LEN 16
#define MAVLINK_MSG_CELLULAR_CONFIG_FIELD_NEW_PIN_LEN 16
#define MAVLINK_MSG_CELLULAR_CONFIG_FIELD_APN_LEN 32
#define MAVLINK_MSG_CELLULAR_CONFIG_FIELD_PUK_LEN 16
 
#if MAVLINK_COMMAND_24BIT
#define MAVLINK_MESSAGE_INFO_CELLULAR_CONFIG { \
    336, \
    "CELLULAR_CONFIG", \
    8, \
    {  { "enable_lte", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_cellular_config_t, enable_lte) }, \
         { "enable_pin", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_cellular_config_t, enable_pin) }, \
         { "pin", NULL, MAVLINK_TYPE_CHAR, 16, 2, offsetof(mavlink_cellular_config_t, pin) }, \
         { "new_pin", NULL, MAVLINK_TYPE_CHAR, 16, 18, offsetof(mavlink_cellular_config_t, new_pin) }, \
         { "apn", NULL, MAVLINK_TYPE_CHAR, 32, 34, offsetof(mavlink_cellular_config_t, apn) }, \
         { "puk", NULL, MAVLINK_TYPE_CHAR, 16, 66, offsetof(mavlink_cellular_config_t, puk) }, \
         { "roaming", NULL, MAVLINK_TYPE_UINT8_T, 0, 82, offsetof(mavlink_cellular_config_t, roaming) }, \
         { "response", NULL, MAVLINK_TYPE_UINT8_T, 0, 83, offsetof(mavlink_cellular_config_t, response) }, \
         } \
}
#else
#define MAVLINK_MESSAGE_INFO_CELLULAR_CONFIG { \
    "CELLULAR_CONFIG", \
    8, \
    {  { "enable_lte", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_cellular_config_t, enable_lte) }, \
         { "enable_pin", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_cellular_config_t, enable_pin) }, \
         { "pin", NULL, MAVLINK_TYPE_CHAR, 16, 2, offsetof(mavlink_cellular_config_t, pin) }, \
         { "new_pin", NULL, MAVLINK_TYPE_CHAR, 16, 18, offsetof(mavlink_cellular_config_t, new_pin) }, \
         { "apn", NULL, MAVLINK_TYPE_CHAR, 32, 34, offsetof(mavlink_cellular_config_t, apn) }, \
         { "puk", NULL, MAVLINK_TYPE_CHAR, 16, 66, offsetof(mavlink_cellular_config_t, puk) }, \
         { "roaming", NULL, MAVLINK_TYPE_UINT8_T, 0, 82, offsetof(mavlink_cellular_config_t, roaming) }, \
         { "response", NULL, MAVLINK_TYPE_UINT8_T, 0, 83, offsetof(mavlink_cellular_config_t, response) }, \
         } \
}
#endif
 
/**
 * @brief Pack a cellular_config message
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param msg The MAVLink message to compress the data into
 *
 * @param enable_lte  Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response.
 * @param enable_pin  Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response.
 * @param pin  PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response.
 * @param new_pin  New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response.
 * @param apn  Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response.
 * @param puk  Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response.
 * @param roaming  Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response.
 * @param response  Message acceptance response (sent back to GS).
 * @return length of the message in bytes (excluding serial stream start sign)
 */
static inline uint16_t mavlink_msg_cellular_config_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
                               uint8_t enable_lte, uint8_t enable_pin, const char *pin, const char *new_pin, const char *apn, const char *puk, uint8_t roaming, uint8_t response)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN];
    _mav_put_uint8_t(buf, 0, enable_lte);
    _mav_put_uint8_t(buf, 1, enable_pin);
    _mav_put_uint8_t(buf, 82, roaming);
    _mav_put_uint8_t(buf, 83, response);
    _mav_put_char_array(buf, 2, pin, 16);
    _mav_put_char_array(buf, 18, new_pin, 16);
    _mav_put_char_array(buf, 34, apn, 32);
    _mav_put_char_array(buf, 66, puk, 16);
        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN);
#else
    mavlink_cellular_config_t packet;
    packet.enable_lte = enable_lte;
    packet.enable_pin = enable_pin;
    packet.roaming = roaming;
    packet.response = response;
    mav_array_memcpy(packet.pin, pin, sizeof(char)*16);
    mav_array_memcpy(packet.new_pin, new_pin, sizeof(char)*16);
    mav_array_memcpy(packet.apn, apn, sizeof(char)*32);
    mav_array_memcpy(packet.puk, puk, sizeof(char)*16);
        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN);
#endif
 
    msg->msgid = MAVLINK_MSG_ID_CELLULAR_CONFIG;
    return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_CELLULAR_CONFIG_MIN_LEN, MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN, MAVLINK_MSG_ID_CELLULAR_CONFIG_CRC);
}
 
/**
 * @brief Pack a cellular_config message on a channel
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param chan The MAVLink channel this message will be sent over
 * @param msg The MAVLink message to compress the data into
 * @param enable_lte  Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response.
 * @param enable_pin  Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response.
 * @param pin  PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response.
 * @param new_pin  New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response.
 * @param apn  Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response.
 * @param puk  Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response.
 * @param roaming  Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response.
 * @param response  Message acceptance response (sent back to GS).
 * @return length of the message in bytes (excluding serial stream start sign)
 */
static inline uint16_t mavlink_msg_cellular_config_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
                               mavlink_message_t* msg,
                                   uint8_t enable_lte,uint8_t enable_pin,const char *pin,const char *new_pin,const char *apn,const char *puk,uint8_t roaming,uint8_t response)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN];
    _mav_put_uint8_t(buf, 0, enable_lte);
    _mav_put_uint8_t(buf, 1, enable_pin);
    _mav_put_uint8_t(buf, 82, roaming);
    _mav_put_uint8_t(buf, 83, response);
    _mav_put_char_array(buf, 2, pin, 16);
    _mav_put_char_array(buf, 18, new_pin, 16);
    _mav_put_char_array(buf, 34, apn, 32);
    _mav_put_char_array(buf, 66, puk, 16);
        memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN);
#else
    mavlink_cellular_config_t packet;
    packet.enable_lte = enable_lte;
    packet.enable_pin = enable_pin;
    packet.roaming = roaming;
    packet.response = response;
    mav_array_memcpy(packet.pin, pin, sizeof(char)*16);
    mav_array_memcpy(packet.new_pin, new_pin, sizeof(char)*16);
    mav_array_memcpy(packet.apn, apn, sizeof(char)*32);
    mav_array_memcpy(packet.puk, puk, sizeof(char)*16);
        memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN);
#endif
 
    msg->msgid = MAVLINK_MSG_ID_CELLULAR_CONFIG;
    return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_CELLULAR_CONFIG_MIN_LEN, MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN, MAVLINK_MSG_ID_CELLULAR_CONFIG_CRC);
}
 
/**
 * @brief Encode a cellular_config struct
 *
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param msg The MAVLink message to compress the data into
 * @param cellular_config C-struct to read the message contents from
 */
static inline uint16_t mavlink_msg_cellular_config_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_cellular_config_t* cellular_config)
{
    return mavlink_msg_cellular_config_pack(system_id, component_id, msg, cellular_config->enable_lte, cellular_config->enable_pin, cellular_config->pin, cellular_config->new_pin, cellular_config->apn, cellular_config->puk, cellular_config->roaming, cellular_config->response);
}
 
/**
 * @brief Encode a cellular_config struct on a channel
 *
 * @param system_id ID of this system
 * @param component_id ID of this component (e.g. 200 for IMU)
 * @param chan The MAVLink channel this message will be sent over
 * @param msg The MAVLink message to compress the data into
 * @param cellular_config C-struct to read the message contents from
 */
static inline uint16_t mavlink_msg_cellular_config_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_cellular_config_t* cellular_config)
{
    return mavlink_msg_cellular_config_pack_chan(system_id, component_id, chan, msg, cellular_config->enable_lte, cellular_config->enable_pin, cellular_config->pin, cellular_config->new_pin, cellular_config->apn, cellular_config->puk, cellular_config->roaming, cellular_config->response);
}
 
/**
 * @brief Send a cellular_config message
 * @param chan MAVLink channel to send the message
 *
 * @param enable_lte  Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response.
 * @param enable_pin  Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response.
 * @param pin  PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response.
 * @param new_pin  New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response.
 * @param apn  Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response.
 * @param puk  Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response.
 * @param roaming  Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response.
 * @param response  Message acceptance response (sent back to GS).
 */
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
 
static inline void mavlink_msg_cellular_config_send(mavlink_channel_t chan, uint8_t enable_lte, uint8_t enable_pin, const char *pin, const char *new_pin, const char *apn, const char *puk, uint8_t roaming, uint8_t response)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char buf[MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN];
    _mav_put_uint8_t(buf, 0, enable_lte);
    _mav_put_uint8_t(buf, 1, enable_pin);
    _mav_put_uint8_t(buf, 82, roaming);
    _mav_put_uint8_t(buf, 83, response);
    _mav_put_char_array(buf, 2, pin, 16);
    _mav_put_char_array(buf, 18, new_pin, 16);
    _mav_put_char_array(buf, 34, apn, 32);
    _mav_put_char_array(buf, 66, puk, 16);
    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CELLULAR_CONFIG, buf, MAVLINK_MSG_ID_CELLULAR_CONFIG_MIN_LEN, MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN, MAVLINK_MSG_ID_CELLULAR_CONFIG_CRC);
#else
    mavlink_cellular_config_t packet;
    packet.enable_lte = enable_lte;
    packet.enable_pin = enable_pin;
    packet.roaming = roaming;
    packet.response = response;
    mav_array_memcpy(packet.pin, pin, sizeof(char)*16);
    mav_array_memcpy(packet.new_pin, new_pin, sizeof(char)*16);
    mav_array_memcpy(packet.apn, apn, sizeof(char)*32);
    mav_array_memcpy(packet.puk, puk, sizeof(char)*16);
    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CELLULAR_CONFIG, (const char *)&packet, MAVLINK_MSG_ID_CELLULAR_CONFIG_MIN_LEN, MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN, MAVLINK_MSG_ID_CELLULAR_CONFIG_CRC);
#endif
}
 
/**
 * @brief Send a cellular_config message
 * @param chan MAVLink channel to send the message
 * @param struct The MAVLink struct to serialize
 */
static inline void mavlink_msg_cellular_config_send_struct(mavlink_channel_t chan, const mavlink_cellular_config_t* cellular_config)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    mavlink_msg_cellular_config_send(chan, cellular_config->enable_lte, cellular_config->enable_pin, cellular_config->pin, cellular_config->new_pin, cellular_config->apn, cellular_config->puk, cellular_config->roaming, cellular_config->response);
#else
    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CELLULAR_CONFIG, (const char *)cellular_config, MAVLINK_MSG_ID_CELLULAR_CONFIG_MIN_LEN, MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN, MAVLINK_MSG_ID_CELLULAR_CONFIG_CRC);
#endif
}
 
#if MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN <= MAVLINK_MAX_PAYLOAD_LEN
/*
  This variant of _send() can be used to save stack space by re-using
  memory from the receive buffer.  The caller provides a
  mavlink_message_t which is the size of a full mavlink message. This
  is usually the receive buffer for the channel, and allows a reply to an
  incoming message with minimum stack space usage.
 */
static inline void mavlink_msg_cellular_config_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan,  uint8_t enable_lte, uint8_t enable_pin, const char *pin, const char *new_pin, const char *apn, const char *puk, uint8_t roaming, uint8_t response)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    char *buf = (char *)msgbuf;
    _mav_put_uint8_t(buf, 0, enable_lte);
    _mav_put_uint8_t(buf, 1, enable_pin);
    _mav_put_uint8_t(buf, 82, roaming);
    _mav_put_uint8_t(buf, 83, response);
    _mav_put_char_array(buf, 2, pin, 16);
    _mav_put_char_array(buf, 18, new_pin, 16);
    _mav_put_char_array(buf, 34, apn, 32);
    _mav_put_char_array(buf, 66, puk, 16);
    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CELLULAR_CONFIG, buf, MAVLINK_MSG_ID_CELLULAR_CONFIG_MIN_LEN, MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN, MAVLINK_MSG_ID_CELLULAR_CONFIG_CRC);
#else
    mavlink_cellular_config_t *packet = (mavlink_cellular_config_t *)msgbuf;
    packet->enable_lte = enable_lte;
    packet->enable_pin = enable_pin;
    packet->roaming = roaming;
    packet->response = response;
    mav_array_memcpy(packet->pin, pin, sizeof(char)*16);
    mav_array_memcpy(packet->new_pin, new_pin, sizeof(char)*16);
    mav_array_memcpy(packet->apn, apn, sizeof(char)*32);
    mav_array_memcpy(packet->puk, puk, sizeof(char)*16);
    _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CELLULAR_CONFIG, (const char *)packet, MAVLINK_MSG_ID_CELLULAR_CONFIG_MIN_LEN, MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN, MAVLINK_MSG_ID_CELLULAR_CONFIG_CRC);
#endif
}
#endif
 
#endif
 
// MESSAGE CELLULAR_CONFIG UNPACKING
 
 
/**
 * @brief Get field enable_lte from cellular_config message
 *
 * @return  Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response.
 */
static inline uint8_t mavlink_msg_cellular_config_get_enable_lte(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  0);
}
 
/**
 * @brief Get field enable_pin from cellular_config message
 *
 * @return  Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response.
 */
static inline uint8_t mavlink_msg_cellular_config_get_enable_pin(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  1);
}
 
/**
 * @brief Get field pin from cellular_config message
 *
 * @return  PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response.
 */
static inline uint16_t mavlink_msg_cellular_config_get_pin(const mavlink_message_t* msg, char *pin)
{
    return _MAV_RETURN_char_array(msg, pin, 16,  2);
}
 
/**
 * @brief Get field new_pin from cellular_config message
 *
 * @return  New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response.
 */
static inline uint16_t mavlink_msg_cellular_config_get_new_pin(const mavlink_message_t* msg, char *new_pin)
{
    return _MAV_RETURN_char_array(msg, new_pin, 16,  18);
}
 
/**
 * @brief Get field apn from cellular_config message
 *
 * @return  Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response.
 */
static inline uint16_t mavlink_msg_cellular_config_get_apn(const mavlink_message_t* msg, char *apn)
{
    return _MAV_RETURN_char_array(msg, apn, 32,  34);
}
 
/**
 * @brief Get field puk from cellular_config message
 *
 * @return  Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response.
 */
static inline uint16_t mavlink_msg_cellular_config_get_puk(const mavlink_message_t* msg, char *puk)
{
    return _MAV_RETURN_char_array(msg, puk, 16,  66);
}
 
/**
 * @brief Get field roaming from cellular_config message
 *
 * @return  Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response.
 */
static inline uint8_t mavlink_msg_cellular_config_get_roaming(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  82);
}
 
/**
 * @brief Get field response from cellular_config message
 *
 * @return  Message acceptance response (sent back to GS).
 */
static inline uint8_t mavlink_msg_cellular_config_get_response(const mavlink_message_t* msg)
{
    return _MAV_RETURN_uint8_t(msg,  83);
}
 
/**
 * @brief Decode a cellular_config message into a struct
 *
 * @param msg The message to decode
 * @param cellular_config C-struct to decode the message contents into
 */
static inline void mavlink_msg_cellular_config_decode(const mavlink_message_t* msg, mavlink_cellular_config_t* cellular_config)
{
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
    cellular_config->enable_lte = mavlink_msg_cellular_config_get_enable_lte(msg);
    cellular_config->enable_pin = mavlink_msg_cellular_config_get_enable_pin(msg);
    mavlink_msg_cellular_config_get_pin(msg, cellular_config->pin);
    mavlink_msg_cellular_config_get_new_pin(msg, cellular_config->new_pin);
    mavlink_msg_cellular_config_get_apn(msg, cellular_config->apn);
    mavlink_msg_cellular_config_get_puk(msg, cellular_config->puk);
    cellular_config->roaming = mavlink_msg_cellular_config_get_roaming(msg);
    cellular_config->response = mavlink_msg_cellular_config_get_response(msg);
#else
        uint8_t len = msg->len < MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN? msg->len : MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN;
        memset(cellular_config, 0, MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN);
    memcpy(cellular_config, _MAV_PAYLOAD(msg), len);
#endif
}