4#define MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION 152
7typedef struct __mavlink_flexifunction_buffer_function_t {
10 uint16_t data_address;
12 uint8_t target_system;
13 uint8_t target_component;
15}) mavlink_flexifunction_buffer_function_t;
17#define MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_LEN 58
18#define MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_MIN_LEN 58
19#define MAVLINK_MSG_ID_152_LEN 58
20#define MAVLINK_MSG_ID_152_MIN_LEN 58
22#define MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_CRC 101
23#define MAVLINK_MSG_ID_152_CRC 101
25#define MAVLINK_MSG_FLEXIFUNCTION_BUFFER_FUNCTION_FIELD_DATA_LEN 48
27#if MAVLINK_COMMAND_24BIT
28#define MAVLINK_MESSAGE_INFO_FLEXIFUNCTION_BUFFER_FUNCTION { \
30 "FLEXIFUNCTION_BUFFER_FUNCTION", \
32 { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_flexifunction_buffer_function_t, target_system) }, \
33 { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 9, offsetof(mavlink_flexifunction_buffer_function_t, target_component) }, \
34 { "func_index", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_flexifunction_buffer_function_t, func_index) }, \
35 { "func_count", NULL, MAVLINK_TYPE_UINT16_T, 0, 2, offsetof(mavlink_flexifunction_buffer_function_t, func_count) }, \
36 { "data_address", NULL, MAVLINK_TYPE_UINT16_T, 0, 4, offsetof(mavlink_flexifunction_buffer_function_t, data_address) }, \
37 { "data_size", NULL, MAVLINK_TYPE_UINT16_T, 0, 6, offsetof(mavlink_flexifunction_buffer_function_t, data_size) }, \
38 { "data", NULL, MAVLINK_TYPE_INT8_T, 48, 10, offsetof(mavlink_flexifunction_buffer_function_t, data) }, \
42#define MAVLINK_MESSAGE_INFO_FLEXIFUNCTION_BUFFER_FUNCTION { \
43 "FLEXIFUNCTION_BUFFER_FUNCTION", \
45 { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 8, offsetof(mavlink_flexifunction_buffer_function_t, target_system) }, \
46 { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 9, offsetof(mavlink_flexifunction_buffer_function_t, target_component) }, \
47 { "func_index", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_flexifunction_buffer_function_t, func_index) }, \
48 { "func_count", NULL, MAVLINK_TYPE_UINT16_T, 0, 2, offsetof(mavlink_flexifunction_buffer_function_t, func_count) }, \
49 { "data_address", NULL, MAVLINK_TYPE_UINT16_T, 0, 4, offsetof(mavlink_flexifunction_buffer_function_t, data_address) }, \
50 { "data_size", NULL, MAVLINK_TYPE_UINT16_T, 0, 6, offsetof(mavlink_flexifunction_buffer_function_t, data_size) }, \
51 { "data", NULL, MAVLINK_TYPE_INT8_T, 48, 10, offsetof(mavlink_flexifunction_buffer_function_t, data) }, \
71static inline uint16_t mavlink_msg_flexifunction_buffer_function_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
72 uint8_t target_system, uint8_t target_component, uint16_t func_index, uint16_t func_count, uint16_t data_address, uint16_t data_size,
const int8_t *data)
74#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
75 char buf[MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_LEN];
76 _mav_put_uint16_t(buf, 0, func_index);
77 _mav_put_uint16_t(buf, 2, func_count);
78 _mav_put_uint16_t(buf, 4, data_address);
79 _mav_put_uint16_t(buf, 6, data_size);
80 _mav_put_uint8_t(buf, 8, target_system);
81 _mav_put_uint8_t(buf, 9, target_component);
82 _mav_put_int8_t_array(buf, 10, data, 48);
83 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_LEN);
85 mavlink_flexifunction_buffer_function_t packet;
86 packet.func_index = func_index;
87 packet.func_count = func_count;
88 packet.data_address = data_address;
89 packet.data_size = data_size;
90 packet.target_system = target_system;
91 packet.target_component = target_component;
92 mav_array_memcpy(packet.data, data,
sizeof(int8_t)*48);
93 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_LEN);
96 msg->msgid = MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION;
97 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_CRC);
115static inline uint16_t mavlink_msg_flexifunction_buffer_function_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
116 mavlink_message_t* msg,
117 uint8_t target_system,uint8_t target_component,uint16_t func_index,uint16_t func_count,uint16_t data_address,uint16_t data_size,
const int8_t *data)
119#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
120 char buf[MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_LEN];
121 _mav_put_uint16_t(buf, 0, func_index);
122 _mav_put_uint16_t(buf, 2, func_count);
123 _mav_put_uint16_t(buf, 4, data_address);
124 _mav_put_uint16_t(buf, 6, data_size);
125 _mav_put_uint8_t(buf, 8, target_system);
126 _mav_put_uint8_t(buf, 9, target_component);
127 _mav_put_int8_t_array(buf, 10, data, 48);
128 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_LEN);
130 mavlink_flexifunction_buffer_function_t packet;
131 packet.func_index = func_index;
132 packet.func_count = func_count;
133 packet.data_address = data_address;
134 packet.data_size = data_size;
135 packet.target_system = target_system;
136 packet.target_component = target_component;
137 mav_array_memcpy(packet.data, data,
sizeof(int8_t)*48);
138 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_LEN);
141 msg->msgid = MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION;
142 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_CRC);
153static inline uint16_t mavlink_msg_flexifunction_buffer_function_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_flexifunction_buffer_function_t* flexifunction_buffer_function)
155 return mavlink_msg_flexifunction_buffer_function_pack(system_id, component_id, msg, flexifunction_buffer_function->target_system, flexifunction_buffer_function->target_component, flexifunction_buffer_function->func_index, flexifunction_buffer_function->func_count, flexifunction_buffer_function->data_address, flexifunction_buffer_function->data_size, flexifunction_buffer_function->data);
167static inline uint16_t mavlink_msg_flexifunction_buffer_function_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_flexifunction_buffer_function_t* flexifunction_buffer_function)
169 return mavlink_msg_flexifunction_buffer_function_pack_chan(system_id, component_id, chan, msg, flexifunction_buffer_function->target_system, flexifunction_buffer_function->target_component, flexifunction_buffer_function->func_index, flexifunction_buffer_function->func_count, flexifunction_buffer_function->data_address, flexifunction_buffer_function->data_size, flexifunction_buffer_function->data);
184#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
186static inline void mavlink_msg_flexifunction_buffer_function_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t func_index, uint16_t func_count, uint16_t data_address, uint16_t data_size,
const int8_t *data)
188#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
189 char buf[MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_LEN];
190 _mav_put_uint16_t(buf, 0, func_index);
191 _mav_put_uint16_t(buf, 2, func_count);
192 _mav_put_uint16_t(buf, 4, data_address);
193 _mav_put_uint16_t(buf, 6, data_size);
194 _mav_put_uint8_t(buf, 8, target_system);
195 _mav_put_uint8_t(buf, 9, target_component);
196 _mav_put_int8_t_array(buf, 10, data, 48);
197 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION, buf, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_CRC);
199 mavlink_flexifunction_buffer_function_t packet;
200 packet.func_index = func_index;
201 packet.func_count = func_count;
202 packet.data_address = data_address;
203 packet.data_size = data_size;
204 packet.target_system = target_system;
205 packet.target_component = target_component;
206 mav_array_memcpy(packet.data, data,
sizeof(int8_t)*48);
207 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION, (
const char *)&packet, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_CRC);
216static inline void mavlink_msg_flexifunction_buffer_function_send_struct(mavlink_channel_t chan,
const mavlink_flexifunction_buffer_function_t* flexifunction_buffer_function)
218#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
219 mavlink_msg_flexifunction_buffer_function_send(chan, flexifunction_buffer_function->target_system, flexifunction_buffer_function->target_component, flexifunction_buffer_function->func_index, flexifunction_buffer_function->func_count, flexifunction_buffer_function->data_address, flexifunction_buffer_function->data_size, flexifunction_buffer_function->data);
221 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION, (
const char *)flexifunction_buffer_function, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_CRC);
225#if MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_LEN <= MAVLINK_MAX_PAYLOAD_LEN
233static inline void mavlink_msg_flexifunction_buffer_function_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t func_index, uint16_t func_count, uint16_t data_address, uint16_t data_size,
const int8_t *data)
235#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
236 char *buf = (
char *)msgbuf;
237 _mav_put_uint16_t(buf, 0, func_index);
238 _mav_put_uint16_t(buf, 2, func_count);
239 _mav_put_uint16_t(buf, 4, data_address);
240 _mav_put_uint16_t(buf, 6, data_size);
241 _mav_put_uint8_t(buf, 8, target_system);
242 _mav_put_uint8_t(buf, 9, target_component);
243 _mav_put_int8_t_array(buf, 10, data, 48);
244 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION, buf, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_CRC);
246 mavlink_flexifunction_buffer_function_t *packet = (mavlink_flexifunction_buffer_function_t *)msgbuf;
247 packet->func_index = func_index;
248 packet->func_count = func_count;
249 packet->data_address = data_address;
250 packet->data_size = data_size;
251 packet->target_system = target_system;
252 packet->target_component = target_component;
253 mav_array_memcpy(packet->data, data,
sizeof(int8_t)*48);
254 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION, (
const char *)packet, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_CRC);
269static inline uint8_t mavlink_msg_flexifunction_buffer_function_get_target_system(
const mavlink_message_t* msg)
271 return _MAV_RETURN_uint8_t(msg, 8);
279static inline uint8_t mavlink_msg_flexifunction_buffer_function_get_target_component(
const mavlink_message_t* msg)
281 return _MAV_RETURN_uint8_t(msg, 9);
289static inline uint16_t mavlink_msg_flexifunction_buffer_function_get_func_index(
const mavlink_message_t* msg)
291 return _MAV_RETURN_uint16_t(msg, 0);
299static inline uint16_t mavlink_msg_flexifunction_buffer_function_get_func_count(
const mavlink_message_t* msg)
301 return _MAV_RETURN_uint16_t(msg, 2);
309static inline uint16_t mavlink_msg_flexifunction_buffer_function_get_data_address(
const mavlink_message_t* msg)
311 return _MAV_RETURN_uint16_t(msg, 4);
319static inline uint16_t mavlink_msg_flexifunction_buffer_function_get_data_size(
const mavlink_message_t* msg)
321 return _MAV_RETURN_uint16_t(msg, 6);
329static inline uint16_t mavlink_msg_flexifunction_buffer_function_get_data(
const mavlink_message_t* msg, int8_t *data)
331 return _MAV_RETURN_int8_t_array(msg, data, 48, 10);
340static inline void mavlink_msg_flexifunction_buffer_function_decode(
const mavlink_message_t* msg, mavlink_flexifunction_buffer_function_t* flexifunction_buffer_function)
342#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
343 flexifunction_buffer_function->func_index = mavlink_msg_flexifunction_buffer_function_get_func_index(msg);
344 flexifunction_buffer_function->func_count = mavlink_msg_flexifunction_buffer_function_get_func_count(msg);
345 flexifunction_buffer_function->data_address = mavlink_msg_flexifunction_buffer_function_get_data_address(msg);
346 flexifunction_buffer_function->data_size = mavlink_msg_flexifunction_buffer_function_get_data_size(msg);
347 flexifunction_buffer_function->target_system = mavlink_msg_flexifunction_buffer_function_get_target_system(msg);
348 flexifunction_buffer_function->target_component = mavlink_msg_flexifunction_buffer_function_get_target_component(msg);
349 mavlink_msg_flexifunction_buffer_function_get_data(msg, flexifunction_buffer_function->data);
351 uint8_t len = msg->len < MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_LEN? msg->len : MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_LEN;
352 memset(flexifunction_buffer_function, 0, MAVLINK_MSG_ID_FLEXIFUNCTION_BUFFER_FUNCTION_LEN);
353 memcpy(flexifunction_buffer_function, _MAV_PAYLOAD(msg), len);