3 #define MAVLINK_MSG_ID_V2_EXTENSION 248
14 #define MAVLINK_MSG_ID_V2_EXTENSION_LEN 254
15 #define MAVLINK_MSG_ID_248_LEN 254
17 #define MAVLINK_MSG_ID_V2_EXTENSION_CRC 8
18 #define MAVLINK_MSG_ID_248_CRC 8
20 #define MAVLINK_MSG_V2_EXTENSION_FIELD_PAYLOAD_LEN 249
22 #define MAVLINK_MESSAGE_INFO_V2_EXTENSION { \
25 { { "message_type", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_v2_extension_t, message_type) }, \
26 { "target_network", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_v2_extension_t, target_network) }, \
27 { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_v2_extension_t, target_system) }, \
28 { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_v2_extension_t, target_component) }, \
29 { "payload", NULL, MAVLINK_TYPE_UINT8_T, 249, 5, offsetof(mavlink_v2_extension_t, payload) }, \
47 static inline uint16_t mavlink_msg_v2_extension_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
48 uint8_t target_network, uint8_t target_system, uint8_t target_component, uint16_t message_type,
const uint8_t *payload)
50 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
56 _mav_put_uint8_t_array(buf, 5, payload, 249);
64 mav_array_memcpy(packet.
payload, payload,
sizeof(uint8_t)*249);
89 static inline uint16_t mavlink_msg_v2_extension_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
90 mavlink_message_t* msg,
91 uint8_t target_network,uint8_t target_system,uint8_t target_component,uint16_t message_type,
const uint8_t *payload)
93 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
99 _mav_put_uint8_t_array(buf, 5, payload, 249);
107 mav_array_memcpy(packet.
payload, payload,
sizeof(uint8_t)*249);
112 #if MAVLINK_CRC_EXTRA
127 static inline uint16_t mavlink_msg_v2_extension_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_v2_extension_t* v2_extension)
141 static inline uint16_t mavlink_msg_v2_extension_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_v2_extension_t* v2_extension)
156 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
158 static inline void mavlink_msg_v2_extension_send(
mavlink_channel_t chan, uint8_t target_network, uint8_t target_system, uint8_t target_component, uint16_t message_type,
const uint8_t *payload)
160 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
166 _mav_put_uint8_t_array(buf, 5, payload, 249);
167 #if MAVLINK_CRC_EXTRA
178 mav_array_memcpy(packet.
payload, payload,
sizeof(uint8_t)*249);
179 #if MAVLINK_CRC_EXTRA
187 #if MAVLINK_MSG_ID_V2_EXTENSION_LEN <= MAVLINK_MAX_PAYLOAD_LEN
195 static inline void mavlink_msg_v2_extension_send_buf(mavlink_message_t *msgbuf,
mavlink_channel_t chan, uint8_t target_network, uint8_t target_system, uint8_t target_component, uint16_t message_type,
const uint8_t *payload)
197 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
198 char *buf = (
char *)msgbuf;
203 _mav_put_uint8_t_array(buf, 5, payload, 249);
204 #if MAVLINK_CRC_EXTRA
215 mav_array_memcpy(packet->
payload, payload,
sizeof(uint8_t)*249);
216 #if MAVLINK_CRC_EXTRA
235 static inline uint8_t mavlink_msg_v2_extension_get_target_network(
const mavlink_message_t* msg)
245 static inline uint8_t mavlink_msg_v2_extension_get_target_system(
const mavlink_message_t* msg)
255 static inline uint8_t mavlink_msg_v2_extension_get_target_component(
const mavlink_message_t* msg)
265 static inline uint16_t mavlink_msg_v2_extension_get_message_type(
const mavlink_message_t* msg)
267 return _MAV_RETURN_uint16_t(msg, 0);
275 static inline uint16_t mavlink_msg_v2_extension_get_payload(
const mavlink_message_t* msg, uint8_t *payload)
277 return _MAV_RETURN_uint8_t_array(msg, payload, 249, 5);
286 static inline void mavlink_msg_v2_extension_decode(
const mavlink_message_t* msg,
mavlink_v2_extension_t* v2_extension)
288 #if MAVLINK_NEED_BYTE_SWAP
289 v2_extension->
message_type = mavlink_msg_v2_extension_get_message_type(msg);
290 v2_extension->
target_network = mavlink_msg_v2_extension_get_target_network(msg);
291 v2_extension->
target_system = mavlink_msg_v2_extension_get_target_system(msg);
292 v2_extension->
target_component = mavlink_msg_v2_extension_get_target_component(msg);
293 mavlink_msg_v2_extension_get_payload(msg, v2_extension->
payload);
#define _MAV_RETURN_uint8_t(msg, wire_offset)
Definition: protocol.h:238
MAVLINK_HELPER uint16_t mavlink_finalize_message(mavlink_message_t *msg, uint8_t system_id, uint8_t component_id, uint8_t length)
Finalize a MAVLink message with MAVLINK_COMM_0 as default channel.
Definition: mavlink_helpers.h:105
uint8_t payload[249]
Variable length payload. The length is defined by the remaining message length when subtracting the h...
Definition: mavlink_msg_v2_extension.h:11
#define _mav_put_uint8_t(buf, wire_offset, b)
Definition: protocol.h:134
#define _MAV_PAYLOAD_NON_CONST(msg)
Definition: mavlink_types.h:172
mavlink_channel_t
Definition: mavlink_types.h:178
#define _MAV_PAYLOAD(msg)
Definition: mavlink_types.h:171
#define MAVLINK_MSG_ID_V2_EXTENSION_CRC
Definition: mavlink_msg_v2_extension.h:17
uint8_t target_component
Component ID (0 for broadcast)
Definition: mavlink_msg_v2_extension.h:10
#define MAVLINK_MSG_ID_V2_EXTENSION
Definition: mavlink_msg_v2_extension.h:3
uint8_t target_network
Network ID (0 for broadcast)
Definition: mavlink_msg_v2_extension.h:8
struct __mavlink_v2_extension_t mavlink_v2_extension_t
#define MAVLINK_MSG_ID_V2_EXTENSION_LEN
Definition: mavlink_msg_v2_extension.h:14
Definition: mavlink_msg_v2_extension.h:5
#define _mav_put_uint16_t(buf, wire_offset, b)
Definition: protocol.h:139
MAVLINK_HELPER uint16_t mavlink_finalize_message_chan(mavlink_message_t *msg, uint8_t system_id, uint8_t component_id, uint8_t chan, uint8_t length)
Finalize a MAVLink message with channel assignment.
Definition: mavlink_helpers.h:71
uint8_t target_system
System ID (0 for broadcast)
Definition: mavlink_msg_v2_extension.h:9
uint16_t message_type
A code that identifies the software component that understands this message (analogous to usb device ...
Definition: mavlink_msg_v2_extension.h:7