2 // MESSAGE CELLULAR_CONFIG PACKING
4 #define MAVLINK_MSG_ID_CELLULAR_CONFIG 336
7 typedef struct __mavlink_cellular_config_t
{
8 uint8_t enable_lte
; /*< Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response.*/
9 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.*/
10 char pin
[16]; /*< PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response.*/
11 char new_pin
[16]; /*< New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response.*/
12 char apn
[32]; /*< Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response.*/
13 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.*/
14 uint8_t roaming
; /*< Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response.*/
15 uint8_t response
; /*< Message acceptance response (sent back to GS).*/
16 } mavlink_cellular_config_t
;
18 #define MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN 84
19 #define MAVLINK_MSG_ID_CELLULAR_CONFIG_MIN_LEN 84
20 #define MAVLINK_MSG_ID_336_LEN 84
21 #define MAVLINK_MSG_ID_336_MIN_LEN 84
23 #define MAVLINK_MSG_ID_CELLULAR_CONFIG_CRC 245
24 #define MAVLINK_MSG_ID_336_CRC 245
26 #define MAVLINK_MSG_CELLULAR_CONFIG_FIELD_PIN_LEN 16
27 #define MAVLINK_MSG_CELLULAR_CONFIG_FIELD_NEW_PIN_LEN 16
28 #define MAVLINK_MSG_CELLULAR_CONFIG_FIELD_APN_LEN 32
29 #define MAVLINK_MSG_CELLULAR_CONFIG_FIELD_PUK_LEN 16
31 #if MAVLINK_COMMAND_24BIT
32 #define MAVLINK_MESSAGE_INFO_CELLULAR_CONFIG { \
36 { { "enable_lte", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_cellular_config_t, enable_lte) }, \
37 { "enable_pin", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_cellular_config_t, enable_pin) }, \
38 { "pin", NULL, MAVLINK_TYPE_CHAR, 16, 2, offsetof(mavlink_cellular_config_t, pin) }, \
39 { "new_pin", NULL, MAVLINK_TYPE_CHAR, 16, 18, offsetof(mavlink_cellular_config_t, new_pin) }, \
40 { "apn", NULL, MAVLINK_TYPE_CHAR, 32, 34, offsetof(mavlink_cellular_config_t, apn) }, \
41 { "puk", NULL, MAVLINK_TYPE_CHAR, 16, 66, offsetof(mavlink_cellular_config_t, puk) }, \
42 { "roaming", NULL, MAVLINK_TYPE_UINT8_T, 0, 82, offsetof(mavlink_cellular_config_t, roaming) }, \
43 { "response", NULL, MAVLINK_TYPE_UINT8_T, 0, 83, offsetof(mavlink_cellular_config_t, response) }, \
47 #define MAVLINK_MESSAGE_INFO_CELLULAR_CONFIG { \
50 { { "enable_lte", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_cellular_config_t, enable_lte) }, \
51 { "enable_pin", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_cellular_config_t, enable_pin) }, \
52 { "pin", NULL, MAVLINK_TYPE_CHAR, 16, 2, offsetof(mavlink_cellular_config_t, pin) }, \
53 { "new_pin", NULL, MAVLINK_TYPE_CHAR, 16, 18, offsetof(mavlink_cellular_config_t, new_pin) }, \
54 { "apn", NULL, MAVLINK_TYPE_CHAR, 32, 34, offsetof(mavlink_cellular_config_t, apn) }, \
55 { "puk", NULL, MAVLINK_TYPE_CHAR, 16, 66, offsetof(mavlink_cellular_config_t, puk) }, \
56 { "roaming", NULL, MAVLINK_TYPE_UINT8_T, 0, 82, offsetof(mavlink_cellular_config_t, roaming) }, \
57 { "response", NULL, MAVLINK_TYPE_UINT8_T, 0, 83, offsetof(mavlink_cellular_config_t, response) }, \
63 * @brief Pack a cellular_config message
64 * @param system_id ID of this system
65 * @param component_id ID of this component (e.g. 200 for IMU)
66 * @param msg The MAVLink message to compress the data into
68 * @param enable_lte Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response.
69 * @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.
70 * @param pin PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response.
71 * @param new_pin New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response.
72 * @param apn Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response.
73 * @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.
74 * @param roaming Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response.
75 * @param response Message acceptance response (sent back to GS).
76 * @return length of the message in bytes (excluding serial stream start sign)
78 static inline uint16_t mavlink_msg_cellular_config_pack(uint8_t system_id
, uint8_t component_id
, mavlink_message_t
* msg
,
79 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
)
81 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
82 char buf
[MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN
];
83 _mav_put_uint8_t(buf
, 0, enable_lte
);
84 _mav_put_uint8_t(buf
, 1, enable_pin
);
85 _mav_put_uint8_t(buf
, 82, roaming
);
86 _mav_put_uint8_t(buf
, 83, response
);
87 _mav_put_char_array(buf
, 2, pin
, 16);
88 _mav_put_char_array(buf
, 18, new_pin
, 16);
89 _mav_put_char_array(buf
, 34, apn
, 32);
90 _mav_put_char_array(buf
, 66, puk
, 16);
91 memcpy(_MAV_PAYLOAD_NON_CONST(msg
), buf
, MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN
);
93 mavlink_cellular_config_t packet
;
94 packet
.enable_lte
= enable_lte
;
95 packet
.enable_pin
= enable_pin
;
96 packet
.roaming
= roaming
;
97 packet
.response
= response
;
98 mav_array_memcpy(packet
.pin
, pin
, sizeof(char)*16);
99 mav_array_memcpy(packet
.new_pin
, new_pin
, sizeof(char)*16);
100 mav_array_memcpy(packet
.apn
, apn
, sizeof(char)*32);
101 mav_array_memcpy(packet
.puk
, puk
, sizeof(char)*16);
102 memcpy(_MAV_PAYLOAD_NON_CONST(msg
), &packet
, MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN
);
105 msg
->msgid
= MAVLINK_MSG_ID_CELLULAR_CONFIG
;
106 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
);
110 * @brief Pack a cellular_config message on a channel
111 * @param system_id ID of this system
112 * @param component_id ID of this component (e.g. 200 for IMU)
113 * @param chan The MAVLink channel this message will be sent over
114 * @param msg The MAVLink message to compress the data into
115 * @param enable_lte Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response.
116 * @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.
117 * @param pin PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response.
118 * @param new_pin New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response.
119 * @param apn Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response.
120 * @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.
121 * @param roaming Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response.
122 * @param response Message acceptance response (sent back to GS).
123 * @return length of the message in bytes (excluding serial stream start sign)
125 static inline uint16_t mavlink_msg_cellular_config_pack_chan(uint8_t system_id
, uint8_t component_id
, uint8_t chan
,
126 mavlink_message_t
* msg
,
127 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
)
129 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
130 char buf
[MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN
];
131 _mav_put_uint8_t(buf
, 0, enable_lte
);
132 _mav_put_uint8_t(buf
, 1, enable_pin
);
133 _mav_put_uint8_t(buf
, 82, roaming
);
134 _mav_put_uint8_t(buf
, 83, response
);
135 _mav_put_char_array(buf
, 2, pin
, 16);
136 _mav_put_char_array(buf
, 18, new_pin
, 16);
137 _mav_put_char_array(buf
, 34, apn
, 32);
138 _mav_put_char_array(buf
, 66, puk
, 16);
139 memcpy(_MAV_PAYLOAD_NON_CONST(msg
), buf
, MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN
);
141 mavlink_cellular_config_t packet
;
142 packet
.enable_lte
= enable_lte
;
143 packet
.enable_pin
= enable_pin
;
144 packet
.roaming
= roaming
;
145 packet
.response
= response
;
146 mav_array_memcpy(packet
.pin
, pin
, sizeof(char)*16);
147 mav_array_memcpy(packet
.new_pin
, new_pin
, sizeof(char)*16);
148 mav_array_memcpy(packet
.apn
, apn
, sizeof(char)*32);
149 mav_array_memcpy(packet
.puk
, puk
, sizeof(char)*16);
150 memcpy(_MAV_PAYLOAD_NON_CONST(msg
), &packet
, MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN
);
153 msg
->msgid
= MAVLINK_MSG_ID_CELLULAR_CONFIG
;
154 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
);
158 * @brief Encode a cellular_config struct
160 * @param system_id ID of this system
161 * @param component_id ID of this component (e.g. 200 for IMU)
162 * @param msg The MAVLink message to compress the data into
163 * @param cellular_config C-struct to read the message contents from
165 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
)
167 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
);
171 * @brief Encode a cellular_config struct on a channel
173 * @param system_id ID of this system
174 * @param component_id ID of this component (e.g. 200 for IMU)
175 * @param chan The MAVLink channel this message will be sent over
176 * @param msg The MAVLink message to compress the data into
177 * @param cellular_config C-struct to read the message contents from
179 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
)
181 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
);
185 * @brief Send a cellular_config message
186 * @param chan MAVLink channel to send the message
188 * @param enable_lte Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response.
189 * @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.
190 * @param pin PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response.
191 * @param new_pin New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response.
192 * @param apn Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response.
193 * @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.
194 * @param roaming Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response.
195 * @param response Message acceptance response (sent back to GS).
197 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
199 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
)
201 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
202 char buf
[MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN
];
203 _mav_put_uint8_t(buf
, 0, enable_lte
);
204 _mav_put_uint8_t(buf
, 1, enable_pin
);
205 _mav_put_uint8_t(buf
, 82, roaming
);
206 _mav_put_uint8_t(buf
, 83, response
);
207 _mav_put_char_array(buf
, 2, pin
, 16);
208 _mav_put_char_array(buf
, 18, new_pin
, 16);
209 _mav_put_char_array(buf
, 34, apn
, 32);
210 _mav_put_char_array(buf
, 66, puk
, 16);
211 _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
);
213 mavlink_cellular_config_t packet
;
214 packet
.enable_lte
= enable_lte
;
215 packet
.enable_pin
= enable_pin
;
216 packet
.roaming
= roaming
;
217 packet
.response
= response
;
218 mav_array_memcpy(packet
.pin
, pin
, sizeof(char)*16);
219 mav_array_memcpy(packet
.new_pin
, new_pin
, sizeof(char)*16);
220 mav_array_memcpy(packet
.apn
, apn
, sizeof(char)*32);
221 mav_array_memcpy(packet
.puk
, puk
, sizeof(char)*16);
222 _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
);
227 * @brief Send a cellular_config message
228 * @param chan MAVLink channel to send the message
229 * @param struct The MAVLink struct to serialize
231 static inline void mavlink_msg_cellular_config_send_struct(mavlink_channel_t chan
, const mavlink_cellular_config_t
* cellular_config
)
233 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
234 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
);
236 _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
);
240 #if MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN <= MAVLINK_MAX_PAYLOAD_LEN
242 This varient of _send() can be used to save stack space by re-using
243 memory from the receive buffer. The caller provides a
244 mavlink_message_t which is the size of a full mavlink message. This
245 is usually the receive buffer for the channel, and allows a reply to an
246 incoming message with minimum stack space usage.
248 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
)
250 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
251 char *buf
= (char *)msgbuf
;
252 _mav_put_uint8_t(buf
, 0, enable_lte
);
253 _mav_put_uint8_t(buf
, 1, enable_pin
);
254 _mav_put_uint8_t(buf
, 82, roaming
);
255 _mav_put_uint8_t(buf
, 83, response
);
256 _mav_put_char_array(buf
, 2, pin
, 16);
257 _mav_put_char_array(buf
, 18, new_pin
, 16);
258 _mav_put_char_array(buf
, 34, apn
, 32);
259 _mav_put_char_array(buf
, 66, puk
, 16);
260 _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
);
262 mavlink_cellular_config_t
*packet
= (mavlink_cellular_config_t
*)msgbuf
;
263 packet
->enable_lte
= enable_lte
;
264 packet
->enable_pin
= enable_pin
;
265 packet
->roaming
= roaming
;
266 packet
->response
= response
;
267 mav_array_memcpy(packet
->pin
, pin
, sizeof(char)*16);
268 mav_array_memcpy(packet
->new_pin
, new_pin
, sizeof(char)*16);
269 mav_array_memcpy(packet
->apn
, apn
, sizeof(char)*32);
270 mav_array_memcpy(packet
->puk
, puk
, sizeof(char)*16);
271 _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
);
278 // MESSAGE CELLULAR_CONFIG UNPACKING
282 * @brief Get field enable_lte from cellular_config message
284 * @return Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response.
286 static inline uint8_t mavlink_msg_cellular_config_get_enable_lte(const mavlink_message_t
* msg
)
288 return _MAV_RETURN_uint8_t(msg
, 0);
292 * @brief Get field enable_pin from cellular_config message
294 * @return Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response.
296 static inline uint8_t mavlink_msg_cellular_config_get_enable_pin(const mavlink_message_t
* msg
)
298 return _MAV_RETURN_uint8_t(msg
, 1);
302 * @brief Get field pin from cellular_config message
304 * @return PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response.
306 static inline uint16_t mavlink_msg_cellular_config_get_pin(const mavlink_message_t
* msg
, char *pin
)
308 return _MAV_RETURN_char_array(msg
, pin
, 16, 2);
312 * @brief Get field new_pin from cellular_config message
314 * @return New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response.
316 static inline uint16_t mavlink_msg_cellular_config_get_new_pin(const mavlink_message_t
* msg
, char *new_pin
)
318 return _MAV_RETURN_char_array(msg
, new_pin
, 16, 18);
322 * @brief Get field apn from cellular_config message
324 * @return Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response.
326 static inline uint16_t mavlink_msg_cellular_config_get_apn(const mavlink_message_t
* msg
, char *apn
)
328 return _MAV_RETURN_char_array(msg
, apn
, 32, 34);
332 * @brief Get field puk from cellular_config message
334 * @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.
336 static inline uint16_t mavlink_msg_cellular_config_get_puk(const mavlink_message_t
* msg
, char *puk
)
338 return _MAV_RETURN_char_array(msg
, puk
, 16, 66);
342 * @brief Get field roaming from cellular_config message
344 * @return Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response.
346 static inline uint8_t mavlink_msg_cellular_config_get_roaming(const mavlink_message_t
* msg
)
348 return _MAV_RETURN_uint8_t(msg
, 82);
352 * @brief Get field response from cellular_config message
354 * @return Message acceptance response (sent back to GS).
356 static inline uint8_t mavlink_msg_cellular_config_get_response(const mavlink_message_t
* msg
)
358 return _MAV_RETURN_uint8_t(msg
, 83);
362 * @brief Decode a cellular_config message into a struct
364 * @param msg The message to decode
365 * @param cellular_config C-struct to decode the message contents into
367 static inline void mavlink_msg_cellular_config_decode(const mavlink_message_t
* msg
, mavlink_cellular_config_t
* cellular_config
)
369 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
370 cellular_config
->enable_lte
= mavlink_msg_cellular_config_get_enable_lte(msg
);
371 cellular_config
->enable_pin
= mavlink_msg_cellular_config_get_enable_pin(msg
);
372 mavlink_msg_cellular_config_get_pin(msg
, cellular_config
->pin
);
373 mavlink_msg_cellular_config_get_new_pin(msg
, cellular_config
->new_pin
);
374 mavlink_msg_cellular_config_get_apn(msg
, cellular_config
->apn
);
375 mavlink_msg_cellular_config_get_puk(msg
, cellular_config
->puk
);
376 cellular_config
->roaming
= mavlink_msg_cellular_config_get_roaming(msg
);
377 cellular_config
->response
= mavlink_msg_cellular_config_get_response(msg
);
379 uint8_t len
= msg
->len
< MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN
? msg
->len
: MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN
;
380 memset(cellular_config
, 0, MAVLINK_MSG_ID_CELLULAR_CONFIG_LEN
);
381 memcpy(cellular_config
, _MAV_PAYLOAD(msg
), len
);