3 #define MAVLINK_MSG_ID_ENCAPSULATED_DATA 131
11 #define MAVLINK_MSG_ID_ENCAPSULATED_DATA_LEN 255
12 #define MAVLINK_MSG_ID_131_LEN 255
14 #define MAVLINK_MSG_ID_ENCAPSULATED_DATA_CRC 223
15 #define MAVLINK_MSG_ID_131_CRC 223
17 #define MAVLINK_MSG_ENCAPSULATED_DATA_FIELD_DATA_LEN 253
19 #define MAVLINK_MESSAGE_INFO_ENCAPSULATED_DATA { \
20 "ENCAPSULATED_DATA", \
22 { { "seqnr", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_encapsulated_data_t, seqnr) }, \
23 { "data", NULL, MAVLINK_TYPE_UINT8_T, 253, 2, offsetof(mavlink_encapsulated_data_t, data) }, \
38 static inline uint16_t mavlink_msg_encapsulated_data_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
39 uint16_t seqnr,
const uint8_t *
data)
41 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
44 _mav_put_uint8_t_array(buf, 2, data, 253);
49 mav_array_memcpy(packet.
data, data,
sizeof(uint8_t)*253);
71 static inline uint16_t mavlink_msg_encapsulated_data_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
72 mavlink_message_t* msg,
73 uint16_t seqnr,
const uint8_t *
data)
75 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
78 _mav_put_uint8_t_array(buf, 2, data, 253);
83 mav_array_memcpy(packet.
data, data,
sizeof(uint8_t)*253);
103 static inline uint16_t mavlink_msg_encapsulated_data_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_encapsulated_data_t* encapsulated_data)
105 return mavlink_msg_encapsulated_data_pack(system_id, component_id, msg, encapsulated_data->
seqnr, encapsulated_data->
data);
117 static inline uint16_t mavlink_msg_encapsulated_data_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_encapsulated_data_t* encapsulated_data)
119 return mavlink_msg_encapsulated_data_pack_chan(system_id, component_id, chan, msg, encapsulated_data->
seqnr, encapsulated_data->
data);
129 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
131 static inline void mavlink_msg_encapsulated_data_send(
mavlink_channel_t chan, uint16_t seqnr,
const uint8_t *data)
133 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
136 _mav_put_uint8_t_array(buf, 2, data, 253);
137 #if MAVLINK_CRC_EXTRA
144 packet.
seqnr = seqnr;
145 mav_array_memcpy(packet.
data, data,
sizeof(uint8_t)*253);
146 #if MAVLINK_CRC_EXTRA
154 #if MAVLINK_MSG_ID_ENCAPSULATED_DATA_LEN <= MAVLINK_MAX_PAYLOAD_LEN
162 static inline void mavlink_msg_encapsulated_data_send_buf(mavlink_message_t *msgbuf,
mavlink_channel_t chan, uint16_t seqnr,
const uint8_t *data)
164 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
165 char *buf = (
char *)msgbuf;
167 _mav_put_uint8_t_array(buf, 2, data, 253);
168 #if MAVLINK_CRC_EXTRA
175 packet->
seqnr = seqnr;
176 mav_array_memcpy(packet->
data, data,
sizeof(uint8_t)*253);
177 #if MAVLINK_CRC_EXTRA
196 static inline uint16_t mavlink_msg_encapsulated_data_get_seqnr(
const mavlink_message_t* msg)
198 return _MAV_RETURN_uint16_t(msg, 0);
206 static inline uint16_t mavlink_msg_encapsulated_data_get_data(
const mavlink_message_t* msg, uint8_t *data)
208 return _MAV_RETURN_uint8_t_array(msg, data, 253, 2);
217 static inline void mavlink_msg_encapsulated_data_decode(
const mavlink_message_t* msg,
mavlink_encapsulated_data_t* encapsulated_data)
219 #if MAVLINK_NEED_BYTE_SWAP
220 encapsulated_data->
seqnr = mavlink_msg_encapsulated_data_get_seqnr(msg);
221 mavlink_msg_encapsulated_data_get_data(msg, encapsulated_data->
data);
struct __mavlink_encapsulated_data_t mavlink_encapsulated_data_t
#define MAVLINK_MSG_ID_ENCAPSULATED_DATA_LEN
Definition: mavlink_msg_encapsulated_data.h:11
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
#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
uint8_t data[253]
image data bytes
Definition: mavlink_msg_encapsulated_data.h:8
#define MAVLINK_MSG_ID_ENCAPSULATED_DATA_CRC
Definition: mavlink_msg_encapsulated_data.h:14
Definition: mavlink_msg_encapsulated_data.h:5
#define MAVLINK_MSG_ID_ENCAPSULATED_DATA
Definition: mavlink_msg_encapsulated_data.h:3
#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
uint16_t data
Definition: config.c:91
uint16_t seqnr
sequence number (starting with 0 on every transmission)
Definition: mavlink_msg_encapsulated_data.h:7