3 #define MAVLINK_MSG_ID_DATA16 169
12 #define MAVLINK_MSG_ID_DATA16_LEN 18
13 #define MAVLINK_MSG_ID_169_LEN 18
15 #define MAVLINK_MSG_ID_DATA16_CRC 234
16 #define MAVLINK_MSG_ID_169_CRC 234
18 #define MAVLINK_MSG_DATA16_FIELD_DATA_LEN 16
20 #define MAVLINK_MESSAGE_INFO_DATA16 { \
23 { { "type", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_data16_t, type) }, \
24 { "len", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_data16_t, len) }, \
25 { "data", NULL, MAVLINK_TYPE_UINT8_T, 16, 2, offsetof(mavlink_data16_t, data) }, \
41 static inline uint16_t mavlink_msg_data16_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
42 uint8_t
type, uint8_t len,
const uint8_t *
data)
44 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
48 _mav_put_uint8_t_array(buf, 2, data, 16);
54 mav_array_memcpy(packet.
data, data,
sizeof(uint8_t)*16);
77 static inline uint16_t mavlink_msg_data16_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
78 mavlink_message_t* msg,
79 uint8_t
type,uint8_t len,
const uint8_t *
data)
81 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
85 _mav_put_uint8_t_array(buf, 2, data, 16);
91 mav_array_memcpy(packet.
data, data,
sizeof(uint8_t)*16);
111 static inline uint16_t mavlink_msg_data16_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_data16_t* data16)
113 return mavlink_msg_data16_pack(system_id, component_id, msg, data16->
type, data16->
len, data16->
data);
125 static inline uint16_t mavlink_msg_data16_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_data16_t* data16)
127 return mavlink_msg_data16_pack_chan(system_id, component_id, chan, msg, data16->
type, data16->
len, data16->
data);
138 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
140 static inline void mavlink_msg_data16_send(
mavlink_channel_t chan, uint8_t type, uint8_t len,
const uint8_t *data)
142 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
146 _mav_put_uint8_t_array(buf, 2, data, 16);
147 #if MAVLINK_CRC_EXTRA
156 mav_array_memcpy(packet.
data, data,
sizeof(uint8_t)*16);
157 #if MAVLINK_CRC_EXTRA
165 #if MAVLINK_MSG_ID_DATA16_LEN <= MAVLINK_MAX_PAYLOAD_LEN
173 static inline void mavlink_msg_data16_send_buf(mavlink_message_t *msgbuf,
mavlink_channel_t chan, uint8_t type, uint8_t len,
const uint8_t *data)
175 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
176 char *buf = (
char *)msgbuf;
179 _mav_put_uint8_t_array(buf, 2, data, 16);
180 #if MAVLINK_CRC_EXTRA
189 mav_array_memcpy(packet->
data, data,
sizeof(uint8_t)*16);
190 #if MAVLINK_CRC_EXTRA
209 static inline uint8_t mavlink_msg_data16_get_type(
const mavlink_message_t* msg)
219 static inline uint8_t mavlink_msg_data16_get_len(
const mavlink_message_t* msg)
229 static inline uint16_t mavlink_msg_data16_get_data(
const mavlink_message_t* msg, uint8_t *data)
231 return _MAV_RETURN_uint8_t_array(msg, data, 16, 2);
240 static inline void mavlink_msg_data16_decode(
const mavlink_message_t* msg,
mavlink_data16_t* data16)
242 #if MAVLINK_NEED_BYTE_SWAP
243 data16->
type = mavlink_msg_data16_get_type(msg);
244 data16->
len = mavlink_msg_data16_get_len(msg);
245 mavlink_msg_data16_get_data(msg, data16->
data);
#define MAVLINK_MSG_ID_DATA16_CRC
Definition: mavlink_msg_data16.h:15
uint8_t type
Definition: fat_standard.h:67
#define _MAV_RETURN_uint8_t(msg, wire_offset)
Definition: protocol.h:238
struct __mavlink_data16_t mavlink_data16_t
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_put_uint8_t(buf, wire_offset, b)
Definition: protocol.h:134
uint8_t len
data length
Definition: mavlink_msg_data16.h:8
#define _MAV_PAYLOAD_NON_CONST(msg)
Definition: mavlink_types.h:172
mavlink_channel_t
Definition: mavlink_types.h:178
Definition: mavlink_msg_data16.h:5
#define MAVLINK_MSG_ID_DATA16
Definition: mavlink_msg_data16.h:3
#define _MAV_PAYLOAD(msg)
Definition: mavlink_types.h:171
#define MAVLINK_MSG_ID_DATA16_LEN
Definition: mavlink_msg_data16.h:12
uint8_t data[16]
raw data
Definition: mavlink_msg_data16.h:9
uint8_t type
data type
Definition: mavlink_msg_data16.h:7
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