4#define MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK 158
7typedef struct __mavlink_flexifunction_command_ack_t {
10}) mavlink_flexifunction_command_ack_t;
12#define MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_LEN 4
13#define MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_MIN_LEN 4
14#define MAVLINK_MSG_ID_158_LEN 4
15#define MAVLINK_MSG_ID_158_MIN_LEN 4
17#define MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_CRC 208
18#define MAVLINK_MSG_ID_158_CRC 208
22#if MAVLINK_COMMAND_24BIT
23#define MAVLINK_MESSAGE_INFO_FLEXIFUNCTION_COMMAND_ACK { \
25 "FLEXIFUNCTION_COMMAND_ACK", \
27 { { "command_type", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_flexifunction_command_ack_t, command_type) }, \
28 { "result", NULL, MAVLINK_TYPE_UINT16_T, 0, 2, offsetof(mavlink_flexifunction_command_ack_t, result) }, \
32#define MAVLINK_MESSAGE_INFO_FLEXIFUNCTION_COMMAND_ACK { \
33 "FLEXIFUNCTION_COMMAND_ACK", \
35 { { "command_type", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_flexifunction_command_ack_t, command_type) }, \
36 { "result", NULL, MAVLINK_TYPE_UINT16_T, 0, 2, offsetof(mavlink_flexifunction_command_ack_t, result) }, \
51static inline uint16_t mavlink_msg_flexifunction_command_ack_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
52 uint16_t command_type, uint16_t result)
54#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
55 char buf[MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_LEN];
56 _mav_put_uint16_t(buf, 0, command_type);
57 _mav_put_uint16_t(buf, 2, result);
59 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_LEN);
61 mavlink_flexifunction_command_ack_t packet;
62 packet.command_type = command_type;
63 packet.result = result;
65 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_LEN);
68 msg->msgid = MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK;
69 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_CRC);
82static inline uint16_t mavlink_msg_flexifunction_command_ack_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
83 mavlink_message_t* msg,
84 uint16_t command_type,uint16_t result)
86#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
87 char buf[MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_LEN];
88 _mav_put_uint16_t(buf, 0, command_type);
89 _mav_put_uint16_t(buf, 2, result);
91 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_LEN);
93 mavlink_flexifunction_command_ack_t packet;
94 packet.command_type = command_type;
95 packet.result = result;
97 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_LEN);
100 msg->msgid = MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK;
101 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_CRC);
112static inline uint16_t mavlink_msg_flexifunction_command_ack_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_flexifunction_command_ack_t* flexifunction_command_ack)
114 return mavlink_msg_flexifunction_command_ack_pack(system_id, component_id, msg, flexifunction_command_ack->command_type, flexifunction_command_ack->result);
126static inline uint16_t mavlink_msg_flexifunction_command_ack_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_flexifunction_command_ack_t* flexifunction_command_ack)
128 return mavlink_msg_flexifunction_command_ack_pack_chan(system_id, component_id, chan, msg, flexifunction_command_ack->command_type, flexifunction_command_ack->result);
138#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
140static inline void mavlink_msg_flexifunction_command_ack_send(mavlink_channel_t chan, uint16_t command_type, uint16_t result)
142#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
143 char buf[MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_LEN];
144 _mav_put_uint16_t(buf, 0, command_type);
145 _mav_put_uint16_t(buf, 2, result);
147 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK, buf, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_CRC);
149 mavlink_flexifunction_command_ack_t packet;
150 packet.command_type = command_type;
151 packet.result = result;
153 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK, (
const char *)&packet, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_CRC);
162static inline void mavlink_msg_flexifunction_command_ack_send_struct(mavlink_channel_t chan,
const mavlink_flexifunction_command_ack_t* flexifunction_command_ack)
164#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
165 mavlink_msg_flexifunction_command_ack_send(chan, flexifunction_command_ack->command_type, flexifunction_command_ack->result);
167 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK, (
const char *)flexifunction_command_ack, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_CRC);
171#if MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_LEN <= MAVLINK_MAX_PAYLOAD_LEN
179static inline void mavlink_msg_flexifunction_command_ack_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint16_t command_type, uint16_t result)
181#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
182 char *buf = (
char *)msgbuf;
183 _mav_put_uint16_t(buf, 0, command_type);
184 _mav_put_uint16_t(buf, 2, result);
186 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK, buf, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_CRC);
188 mavlink_flexifunction_command_ack_t *packet = (mavlink_flexifunction_command_ack_t *)msgbuf;
189 packet->command_type = command_type;
190 packet->result = result;
192 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK, (
const char *)packet, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_MIN_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_LEN, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_CRC);
207static inline uint16_t mavlink_msg_flexifunction_command_ack_get_command_type(
const mavlink_message_t* msg)
209 return _MAV_RETURN_uint16_t(msg, 0);
217static inline uint16_t mavlink_msg_flexifunction_command_ack_get_result(
const mavlink_message_t* msg)
219 return _MAV_RETURN_uint16_t(msg, 2);
228static inline void mavlink_msg_flexifunction_command_ack_decode(
const mavlink_message_t* msg, mavlink_flexifunction_command_ack_t* flexifunction_command_ack)
230#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
231 flexifunction_command_ack->command_type = mavlink_msg_flexifunction_command_ack_get_command_type(msg);
232 flexifunction_command_ack->result = mavlink_msg_flexifunction_command_ack_get_result(msg);
234 uint8_t len = msg->len < MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_LEN? msg->len : MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_LEN;
235 memset(flexifunction_command_ack, 0, MAVLINK_MSG_ID_FLEXIFUNCTION_COMMAND_ACK_LEN);
236 memcpy(flexifunction_command_ack, _MAV_PAYLOAD(msg), len);