4#define MAVLINK_MSG_ID_MISSION_SET_CURRENT 41
7typedef struct __mavlink_mission_set_current_t {
10 uint8_t target_component;
11}) mavlink_mission_set_current_t;
13#define MAVLINK_MSG_ID_MISSION_SET_CURRENT_LEN 4
14#define MAVLINK_MSG_ID_MISSION_SET_CURRENT_MIN_LEN 4
15#define MAVLINK_MSG_ID_41_LEN 4
16#define MAVLINK_MSG_ID_41_MIN_LEN 4
18#define MAVLINK_MSG_ID_MISSION_SET_CURRENT_CRC 28
19#define MAVLINK_MSG_ID_41_CRC 28
23#if MAVLINK_COMMAND_24BIT
24#define MAVLINK_MESSAGE_INFO_MISSION_SET_CURRENT { \
26 "MISSION_SET_CURRENT", \
28 { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_mission_set_current_t, target_system) }, \
29 { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_mission_set_current_t, target_component) }, \
30 { "seq", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_mission_set_current_t, seq) }, \
34#define MAVLINK_MESSAGE_INFO_MISSION_SET_CURRENT { \
35 "MISSION_SET_CURRENT", \
37 { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_mission_set_current_t, target_system) }, \
38 { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_mission_set_current_t, target_component) }, \
39 { "seq", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_mission_set_current_t, seq) }, \
55static inline uint16_t mavlink_msg_mission_set_current_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
56 uint8_t target_system, uint8_t target_component, uint16_t seq)
58#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
59 char buf[MAVLINK_MSG_ID_MISSION_SET_CURRENT_LEN];
60 _mav_put_uint16_t(buf, 0, seq);
61 _mav_put_uint8_t(buf, 2, target_system);
62 _mav_put_uint8_t(buf, 3, target_component);
64 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MISSION_SET_CURRENT_LEN);
66 mavlink_mission_set_current_t packet;
68 packet.target_system = target_system;
69 packet.target_component = target_component;
71 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MISSION_SET_CURRENT_LEN);
74 msg->msgid = MAVLINK_MSG_ID_MISSION_SET_CURRENT;
75 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MISSION_SET_CURRENT_MIN_LEN, MAVLINK_MSG_ID_MISSION_SET_CURRENT_LEN, MAVLINK_MSG_ID_MISSION_SET_CURRENT_CRC);
89static inline uint16_t mavlink_msg_mission_set_current_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
90 mavlink_message_t* msg,
91 uint8_t target_system,uint8_t target_component,uint16_t seq)
93#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
94 char buf[MAVLINK_MSG_ID_MISSION_SET_CURRENT_LEN];
95 _mav_put_uint16_t(buf, 0, seq);
96 _mav_put_uint8_t(buf, 2, target_system);
97 _mav_put_uint8_t(buf, 3, target_component);
99 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MISSION_SET_CURRENT_LEN);
101 mavlink_mission_set_current_t packet;
103 packet.target_system = target_system;
104 packet.target_component = target_component;
106 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MISSION_SET_CURRENT_LEN);
109 msg->msgid = MAVLINK_MSG_ID_MISSION_SET_CURRENT;
110 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MISSION_SET_CURRENT_MIN_LEN, MAVLINK_MSG_ID_MISSION_SET_CURRENT_LEN, MAVLINK_MSG_ID_MISSION_SET_CURRENT_CRC);
121static inline uint16_t mavlink_msg_mission_set_current_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_mission_set_current_t* mission_set_current)
123 return mavlink_msg_mission_set_current_pack(system_id, component_id, msg, mission_set_current->target_system, mission_set_current->target_component, mission_set_current->seq);
135static inline uint16_t mavlink_msg_mission_set_current_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_mission_set_current_t* mission_set_current)
137 return mavlink_msg_mission_set_current_pack_chan(system_id, component_id, chan, msg, mission_set_current->target_system, mission_set_current->target_component, mission_set_current->seq);
148#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
150static inline void mavlink_msg_mission_set_current_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t seq)
152#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
153 char buf[MAVLINK_MSG_ID_MISSION_SET_CURRENT_LEN];
154 _mav_put_uint16_t(buf, 0, seq);
155 _mav_put_uint8_t(buf, 2, target_system);
156 _mav_put_uint8_t(buf, 3, target_component);
158 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_SET_CURRENT, buf, MAVLINK_MSG_ID_MISSION_SET_CURRENT_MIN_LEN, MAVLINK_MSG_ID_MISSION_SET_CURRENT_LEN, MAVLINK_MSG_ID_MISSION_SET_CURRENT_CRC);
160 mavlink_mission_set_current_t packet;
162 packet.target_system = target_system;
163 packet.target_component = target_component;
165 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_SET_CURRENT, (
const char *)&packet, MAVLINK_MSG_ID_MISSION_SET_CURRENT_MIN_LEN, MAVLINK_MSG_ID_MISSION_SET_CURRENT_LEN, MAVLINK_MSG_ID_MISSION_SET_CURRENT_CRC);
174static inline void mavlink_msg_mission_set_current_send_struct(mavlink_channel_t chan,
const mavlink_mission_set_current_t* mission_set_current)
176#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
177 mavlink_msg_mission_set_current_send(chan, mission_set_current->target_system, mission_set_current->target_component, mission_set_current->seq);
179 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_SET_CURRENT, (
const char *)mission_set_current, MAVLINK_MSG_ID_MISSION_SET_CURRENT_MIN_LEN, MAVLINK_MSG_ID_MISSION_SET_CURRENT_LEN, MAVLINK_MSG_ID_MISSION_SET_CURRENT_CRC);
183#if MAVLINK_MSG_ID_MISSION_SET_CURRENT_LEN <= MAVLINK_MAX_PAYLOAD_LEN
191static inline void mavlink_msg_mission_set_current_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t seq)
193#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
194 char *buf = (
char *)msgbuf;
195 _mav_put_uint16_t(buf, 0, seq);
196 _mav_put_uint8_t(buf, 2, target_system);
197 _mav_put_uint8_t(buf, 3, target_component);
199 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_SET_CURRENT, buf, MAVLINK_MSG_ID_MISSION_SET_CURRENT_MIN_LEN, MAVLINK_MSG_ID_MISSION_SET_CURRENT_LEN, MAVLINK_MSG_ID_MISSION_SET_CURRENT_CRC);
201 mavlink_mission_set_current_t *packet = (mavlink_mission_set_current_t *)msgbuf;
203 packet->target_system = target_system;
204 packet->target_component = target_component;
206 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MISSION_SET_CURRENT, (
const char *)packet, MAVLINK_MSG_ID_MISSION_SET_CURRENT_MIN_LEN, MAVLINK_MSG_ID_MISSION_SET_CURRENT_LEN, MAVLINK_MSG_ID_MISSION_SET_CURRENT_CRC);
221static inline uint8_t mavlink_msg_mission_set_current_get_target_system(
const mavlink_message_t* msg)
223 return _MAV_RETURN_uint8_t(msg, 2);
231static inline uint8_t mavlink_msg_mission_set_current_get_target_component(
const mavlink_message_t* msg)
233 return _MAV_RETURN_uint8_t(msg, 3);
241static inline uint16_t mavlink_msg_mission_set_current_get_seq(
const mavlink_message_t* msg)
243 return _MAV_RETURN_uint16_t(msg, 0);
252static inline void mavlink_msg_mission_set_current_decode(
const mavlink_message_t* msg, mavlink_mission_set_current_t* mission_set_current)
254#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
255 mission_set_current->seq = mavlink_msg_mission_set_current_get_seq(msg);
256 mission_set_current->target_system = mavlink_msg_mission_set_current_get_target_system(msg);
257 mission_set_current->target_component = mavlink_msg_mission_set_current_get_target_component(msg);
259 uint8_t len = msg->len < MAVLINK_MSG_ID_MISSION_SET_CURRENT_LEN? msg->len : MAVLINK_MSG_ID_MISSION_SET_CURRENT_LEN;
260 memset(mission_set_current, 0, MAVLINK_MSG_ID_MISSION_SET_CURRENT_LEN);
261 memcpy(mission_set_current, _MAV_PAYLOAD(msg), len);