4#define MAVLINK_MSG_ID_AUTH_KEY 7
11#define MAVLINK_MSG_ID_AUTH_KEY_LEN 32
12#define MAVLINK_MSG_ID_AUTH_KEY_MIN_LEN 32
13#define MAVLINK_MSG_ID_7_LEN 32
14#define MAVLINK_MSG_ID_7_MIN_LEN 32
16#define MAVLINK_MSG_ID_AUTH_KEY_CRC 119
17#define MAVLINK_MSG_ID_7_CRC 119
19#define MAVLINK_MSG_AUTH_KEY_FIELD_KEY_LEN 32
21#if MAVLINK_COMMAND_24BIT
22#define MAVLINK_MESSAGE_INFO_AUTH_KEY {
26 { { "key", NULL, MAVLINK_TYPE_CHAR, 32
, 0
, offsetof(mavlink_auth_key_t, key) },
28}
30#define MAVLINK_MESSAGE_INFO_AUTH_KEY {
33 { { "key", NULL, MAVLINK_TYPE_CHAR, 32
, 0
, offsetof(mavlink_auth_key_t, key) },
35}
39
40
41
42
43
44
45
46
47static inline uint16_t mavlink_msg_auth_key_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
50#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
53 _mav_put_char_array(buf, 0, key, 32);
56 mavlink_auth_key_t packet;
58 mav_array_memcpy(packet.key, key,
sizeof(
char)*32);
59 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AUTH_KEY_LEN);
67
68
69
70
71
72
73
74
75
76static inline uint16_t mavlink_msg_auth_key_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
79#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
82 _mav_put_char_array(buf, 0, key, 32);
85 mavlink_auth_key_t packet;
87 mav_array_memcpy(packet.key, key,
sizeof(
char)*32);
88 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AUTH_KEY_LEN);
93 return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_AUTH_KEY_MIN_LEN, MAVLINK_MSG_ID_AUTH_KEY_LEN, MAVLINK_MSG_ID_AUTH_KEY_CRC);
100
101
102
103
104
105
106
107
108static inline uint16_t mavlink_msg_auth_key_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
109 mavlink_message_t* msg,
112#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
115 _mav_put_char_array(buf, 0, key, 32);
118 mavlink_auth_key_t packet;
120 mav_array_memcpy(packet.key, key,
sizeof(
char)*32);
121 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_AUTH_KEY_LEN);
129
130
131
132
133
134
135
136static inline uint16_t mavlink_msg_auth_key_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_auth_key_t* auth_key)
138 return mavlink_msg_auth_key_pack(system_id, component_id, msg, auth_key->key);
142
143
144
145
146
147
148
149
150static inline uint16_t mavlink_msg_auth_key_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_auth_key_t* auth_key)
152 return mavlink_msg_auth_key_pack_chan(system_id, component_id, chan, msg, auth_key->key);
156
157
158
159
160
161
162
163
164static inline uint16_t mavlink_msg_auth_key_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg,
const mavlink_auth_key_t* auth_key)
166 return mavlink_msg_auth_key_pack_status(system_id, component_id, _status, msg, auth_key->key);
170
171
172
173
174
175#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
177static inline void mavlink_msg_auth_key_send(mavlink_channel_t chan,
const char *key)
179#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
180 char buf[MAVLINK_MSG_ID_AUTH_KEY_LEN];
182 _mav_put_char_array(buf, 0, key, 32);
183 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AUTH_KEY, buf, MAVLINK_MSG_ID_AUTH_KEY_MIN_LEN, MAVLINK_MSG_ID_AUTH_KEY_LEN, MAVLINK_MSG_ID_AUTH_KEY_CRC);
185 mavlink_auth_key_t packet;
187 mav_array_memcpy(packet.key, key,
sizeof(
char)*32);
188 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AUTH_KEY, (
const char *)&packet, MAVLINK_MSG_ID_AUTH_KEY_MIN_LEN, MAVLINK_MSG_ID_AUTH_KEY_LEN, MAVLINK_MSG_ID_AUTH_KEY_CRC);
193
194
195
196
197static inline void mavlink_msg_auth_key_send_struct(mavlink_channel_t chan,
const mavlink_auth_key_t* auth_key)
199#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
200 mavlink_msg_auth_key_send(chan, auth_key->key);
202 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AUTH_KEY, (
const char *)auth_key, MAVLINK_MSG_ID_AUTH_KEY_MIN_LEN, MAVLINK_MSG_ID_AUTH_KEY_LEN, MAVLINK_MSG_ID_AUTH_KEY_CRC);
206#if MAVLINK_MSG_ID_AUTH_KEY_LEN <= MAVLINK_MAX_PAYLOAD_LEN
208
209
210
211
212
213
214static inline void mavlink_msg_auth_key_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan,
const char *key)
216#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
217 char *buf = (
char *)msgbuf;
219 _mav_put_char_array(buf, 0, key, 32);
220 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AUTH_KEY, buf, MAVLINK_MSG_ID_AUTH_KEY_MIN_LEN, MAVLINK_MSG_ID_AUTH_KEY_LEN, MAVLINK_MSG_ID_AUTH_KEY_CRC);
222 mavlink_auth_key_t *packet = (mavlink_auth_key_t *)msgbuf;
224 mav_array_memcpy(packet->key, key,
sizeof(
char)*32);
225 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_AUTH_KEY, (
const char *)packet, MAVLINK_MSG_ID_AUTH_KEY_MIN_LEN, MAVLINK_MSG_ID_AUTH_KEY_LEN, MAVLINK_MSG_ID_AUTH_KEY_CRC);
236
237
238
239
240static inline uint16_t mavlink_msg_auth_key_get_key(
const mavlink_message_t* msg,
char *key)
242 return _MAV_RETURN_char_array(msg, key, 32, 0);
246
247
248
249
250
251static inline void mavlink_msg_auth_key_decode(
const mavlink_message_t* msg, mavlink_auth_key_t* auth_key)
253#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
254 mavlink_msg_auth_key_get_key(msg, auth_key->key);
256 uint8_t len = msg->len < MAVLINK_MSG_ID_AUTH_KEY_LEN? msg->len : MAVLINK_MSG_ID_AUTH_KEY_LEN;
257 memset(auth_key, 0, MAVLINK_MSG_ID_AUTH_KEY_LEN);
258 memcpy(auth_key, _MAV_PAYLOAD(msg), len);
#define MAVLINK_MSG_ID_AUTH_KEY_MIN_LEN
Definition: mavlink_msg_auth_key.h:12
#define MAVLINK_MSG_ID_AUTH_KEY_LEN
Definition: mavlink_msg_auth_key.h:11
#define MAVLINK_MSG_ID_AUTH_KEY_CRC
Definition: mavlink_msg_auth_key.h:16
#define MAVLINK_MSG_ID_AUTH_KEY
Definition: mavlink_msg_auth_key.h:4
Definition: mavlink_msg_auth_key.h:7
char key[32]
Definition: mavlink_msg_auth_key.h:8