4#define MAVLINK_MSG_ID_HIL_ACTUATOR_CONTROLS 93
12} mavlink_hil_actuator_controls_t;
14#define MAVLINK_MSG_ID_HIL_ACTUATOR_CONTROLS_LEN 81
15#define MAVLINK_MSG_ID_HIL_ACTUATOR_CONTROLS_MIN_LEN 81
16#define MAVLINK_MSG_ID_93_LEN 81
17#define MAVLINK_MSG_ID_93_MIN_LEN 81
19#define MAVLINK_MSG_ID_HIL_ACTUATOR_CONTROLS_CRC 47
20#define MAVLINK_MSG_ID_93_CRC 47
22#define MAVLINK_MSG_HIL_ACTUATOR_CONTROLS_FIELD_CONTROLS_LEN 16
24#if MAVLINK_COMMAND_24BIT
25#define MAVLINK_MESSAGE_INFO_HIL_ACTUATOR_CONTROLS {
27 "HIL_ACTUATOR_CONTROLS",
29 { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0
, 0
, offsetof(mavlink_hil_actuator_controls_t, time_usec) },
30 { "controls", NULL, MAVLINK_TYPE_FLOAT, 16
, 16
, offsetof(mavlink_hil_actuator_controls_t, controls) },
31 { "mode", NULL, MAVLINK_TYPE_UINT8_T, 0
, 80
, offsetof(mavlink_hil_actuator_controls_t, mode) },
32 { "flags", NULL, MAVLINK_TYPE_UINT64_T, 0
, 8
, offsetof(mavlink_hil_actuator_controls_t, flags) },
34}
36#define MAVLINK_MESSAGE_INFO_HIL_ACTUATOR_CONTROLS {
37 "HIL_ACTUATOR_CONTROLS",
39 { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0
, 0
, offsetof(mavlink_hil_actuator_controls_t, time_usec) },
40 { "controls", NULL, MAVLINK_TYPE_FLOAT, 16
, 16
, offsetof(mavlink_hil_actuator_controls_t, controls) },
41 { "mode", NULL, MAVLINK_TYPE_UINT8_T, 0
, 80
, offsetof(mavlink_hil_actuator_controls_t, mode) },
42 { "flags", NULL, MAVLINK_TYPE_UINT64_T, 0
, 8
, offsetof(mavlink_hil_actuator_controls_t, flags) },
44}
48
49
50
51
52
53
54
55
56
57
58
59static inline uint16_t mavlink_msg_hil_actuator_controls_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
60 uint64_t time_usec,
const float *controls, uint8_t mode, uint64_t flags)
62#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
64 _mav_put_uint64_t(buf, 0, time_usec);
65 _mav_put_uint64_t(buf, 8, flags);
66 _mav_put_uint8_t(buf, 80, mode);
67 _mav_put_float_array(buf, 16, controls, 16);
70 mavlink_hil_actuator_controls_t packet;
71 packet.time_usec = time_usec;
74 mav_array_memcpy(packet.controls, controls,
sizeof(
float)*16);
75 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HIL_ACTUATOR_CONTROLS_LEN);
83
84
85
86
87
88
89
90
91
92
93
94
95static inline uint16_t mavlink_msg_hil_actuator_controls_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
96 uint64_t time_usec,
const float *controls, uint8_t mode, uint64_t flags)
98#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
100 _mav_put_uint64_t(buf, 0, time_usec);
101 _mav_put_uint64_t(buf, 8, flags);
102 _mav_put_uint8_t(buf, 80, mode);
103 _mav_put_float_array(buf, 16, controls, 16);
106 mavlink_hil_actuator_controls_t packet;
107 packet.time_usec = time_usec;
108 packet.flags = flags;
110 mav_array_memcpy(packet.controls, controls,
sizeof(
float)*16);
111 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HIL_ACTUATOR_CONTROLS_LEN);
116 return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_HIL_ACTUATOR_CONTROLS_MIN_LEN, MAVLINK_MSG_ID_HIL_ACTUATOR_CONTROLS_LEN, MAVLINK_MSG_ID_HIL_ACTUATOR_CONTROLS_CRC);
123
124
125
126
127
128
129
130
131
132
133
134static inline uint16_t mavlink_msg_hil_actuator_controls_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
135 mavlink_message_t* msg,
136 uint64_t time_usec,
const float *controls,uint8_t mode,uint64_t flags)
138#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
140 _mav_put_uint64_t(buf, 0, time_usec);
141 _mav_put_uint64_t(buf, 8, flags);
142 _mav_put_uint8_t(buf, 80, mode);
143 _mav_put_float_array(buf, 16, controls, 16);
146 mavlink_hil_actuator_controls_t packet;
147 packet.time_usec = time_usec;
148 packet.flags = flags;
150 mav_array_memcpy(packet.controls, controls,
sizeof(
float)*16);
151 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_HIL_ACTUATOR_CONTROLS_LEN);
159
160
161
162
163
164
165
166static inline uint16_t mavlink_msg_hil_actuator_controls_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_hil_actuator_controls_t* hil_actuator_controls)
168 return mavlink_msg_hil_actuator_controls_pack(system_id, component_id, msg, hil_actuator_controls->time_usec, hil_actuator_controls->controls, hil_actuator_controls->mode, hil_actuator_controls->flags);
172
173
174
175
176
177
178
179
180static inline uint16_t mavlink_msg_hil_actuator_controls_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_hil_actuator_controls_t* hil_actuator_controls)
182 return mavlink_msg_hil_actuator_controls_pack_chan(system_id, component_id, chan, msg, hil_actuator_controls->time_usec, hil_actuator_controls->controls, hil_actuator_controls->mode, hil_actuator_controls->flags);
186
187
188
189
190
191
192
193
194static inline uint16_t mavlink_msg_hil_actuator_controls_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg,
const mavlink_hil_actuator_controls_t* hil_actuator_controls)
196 return mavlink_msg_hil_actuator_controls_pack_status(system_id, component_id, _status, msg, hil_actuator_controls->time_usec, hil_actuator_controls->controls, hil_actuator_controls->mode, hil_actuator_controls->flags);
200
201
202
203
204
205
206
207
208#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
210static inline void mavlink_msg_hil_actuator_controls_send(mavlink_channel_t chan, uint64_t time_usec,
const float *controls, uint8_t mode, uint64_t flags)
212#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
213 char buf[MAVLINK_MSG_ID_HIL_ACTUATOR_CONTROLS_LEN];
214 _mav_put_uint64_t(buf, 0, time_usec);
215 _mav_put_uint64_t(buf, 8, flags);
216 _mav_put_uint8_t(buf, 80, mode);
217 _mav_put_float_array(buf, 16, controls, 16);
218 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_ACTUATOR_CONTROLS, buf, MAVLINK_MSG_ID_HIL_ACTUATOR_CONTROLS_MIN_LEN, MAVLINK_MSG_ID_HIL_ACTUATOR_CONTROLS_LEN, MAVLINK_MSG_ID_HIL_ACTUATOR_CONTROLS_CRC);
220 mavlink_hil_actuator_controls_t packet;
221 packet.time_usec = time_usec;
222 packet.flags = flags;
224 mav_array_memcpy(packet.controls, controls,
sizeof(
float)*16);
225 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_ACTUATOR_CONTROLS, (
const char *)&packet, MAVLINK_MSG_ID_HIL_ACTUATOR_CONTROLS_MIN_LEN, MAVLINK_MSG_ID_HIL_ACTUATOR_CONTROLS_LEN, MAVLINK_MSG_ID_HIL_ACTUATOR_CONTROLS_CRC);
230
231
232
233
234static inline void mavlink_msg_hil_actuator_controls_send_struct(mavlink_channel_t chan,
const mavlink_hil_actuator_controls_t* hil_actuator_controls)
236#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
237 mavlink_msg_hil_actuator_controls_send(chan, hil_actuator_controls->time_usec, hil_actuator_controls->controls, hil_actuator_controls->mode, hil_actuator_controls->flags);
239 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_ACTUATOR_CONTROLS, (
const char *)hil_actuator_controls, MAVLINK_MSG_ID_HIL_ACTUATOR_CONTROLS_MIN_LEN, MAVLINK_MSG_ID_HIL_ACTUATOR_CONTROLS_LEN, MAVLINK_MSG_ID_HIL_ACTUATOR_CONTROLS_CRC);
243#if MAVLINK_MSG_ID_HIL_ACTUATOR_CONTROLS_LEN <= MAVLINK_MAX_PAYLOAD_LEN
245
246
247
248
249
250
251static inline void mavlink_msg_hil_actuator_controls_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_t time_usec,
const float *controls, uint8_t mode, uint64_t flags)
253#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
254 char *buf = (
char *)msgbuf;
255 _mav_put_uint64_t(buf, 0, time_usec);
256 _mav_put_uint64_t(buf, 8, flags);
257 _mav_put_uint8_t(buf, 80, mode);
258 _mav_put_float_array(buf, 16, controls, 16);
259 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_ACTUATOR_CONTROLS, buf, MAVLINK_MSG_ID_HIL_ACTUATOR_CONTROLS_MIN_LEN, MAVLINK_MSG_ID_HIL_ACTUATOR_CONTROLS_LEN, MAVLINK_MSG_ID_HIL_ACTUATOR_CONTROLS_CRC);
261 mavlink_hil_actuator_controls_t *packet = (mavlink_hil_actuator_controls_t *)msgbuf;
262 packet->time_usec = time_usec;
263 packet->flags = flags;
265 mav_array_memcpy(packet->controls, controls,
sizeof(
float)*16);
266 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_HIL_ACTUATOR_CONTROLS, (
const char *)packet, MAVLINK_MSG_ID_HIL_ACTUATOR_CONTROLS_MIN_LEN, MAVLINK_MSG_ID_HIL_ACTUATOR_CONTROLS_LEN, MAVLINK_MSG_ID_HIL_ACTUATOR_CONTROLS_CRC);
277
278
279
280
281static inline uint64_t mavlink_msg_hil_actuator_controls_get_time_usec(
const mavlink_message_t* msg)
283 return _MAV_RETURN_uint64_t(msg, 0);
287
288
289
290
291static inline uint16_t mavlink_msg_hil_actuator_controls_get_controls(
const mavlink_message_t* msg,
float *controls)
293 return _MAV_RETURN_float_array(msg, controls, 16, 16);
297
298
299
300
301static inline uint8_t mavlink_msg_hil_actuator_controls_get_mode(
const mavlink_message_t* msg)
303 return _MAV_RETURN_uint8_t(msg, 80);
307
308
309
310
311static inline uint64_t mavlink_msg_hil_actuator_controls_get_flags(
const mavlink_message_t* msg)
313 return _MAV_RETURN_uint64_t(msg, 8);
317
318
319
320
321
322static inline void mavlink_msg_hil_actuator_controls_decode(
const mavlink_message_t* msg, mavlink_hil_actuator_controls_t* hil_actuator_controls)
324#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
325 hil_actuator_controls->time_usec = mavlink_msg_hil_actuator_controls_get_time_usec(msg);
326 hil_actuator_controls->flags = mavlink_msg_hil_actuator_controls_get_flags(msg);
327 mavlink_msg_hil_actuator_controls_get_controls(msg, hil_actuator_controls->controls);
328 hil_actuator_controls->mode = mavlink_msg_hil_actuator_controls_get_mode(msg);
330 uint8_t len = msg->len < MAVLINK_MSG_ID_HIL_ACTUATOR_CONTROLS_LEN? msg->len : MAVLINK_MSG_ID_HIL_ACTUATOR_CONTROLS_LEN;
331 memset(hil_actuator_controls, 0, MAVLINK_MSG_ID_HIL_ACTUATOR_CONTROLS_LEN);
332 memcpy(hil_actuator_controls, _MAV_PAYLOAD(msg), len);
#define MAVLINK_MSG_ID_HIL_ACTUATOR_CONTROLS
Definition: mavlink_msg_hil_actuator_controls.h:4
#define MAVLINK_MSG_ID_HIL_ACTUATOR_CONTROLS_MIN_LEN
Definition: mavlink_msg_hil_actuator_controls.h:15
#define MAVLINK_MSG_ID_HIL_ACTUATOR_CONTROLS_CRC
Definition: mavlink_msg_hil_actuator_controls.h:19
#define MAVLINK_MSG_ID_HIL_ACTUATOR_CONTROLS_LEN
Definition: mavlink_msg_hil_actuator_controls.h:14
Definition: mavlink_msg_hil_actuator_controls.h:7
uint64_t time_usec
Definition: mavlink_msg_hil_actuator_controls.h:8
uint8_t mode
Definition: mavlink_msg_hil_actuator_controls.h:11
uint64_t flags
Definition: mavlink_msg_hil_actuator_controls.h:9
float controls[16]
Definition: mavlink_msg_hil_actuator_controls.h:10