4#define MAVLINK_MSG_ID_COMMAND_INT 75
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) },
52}
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) },
71}
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
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
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);
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);
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160static inline uint16_t mavlink_msg_command_int_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, 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
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);
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);
201 return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_COMMAND_INT_MIN_LEN, MAVLINK_MSG_ID_COMMAND_INT_LEN, MAVLINK_MSG_ID_COMMAND_INT_CRC);
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228static inline uint16_t mavlink_msg_command_int_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
229 mavlink_message_t* msg,
230 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)
232#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
234 _mav_put_float(buf, 0, param1);
235 _mav_put_float(buf, 4, param2);
236 _mav_put_float(buf, 8, param3);
237 _mav_put_float(buf, 12, param4);
238 _mav_put_int32_t(buf, 16, x);
239 _mav_put_int32_t(buf, 20, y);
240 _mav_put_float(buf, 24, z);
241 _mav_put_uint16_t(buf, 28, command);
242 _mav_put_uint8_t(buf, 30, target_system);
243 _mav_put_uint8_t(buf, 31, target_component);
244 _mav_put_uint8_t(buf, 32, frame);
245 _mav_put_uint8_t(buf, 33, current);
246 _mav_put_uint8_t(buf, 34, autocontinue);
250 mavlink_command_int_t packet;
251 packet.param1 = param1;
252 packet.param2 = param2;
253 packet.param3 = param3;
254 packet.param4 = param4;
258 packet.command = command;
259 packet.target_system = target_system;
260 packet.target_component = target_component;
261 packet.frame = frame;
262 packet.current = current;
263 packet.autocontinue = autocontinue;
265 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_COMMAND_INT_LEN);
273
274
275
276
277
278
279
280static 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)
282 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);
286
287
288
289
290
291
292
293
294static 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)
296 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);
300
301
302
303
304
305
306
307
308static inline uint16_t mavlink_msg_command_int_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg,
const mavlink_command_int_t* command_int)
310 return mavlink_msg_command_int_pack_status(system_id, component_id, _status, 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);
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
333static 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)
335#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
336 char buf[MAVLINK_MSG_ID_COMMAND_INT_LEN];
337 _mav_put_float(buf, 0, param1);
338 _mav_put_float(buf, 4, param2);
339 _mav_put_float(buf, 8, param3);
340 _mav_put_float(buf, 12, param4);
341 _mav_put_int32_t(buf, 16, x);
342 _mav_put_int32_t(buf, 20, y);
343 _mav_put_float(buf, 24, z);
344 _mav_put_uint16_t(buf, 28, command);
345 _mav_put_uint8_t(buf, 30, target_system);
346 _mav_put_uint8_t(buf, 31, target_component);
347 _mav_put_uint8_t(buf, 32, frame);
348 _mav_put_uint8_t(buf, 33, current);
349 _mav_put_uint8_t(buf, 34, autocontinue);
351 _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);
353 mavlink_command_int_t packet;
354 packet.param1 = param1;
355 packet.param2 = param2;
356 packet.param3 = param3;
357 packet.param4 = param4;
361 packet.command = command;
362 packet.target_system = target_system;
363 packet.target_component = target_component;
364 packet.frame = frame;
365 packet.current = current;
366 packet.autocontinue = autocontinue;
368 _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);
373
374
375
376
377static inline void mavlink_msg_command_int_send_struct(mavlink_channel_t chan,
const mavlink_command_int_t* command_int)
379#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
380 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);
382 _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);
386#if MAVLINK_MSG_ID_COMMAND_INT_LEN <= MAVLINK_MAX_PAYLOAD_LEN
388
389
390
391
392
393
394static 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)
396#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
397 char *buf = (
char *)msgbuf;
398 _mav_put_float(buf, 0, param1);
399 _mav_put_float(buf, 4, param2);
400 _mav_put_float(buf, 8, param3);
401 _mav_put_float(buf, 12, param4);
402 _mav_put_int32_t(buf, 16, x);
403 _mav_put_int32_t(buf, 20, y);
404 _mav_put_float(buf, 24, z);
405 _mav_put_uint16_t(buf, 28, command);
406 _mav_put_uint8_t(buf, 30, target_system);
407 _mav_put_uint8_t(buf, 31, target_component);
408 _mav_put_uint8_t(buf, 32, frame);
409 _mav_put_uint8_t(buf, 33, current);
410 _mav_put_uint8_t(buf, 34, autocontinue);
412 _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);
414 mavlink_command_int_t *packet = (mavlink_command_int_t *)msgbuf;
415 packet->param1 = param1;
416 packet->param2 = param2;
417 packet->param3 = param3;
418 packet->param4 = param4;
422 packet->command = command;
423 packet->target_system = target_system;
424 packet->target_component = target_component;
425 packet->frame = frame;
426 packet->current = current;
427 packet->autocontinue = autocontinue;
429 _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);
440
441
442
443
444static inline uint8_t mavlink_msg_command_int_get_target_system(
const mavlink_message_t* msg)
446 return _MAV_RETURN_uint8_t(msg, 30);
450
451
452
453
454static inline uint8_t mavlink_msg_command_int_get_target_component(
const mavlink_message_t* msg)
456 return _MAV_RETURN_uint8_t(msg, 31);
460
461
462
463
464static inline uint8_t mavlink_msg_command_int_get_frame(
const mavlink_message_t* msg)
466 return _MAV_RETURN_uint8_t(msg, 32);
470
471
472
473
474static inline uint16_t mavlink_msg_command_int_get_command(
const mavlink_message_t* msg)
476 return _MAV_RETURN_uint16_t(msg, 28);
480
481
482
483
484static inline uint8_t mavlink_msg_command_int_get_current(
const mavlink_message_t* msg)
486 return _MAV_RETURN_uint8_t(msg, 33);
490
491
492
493
494static inline uint8_t mavlink_msg_command_int_get_autocontinue(
const mavlink_message_t* msg)
496 return _MAV_RETURN_uint8_t(msg, 34);
500
501
502
503
504static inline float mavlink_msg_command_int_get_param1(
const mavlink_message_t* msg)
506 return _MAV_RETURN_float(msg, 0);
510
511
512
513
514static inline float mavlink_msg_command_int_get_param2(
const mavlink_message_t* msg)
516 return _MAV_RETURN_float(msg, 4);
520
521
522
523
524static inline float mavlink_msg_command_int_get_param3(
const mavlink_message_t* msg)
526 return _MAV_RETURN_float(msg, 8);
530
531
532
533
534static inline float mavlink_msg_command_int_get_param4(
const mavlink_message_t* msg)
536 return _MAV_RETURN_float(msg, 12);
540
541
542
543
544static inline int32_t mavlink_msg_command_int_get_x(
const mavlink_message_t* msg)
546 return _MAV_RETURN_int32_t(msg, 16);
550
551
552
553
554static inline int32_t mavlink_msg_command_int_get_y(
const mavlink_message_t* msg)
556 return _MAV_RETURN_int32_t(msg, 20);
560
561
562
563
564static inline float mavlink_msg_command_int_get_z(
const mavlink_message_t* msg)
566 return _MAV_RETURN_float(msg, 24);
570
571
572
573
574
575static inline void mavlink_msg_command_int_decode(
const mavlink_message_t* msg, mavlink_command_int_t* command_int)
577#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
578 command_int->param1 = mavlink_msg_command_int_get_param1(msg);
579 command_int->param2 = mavlink_msg_command_int_get_param2(msg);
580 command_int->param3 = mavlink_msg_command_int_get_param3(msg);
581 command_int->param4 = mavlink_msg_command_int_get_param4(msg);
582 command_int->x = mavlink_msg_command_int_get_x(msg);
583 command_int->y = mavlink_msg_command_int_get_y(msg);
584 command_int->z = mavlink_msg_command_int_get_z(msg);
585 command_int->command = mavlink_msg_command_int_get_command(msg);
586 command_int->target_system = mavlink_msg_command_int_get_target_system(msg);
587 command_int->target_component = mavlink_msg_command_int_get_target_component(msg);
588 command_int->frame = mavlink_msg_command_int_get_frame(msg);
589 command_int->current = mavlink_msg_command_int_get_current(msg);
590 command_int->autocontinue = mavlink_msg_command_int_get_autocontinue(msg);
592 uint8_t len = msg->len < MAVLINK_MSG_ID_COMMAND_INT_LEN? msg->len : MAVLINK_MSG_ID_COMMAND_INT_LEN;
593 memset(command_int, 0, MAVLINK_MSG_ID_COMMAND_INT_LEN);
594 memcpy(command_int, _MAV_PAYLOAD(msg), len);
#define MAVLINK_MSG_ID_COMMAND_INT_LEN
Definition: mavlink_msg_command_int.h:23
#define MAVLINK_MSG_ID_COMMAND_INT
Definition: mavlink_msg_command_int.h:4
#define MAVLINK_MSG_ID_COMMAND_INT_CRC
Definition: mavlink_msg_command_int.h:28
#define MAVLINK_MSG_ID_COMMAND_INT_MIN_LEN
Definition: mavlink_msg_command_int.h:24
Definition: mavlink_msg_command_int.h:7
float param2
Definition: mavlink_msg_command_int.h:9
uint8_t target_component
Definition: mavlink_msg_command_int.h:17
float param4
Definition: mavlink_msg_command_int.h:11
float param3
Definition: mavlink_msg_command_int.h:10
uint8_t autocontinue
Definition: mavlink_msg_command_int.h:20
uint16_t command
Definition: mavlink_msg_command_int.h:15
float param1
Definition: mavlink_msg_command_int.h:8
uint8_t current
Definition: mavlink_msg_command_int.h:19
uint8_t frame
Definition: mavlink_msg_command_int.h:18
uint8_t target_system
Definition: mavlink_msg_command_int.h:16
int32_t y
Definition: mavlink_msg_command_int.h:13
int32_t x
Definition: mavlink_msg_command_int.h:12
float z
Definition: mavlink_msg_command_int.h:14