4#define MAVLINK_MSG_ID_COMMAND_INT 75
7typedef struct __mavlink_command_int_t {
16 uint8_t target_system;
17 uint8_t target_component;
21}) mavlink_command_int_t;
23#define MAVLINK_MSG_ID_COMMAND_INT_LEN 35
24#define MAVLINK_MSG_ID_COMMAND_INT_MIN_LEN 35
25#define MAVLINK_MSG_ID_75_LEN 35
26#define MAVLINK_MSG_ID_75_MIN_LEN 35
28#define MAVLINK_MSG_ID_COMMAND_INT_CRC 158
29#define MAVLINK_MSG_ID_75_CRC 158
33#if MAVLINK_COMMAND_24BIT
34#define MAVLINK_MESSAGE_INFO_COMMAND_INT { \
38 { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 30, offsetof(mavlink_command_int_t, target_system) }, \
39 { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 31, offsetof(mavlink_command_int_t, target_component) }, \
40 { "frame", NULL, MAVLINK_TYPE_UINT8_T, 0, 32, offsetof(mavlink_command_int_t, frame) }, \
41 { "command", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_command_int_t, command) }, \
42 { "current", NULL, MAVLINK_TYPE_UINT8_T, 0, 33, offsetof(mavlink_command_int_t, current) }, \
43 { "autocontinue", NULL, MAVLINK_TYPE_UINT8_T, 0, 34, offsetof(mavlink_command_int_t, autocontinue) }, \
44 { "param1", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_command_int_t, param1) }, \
45 { "param2", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_command_int_t, param2) }, \
46 { "param3", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_command_int_t, param3) }, \
47 { "param4", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_command_int_t, param4) }, \
48 { "x", NULL, MAVLINK_TYPE_INT32_T, 0, 16, offsetof(mavlink_command_int_t, x) }, \
49 { "y", NULL, MAVLINK_TYPE_INT32_T, 0, 20, offsetof(mavlink_command_int_t, y) }, \
50 { "z", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_command_int_t, z) }, \
54#define MAVLINK_MESSAGE_INFO_COMMAND_INT { \
57 { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 30, offsetof(mavlink_command_int_t, target_system) }, \
58 { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 31, offsetof(mavlink_command_int_t, target_component) }, \
59 { "frame", NULL, MAVLINK_TYPE_UINT8_T, 0, 32, offsetof(mavlink_command_int_t, frame) }, \
60 { "command", NULL, MAVLINK_TYPE_UINT16_T, 0, 28, offsetof(mavlink_command_int_t, command) }, \
61 { "current", NULL, MAVLINK_TYPE_UINT8_T, 0, 33, offsetof(mavlink_command_int_t, current) }, \
62 { "autocontinue", NULL, MAVLINK_TYPE_UINT8_T, 0, 34, offsetof(mavlink_command_int_t, autocontinue) }, \
63 { "param1", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_command_int_t, param1) }, \
64 { "param2", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_command_int_t, param2) }, \
65 { "param3", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_command_int_t, param3) }, \
66 { "param4", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_command_int_t, param4) }, \
67 { "x", NULL, MAVLINK_TYPE_INT32_T, 0, 16, offsetof(mavlink_command_int_t, x) }, \
68 { "y", NULL, MAVLINK_TYPE_INT32_T, 0, 20, offsetof(mavlink_command_int_t, y) }, \
69 { "z", NULL, MAVLINK_TYPE_FLOAT, 0, 24, offsetof(mavlink_command_int_t, z) }, \
95static inline uint16_t mavlink_msg_command_int_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
96 uint8_t target_system, uint8_t target_component, uint8_t frame, uint16_t command, uint8_t current, uint8_t autocontinue,
float param1,
float param2,
float param3,
float param4, int32_t x, int32_t y,
float z)
98#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
99 char buf[MAVLINK_MSG_ID_COMMAND_INT_LEN];
100 _mav_put_float(buf, 0, param1);
101 _mav_put_float(buf, 4, param2);
102 _mav_put_float(buf, 8, param3);
103 _mav_put_float(buf, 12, param4);
104 _mav_put_int32_t(buf, 16, x);
105 _mav_put_int32_t(buf, 20, y);
106 _mav_put_float(buf, 24, z);
107 _mav_put_uint16_t(buf, 28, command);
108 _mav_put_uint8_t(buf, 30, target_system);
109 _mav_put_uint8_t(buf, 31, target_component);
110 _mav_put_uint8_t(buf, 32, frame);
111 _mav_put_uint8_t(buf, 33, current);
112 _mav_put_uint8_t(buf, 34, autocontinue);
114 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_COMMAND_INT_LEN);
116 mavlink_command_int_t packet;
117 packet.param1 = param1;
118 packet.param2 = param2;
119 packet.param3 = param3;
120 packet.param4 = param4;
124 packet.command = command;
125 packet.target_system = target_system;
126 packet.target_component = target_component;
127 packet.frame = frame;
128 packet.current = current;
129 packet.autocontinue = autocontinue;
131 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_COMMAND_INT_LEN);
134 msg->msgid = MAVLINK_MSG_ID_COMMAND_INT;
135 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_COMMAND_INT_MIN_LEN, MAVLINK_MSG_ID_COMMAND_INT_LEN, MAVLINK_MSG_ID_COMMAND_INT_CRC);
159static inline uint16_t mavlink_msg_command_int_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
160 mavlink_message_t* msg,
161 uint8_t target_system,uint8_t target_component,uint8_t frame,uint16_t command,uint8_t current,uint8_t autocontinue,
float param1,
float param2,
float param3,
float param4,int32_t x,int32_t y,
float z)
163#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
164 char buf[MAVLINK_MSG_ID_COMMAND_INT_LEN];
165 _mav_put_float(buf, 0, param1);
166 _mav_put_float(buf, 4, param2);
167 _mav_put_float(buf, 8, param3);
168 _mav_put_float(buf, 12, param4);
169 _mav_put_int32_t(buf, 16, x);
170 _mav_put_int32_t(buf, 20, y);
171 _mav_put_float(buf, 24, z);
172 _mav_put_uint16_t(buf, 28, command);
173 _mav_put_uint8_t(buf, 30, target_system);
174 _mav_put_uint8_t(buf, 31, target_component);
175 _mav_put_uint8_t(buf, 32, frame);
176 _mav_put_uint8_t(buf, 33, current);
177 _mav_put_uint8_t(buf, 34, autocontinue);
179 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_COMMAND_INT_LEN);
181 mavlink_command_int_t packet;
182 packet.param1 = param1;
183 packet.param2 = param2;
184 packet.param3 = param3;
185 packet.param4 = param4;
189 packet.command = command;
190 packet.target_system = target_system;
191 packet.target_component = target_component;
192 packet.frame = frame;
193 packet.current = current;
194 packet.autocontinue = autocontinue;
196 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_COMMAND_INT_LEN);
199 msg->msgid = MAVLINK_MSG_ID_COMMAND_INT;
200 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_COMMAND_INT_MIN_LEN, MAVLINK_MSG_ID_COMMAND_INT_LEN, MAVLINK_MSG_ID_COMMAND_INT_CRC);
211static inline uint16_t mavlink_msg_command_int_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_command_int_t* command_int)
213 return mavlink_msg_command_int_pack(system_id, component_id, msg, command_int->target_system, command_int->target_component, command_int->frame, command_int->command, command_int->current, command_int->autocontinue, command_int->param1, command_int->param2, command_int->param3, command_int->param4, command_int->x, command_int->y, command_int->z);
225static inline uint16_t mavlink_msg_command_int_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_command_int_t* command_int)
227 return mavlink_msg_command_int_pack_chan(system_id, component_id, chan, msg, command_int->target_system, command_int->target_component, command_int->frame, command_int->command, command_int->current, command_int->autocontinue, command_int->param1, command_int->param2, command_int->param3, command_int->param4, command_int->x, command_int->y, command_int->z);
248#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
250static inline void mavlink_msg_command_int_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t frame, uint16_t command, uint8_t current, uint8_t autocontinue,
float param1,
float param2,
float param3,
float param4, int32_t x, int32_t y,
float z)
252#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
253 char buf[MAVLINK_MSG_ID_COMMAND_INT_LEN];
254 _mav_put_float(buf, 0, param1);
255 _mav_put_float(buf, 4, param2);
256 _mav_put_float(buf, 8, param3);
257 _mav_put_float(buf, 12, param4);
258 _mav_put_int32_t(buf, 16, x);
259 _mav_put_int32_t(buf, 20, y);
260 _mav_put_float(buf, 24, z);
261 _mav_put_uint16_t(buf, 28, command);
262 _mav_put_uint8_t(buf, 30, target_system);
263 _mav_put_uint8_t(buf, 31, target_component);
264 _mav_put_uint8_t(buf, 32, frame);
265 _mav_put_uint8_t(buf, 33, current);
266 _mav_put_uint8_t(buf, 34, autocontinue);
268 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMMAND_INT, buf, MAVLINK_MSG_ID_COMMAND_INT_MIN_LEN, MAVLINK_MSG_ID_COMMAND_INT_LEN, MAVLINK_MSG_ID_COMMAND_INT_CRC);
270 mavlink_command_int_t packet;
271 packet.param1 = param1;
272 packet.param2 = param2;
273 packet.param3 = param3;
274 packet.param4 = param4;
278 packet.command = command;
279 packet.target_system = target_system;
280 packet.target_component = target_component;
281 packet.frame = frame;
282 packet.current = current;
283 packet.autocontinue = autocontinue;
285 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMMAND_INT, (
const char *)&packet, MAVLINK_MSG_ID_COMMAND_INT_MIN_LEN, MAVLINK_MSG_ID_COMMAND_INT_LEN, MAVLINK_MSG_ID_COMMAND_INT_CRC);
294static inline void mavlink_msg_command_int_send_struct(mavlink_channel_t chan,
const mavlink_command_int_t* command_int)
296#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
297 mavlink_msg_command_int_send(chan, command_int->target_system, command_int->target_component, command_int->frame, command_int->command, command_int->current, command_int->autocontinue, command_int->param1, command_int->param2, command_int->param3, command_int->param4, command_int->x, command_int->y, command_int->z);
299 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMMAND_INT, (
const char *)command_int, MAVLINK_MSG_ID_COMMAND_INT_MIN_LEN, MAVLINK_MSG_ID_COMMAND_INT_LEN, MAVLINK_MSG_ID_COMMAND_INT_CRC);
303#if MAVLINK_MSG_ID_COMMAND_INT_LEN <= MAVLINK_MAX_PAYLOAD_LEN
311static inline void mavlink_msg_command_int_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t frame, uint16_t command, uint8_t current, uint8_t autocontinue,
float param1,
float param2,
float param3,
float param4, int32_t x, int32_t y,
float z)
313#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
314 char *buf = (
char *)msgbuf;
315 _mav_put_float(buf, 0, param1);
316 _mav_put_float(buf, 4, param2);
317 _mav_put_float(buf, 8, param3);
318 _mav_put_float(buf, 12, param4);
319 _mav_put_int32_t(buf, 16, x);
320 _mav_put_int32_t(buf, 20, y);
321 _mav_put_float(buf, 24, z);
322 _mav_put_uint16_t(buf, 28, command);
323 _mav_put_uint8_t(buf, 30, target_system);
324 _mav_put_uint8_t(buf, 31, target_component);
325 _mav_put_uint8_t(buf, 32, frame);
326 _mav_put_uint8_t(buf, 33, current);
327 _mav_put_uint8_t(buf, 34, autocontinue);
329 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMMAND_INT, buf, MAVLINK_MSG_ID_COMMAND_INT_MIN_LEN, MAVLINK_MSG_ID_COMMAND_INT_LEN, MAVLINK_MSG_ID_COMMAND_INT_CRC);
331 mavlink_command_int_t *packet = (mavlink_command_int_t *)msgbuf;
332 packet->param1 = param1;
333 packet->param2 = param2;
334 packet->param3 = param3;
335 packet->param4 = param4;
339 packet->command = command;
340 packet->target_system = target_system;
341 packet->target_component = target_component;
342 packet->frame = frame;
343 packet->current = current;
344 packet->autocontinue = autocontinue;
346 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_COMMAND_INT, (
const char *)packet, MAVLINK_MSG_ID_COMMAND_INT_MIN_LEN, MAVLINK_MSG_ID_COMMAND_INT_LEN, MAVLINK_MSG_ID_COMMAND_INT_CRC);
361static inline uint8_t mavlink_msg_command_int_get_target_system(
const mavlink_message_t* msg)
363 return _MAV_RETURN_uint8_t(msg, 30);
371static inline uint8_t mavlink_msg_command_int_get_target_component(
const mavlink_message_t* msg)
373 return _MAV_RETURN_uint8_t(msg, 31);
381static inline uint8_t mavlink_msg_command_int_get_frame(
const mavlink_message_t* msg)
383 return _MAV_RETURN_uint8_t(msg, 32);
391static inline uint16_t mavlink_msg_command_int_get_command(
const mavlink_message_t* msg)
393 return _MAV_RETURN_uint16_t(msg, 28);
401static inline uint8_t mavlink_msg_command_int_get_current(
const mavlink_message_t* msg)
403 return _MAV_RETURN_uint8_t(msg, 33);
411static inline uint8_t mavlink_msg_command_int_get_autocontinue(
const mavlink_message_t* msg)
413 return _MAV_RETURN_uint8_t(msg, 34);
421static inline float mavlink_msg_command_int_get_param1(
const mavlink_message_t* msg)
423 return _MAV_RETURN_float(msg, 0);
431static inline float mavlink_msg_command_int_get_param2(
const mavlink_message_t* msg)
433 return _MAV_RETURN_float(msg, 4);
441static inline float mavlink_msg_command_int_get_param3(
const mavlink_message_t* msg)
443 return _MAV_RETURN_float(msg, 8);
451static inline float mavlink_msg_command_int_get_param4(
const mavlink_message_t* msg)
453 return _MAV_RETURN_float(msg, 12);
461static inline int32_t mavlink_msg_command_int_get_x(
const mavlink_message_t* msg)
463 return _MAV_RETURN_int32_t(msg, 16);
471static inline int32_t mavlink_msg_command_int_get_y(
const mavlink_message_t* msg)
473 return _MAV_RETURN_int32_t(msg, 20);
481static inline float mavlink_msg_command_int_get_z(
const mavlink_message_t* msg)
483 return _MAV_RETURN_float(msg, 24);
492static inline void mavlink_msg_command_int_decode(
const mavlink_message_t* msg, mavlink_command_int_t* command_int)
494#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
495 command_int->param1 = mavlink_msg_command_int_get_param1(msg);
496 command_int->param2 = mavlink_msg_command_int_get_param2(msg);
497 command_int->param3 = mavlink_msg_command_int_get_param3(msg);
498 command_int->param4 = mavlink_msg_command_int_get_param4(msg);
499 command_int->x = mavlink_msg_command_int_get_x(msg);
500 command_int->y = mavlink_msg_command_int_get_y(msg);
501 command_int->z = mavlink_msg_command_int_get_z(msg);
502 command_int->command = mavlink_msg_command_int_get_command(msg);
503 command_int->target_system = mavlink_msg_command_int_get_target_system(msg);
504 command_int->target_component = mavlink_msg_command_int_get_target_component(msg);
505 command_int->frame = mavlink_msg_command_int_get_frame(msg);
506 command_int->current = mavlink_msg_command_int_get_current(msg);
507 command_int->autocontinue = mavlink_msg_command_int_get_autocontinue(msg);
509 uint8_t len = msg->len < MAVLINK_MSG_ID_COMMAND_INT_LEN? msg->len : MAVLINK_MSG_ID_COMMAND_INT_LEN;
510 memset(command_int, 0, MAVLINK_MSG_ID_COMMAND_INT_LEN);
511 memcpy(command_int, _MAV_PAYLOAD(msg), len);