NinjaFlight
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
mavlink_msg_serial_udb_extra_f16.h
Go to the documentation of this file.
1 // MESSAGE SERIAL_UDB_EXTRA_F16 PACKING
2 
3 #define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16 180
4 
6 {
7  uint8_t sue_ID_LEAD_PILOT[40];
8  uint8_t sue_ID_DIY_DRONES_URL[70];
10 
11 #define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_LEN 110
12 #define MAVLINK_MSG_ID_180_LEN 110
13 
14 #define MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_CRC 222
15 #define MAVLINK_MSG_ID_180_CRC 222
16 
17 #define MAVLINK_MSG_SERIAL_UDB_EXTRA_F16_FIELD_SUE_ID_LEAD_PILOT_LEN 40
18 #define MAVLINK_MSG_SERIAL_UDB_EXTRA_F16_FIELD_SUE_ID_DIY_DRONES_URL_LEN 70
19 
20 #define MAVLINK_MESSAGE_INFO_SERIAL_UDB_EXTRA_F16 { \
21  "SERIAL_UDB_EXTRA_F16", \
22  2, \
23  { { "sue_ID_LEAD_PILOT", NULL, MAVLINK_TYPE_UINT8_T, 40, 0, offsetof(mavlink_serial_udb_extra_f16_t, sue_ID_LEAD_PILOT) }, \
24  { "sue_ID_DIY_DRONES_URL", NULL, MAVLINK_TYPE_UINT8_T, 70, 40, offsetof(mavlink_serial_udb_extra_f16_t, sue_ID_DIY_DRONES_URL) }, \
25  } \
26 }
27 
28 
39 static inline uint16_t mavlink_msg_serial_udb_extra_f16_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
40  const uint8_t *sue_ID_LEAD_PILOT, const uint8_t *sue_ID_DIY_DRONES_URL)
41 {
42 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
44 
45  _mav_put_uint8_t_array(buf, 0, sue_ID_LEAD_PILOT, 40);
46  _mav_put_uint8_t_array(buf, 40, sue_ID_DIY_DRONES_URL, 70);
48 #else
50 
51  mav_array_memcpy(packet.sue_ID_LEAD_PILOT, sue_ID_LEAD_PILOT, sizeof(uint8_t)*40);
52  mav_array_memcpy(packet.sue_ID_DIY_DRONES_URL, sue_ID_DIY_DRONES_URL, sizeof(uint8_t)*70);
54 #endif
55 
57 #if MAVLINK_CRC_EXTRA
59 #else
60  return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_LEN);
61 #endif
62 }
63 
74 static inline uint16_t mavlink_msg_serial_udb_extra_f16_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
75  mavlink_message_t* msg,
76  const uint8_t *sue_ID_LEAD_PILOT,const uint8_t *sue_ID_DIY_DRONES_URL)
77 {
78 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
80 
81  _mav_put_uint8_t_array(buf, 0, sue_ID_LEAD_PILOT, 40);
82  _mav_put_uint8_t_array(buf, 40, sue_ID_DIY_DRONES_URL, 70);
84 #else
86 
87  mav_array_memcpy(packet.sue_ID_LEAD_PILOT, sue_ID_LEAD_PILOT, sizeof(uint8_t)*40);
88  mav_array_memcpy(packet.sue_ID_DIY_DRONES_URL, sue_ID_DIY_DRONES_URL, sizeof(uint8_t)*70);
90 #endif
91 
93 #if MAVLINK_CRC_EXTRA
95 #else
96  return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_LEN);
97 #endif
98 }
99 
108 static inline uint16_t mavlink_msg_serial_udb_extra_f16_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_serial_udb_extra_f16_t* serial_udb_extra_f16)
109 {
110  return mavlink_msg_serial_udb_extra_f16_pack(system_id, component_id, msg, serial_udb_extra_f16->sue_ID_LEAD_PILOT, serial_udb_extra_f16->sue_ID_DIY_DRONES_URL);
111 }
112 
122 static inline uint16_t mavlink_msg_serial_udb_extra_f16_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_serial_udb_extra_f16_t* serial_udb_extra_f16)
123 {
124  return mavlink_msg_serial_udb_extra_f16_pack_chan(system_id, component_id, chan, msg, serial_udb_extra_f16->sue_ID_LEAD_PILOT, serial_udb_extra_f16->sue_ID_DIY_DRONES_URL);
125 }
126 
134 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
135 
136 static inline void mavlink_msg_serial_udb_extra_f16_send(mavlink_channel_t chan, const uint8_t *sue_ID_LEAD_PILOT, const uint8_t *sue_ID_DIY_DRONES_URL)
137 {
138 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
140 
141  _mav_put_uint8_t_array(buf, 0, sue_ID_LEAD_PILOT, 40);
142  _mav_put_uint8_t_array(buf, 40, sue_ID_DIY_DRONES_URL, 70);
143 #if MAVLINK_CRC_EXTRA
145 #else
146  _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16, buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_LEN);
147 #endif
148 #else
150 
151  mav_array_memcpy(packet.sue_ID_LEAD_PILOT, sue_ID_LEAD_PILOT, sizeof(uint8_t)*40);
152  mav_array_memcpy(packet.sue_ID_DIY_DRONES_URL, sue_ID_DIY_DRONES_URL, sizeof(uint8_t)*70);
153 #if MAVLINK_CRC_EXTRA
155 #else
156  _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16, (const char *)&packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_LEN);
157 #endif
158 #endif
159 }
160 
161 #if MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_LEN <= MAVLINK_MAX_PAYLOAD_LEN
162 /*
163  This varient of _send() can be used to save stack space by re-using
164  memory from the receive buffer. The caller provides a
165  mavlink_message_t which is the size of a full mavlink message. This
166  is usually the receive buffer for the channel, and allows a reply to an
167  incoming message with minimum stack space usage.
168  */
169 static inline void mavlink_msg_serial_udb_extra_f16_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, const uint8_t *sue_ID_LEAD_PILOT, const uint8_t *sue_ID_DIY_DRONES_URL)
170 {
171 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
172  char *buf = (char *)msgbuf;
173 
174  _mav_put_uint8_t_array(buf, 0, sue_ID_LEAD_PILOT, 40);
175  _mav_put_uint8_t_array(buf, 40, sue_ID_DIY_DRONES_URL, 70);
176 #if MAVLINK_CRC_EXTRA
178 #else
179  _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16, buf, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_LEN);
180 #endif
181 #else
183 
184  mav_array_memcpy(packet->sue_ID_LEAD_PILOT, sue_ID_LEAD_PILOT, sizeof(uint8_t)*40);
185  mav_array_memcpy(packet->sue_ID_DIY_DRONES_URL, sue_ID_DIY_DRONES_URL, sizeof(uint8_t)*70);
186 #if MAVLINK_CRC_EXTRA
188 #else
189  _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16, (const char *)packet, MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_LEN);
190 #endif
191 #endif
192 }
193 #endif
194 
195 #endif
196 
197 // MESSAGE SERIAL_UDB_EXTRA_F16 UNPACKING
198 
199 
205 static inline uint16_t mavlink_msg_serial_udb_extra_f16_get_sue_ID_LEAD_PILOT(const mavlink_message_t* msg, uint8_t *sue_ID_LEAD_PILOT)
206 {
207  return _MAV_RETURN_uint8_t_array(msg, sue_ID_LEAD_PILOT, 40, 0);
208 }
209 
215 static inline uint16_t mavlink_msg_serial_udb_extra_f16_get_sue_ID_DIY_DRONES_URL(const mavlink_message_t* msg, uint8_t *sue_ID_DIY_DRONES_URL)
216 {
217  return _MAV_RETURN_uint8_t_array(msg, sue_ID_DIY_DRONES_URL, 70, 40);
218 }
219 
226 static inline void mavlink_msg_serial_udb_extra_f16_decode(const mavlink_message_t* msg, mavlink_serial_udb_extra_f16_t* serial_udb_extra_f16)
227 {
228 #if MAVLINK_NEED_BYTE_SWAP
229  mavlink_msg_serial_udb_extra_f16_get_sue_ID_LEAD_PILOT(msg, serial_udb_extra_f16->sue_ID_LEAD_PILOT);
230  mavlink_msg_serial_udb_extra_f16_get_sue_ID_DIY_DRONES_URL(msg, serial_udb_extra_f16->sue_ID_DIY_DRONES_URL);
231 #else
232  memcpy(serial_udb_extra_f16, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_SERIAL_UDB_EXTRA_F16_LEN);
233 #endif
234 }