4#define MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA 54
17} mavlink_safety_set_allowed_area_t;
19#define MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN 27
20#define MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_MIN_LEN 27
21#define MAVLINK_MSG_ID_54_LEN 27
22#define MAVLINK_MSG_ID_54_MIN_LEN 27
24#define MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_CRC 15
25#define MAVLINK_MSG_ID_54_CRC 15
29#if MAVLINK_COMMAND_24BIT
30#define MAVLINK_MESSAGE_INFO_SAFETY_SET_ALLOWED_AREA {
32 "SAFETY_SET_ALLOWED_AREA",
34 { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0
, 24
, offsetof(mavlink_safety_set_allowed_area_t, target_system) },
35 { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0
, 25
, offsetof(mavlink_safety_set_allowed_area_t, target_component) },
36 { "frame", NULL, MAVLINK_TYPE_UINT8_T, 0
, 26
, offsetof(mavlink_safety_set_allowed_area_t, frame) },
37 { "p1x", NULL, MAVLINK_TYPE_FLOAT, 0
, 0
, offsetof(mavlink_safety_set_allowed_area_t, p1x) },
38 { "p1y", NULL, MAVLINK_TYPE_FLOAT, 0
, 4
, offsetof(mavlink_safety_set_allowed_area_t, p1y) },
39 { "p1z", NULL, MAVLINK_TYPE_FLOAT, 0
, 8
, offsetof(mavlink_safety_set_allowed_area_t, p1z) },
40 { "p2x", NULL, MAVLINK_TYPE_FLOAT, 0
, 12
, offsetof(mavlink_safety_set_allowed_area_t, p2x) },
41 { "p2y", NULL, MAVLINK_TYPE_FLOAT, 0
, 16
, offsetof(mavlink_safety_set_allowed_area_t, p2y) },
42 { "p2z", NULL, MAVLINK_TYPE_FLOAT, 0
, 20
, offsetof(mavlink_safety_set_allowed_area_t, p2z) },
44}
46#define MAVLINK_MESSAGE_INFO_SAFETY_SET_ALLOWED_AREA {
47 "SAFETY_SET_ALLOWED_AREA",
49 { { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0
, 24
, offsetof(mavlink_safety_set_allowed_area_t, target_system) },
50 { "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0
, 25
, offsetof(mavlink_safety_set_allowed_area_t, target_component) },
51 { "frame", NULL, MAVLINK_TYPE_UINT8_T, 0
, 26
, offsetof(mavlink_safety_set_allowed_area_t, frame) },
52 { "p1x", NULL, MAVLINK_TYPE_FLOAT, 0
, 0
, offsetof(mavlink_safety_set_allowed_area_t, p1x) },
53 { "p1y", NULL, MAVLINK_TYPE_FLOAT, 0
, 4
, offsetof(mavlink_safety_set_allowed_area_t, p1y) },
54 { "p1z", NULL, MAVLINK_TYPE_FLOAT, 0
, 8
, offsetof(mavlink_safety_set_allowed_area_t, p1z) },
55 { "p2x", NULL, MAVLINK_TYPE_FLOAT, 0
, 12
, offsetof(mavlink_safety_set_allowed_area_t, p2x) },
56 { "p2y", NULL, MAVLINK_TYPE_FLOAT, 0
, 16
, offsetof(mavlink_safety_set_allowed_area_t, p2y) },
57 { "p2z", NULL, MAVLINK_TYPE_FLOAT, 0
, 20
, offsetof(mavlink_safety_set_allowed_area_t, p2z) },
59}
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79static inline uint16_t mavlink_msg_safety_set_allowed_area_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
80 uint8_t target_system, uint8_t target_component, uint8_t frame,
float p1x,
float p1y,
float p1z,
float p2x,
float p2y,
float p2z)
82#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
84 _mav_put_float(buf, 0, p1x);
85 _mav_put_float(buf, 4, p1y);
86 _mav_put_float(buf, 8, p1z);
87 _mav_put_float(buf, 12, p2x);
88 _mav_put_float(buf, 16, p2y);
89 _mav_put_float(buf, 20, p2z);
90 _mav_put_uint8_t(buf, 24, target_system);
91 _mav_put_uint8_t(buf, 25, target_component);
92 _mav_put_uint8_t(buf, 26, frame);
96 mavlink_safety_set_allowed_area_t packet;
103 packet.target_system = target_system;
104 packet.target_component = target_component;
105 packet.frame = frame;
107 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN);
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132static inline uint16_t mavlink_msg_safety_set_allowed_area_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
133 uint8_t target_system, uint8_t target_component, uint8_t frame,
float p1x,
float p1y,
float p1z,
float p2x,
float p2y,
float p2z)
135#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
137 _mav_put_float(buf, 0, p1x);
138 _mav_put_float(buf, 4, p1y);
139 _mav_put_float(buf, 8, p1z);
140 _mav_put_float(buf, 12, p2x);
141 _mav_put_float(buf, 16, p2y);
142 _mav_put_float(buf, 20, p2z);
143 _mav_put_uint8_t(buf, 24, target_system);
144 _mav_put_uint8_t(buf, 25, target_component);
145 _mav_put_uint8_t(buf, 26, frame);
149 mavlink_safety_set_allowed_area_t packet;
156 packet.target_system = target_system;
157 packet.target_component = target_component;
158 packet.frame = frame;
160 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN);
165 return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_MIN_LEN, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_CRC);
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188static inline uint16_t mavlink_msg_safety_set_allowed_area_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
189 mavlink_message_t* msg,
190 uint8_t target_system,uint8_t target_component,uint8_t frame,
float p1x,
float p1y,
float p1z,
float p2x,
float p2y,
float p2z)
192#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
194 _mav_put_float(buf, 0, p1x);
195 _mav_put_float(buf, 4, p1y);
196 _mav_put_float(buf, 8, p1z);
197 _mav_put_float(buf, 12, p2x);
198 _mav_put_float(buf, 16, p2y);
199 _mav_put_float(buf, 20, p2z);
200 _mav_put_uint8_t(buf, 24, target_system);
201 _mav_put_uint8_t(buf, 25, target_component);
202 _mav_put_uint8_t(buf, 26, frame);
206 mavlink_safety_set_allowed_area_t packet;
213 packet.target_system = target_system;
214 packet.target_component = target_component;
215 packet.frame = frame;
217 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN);
225
226
227
228
229
230
231
232static inline uint16_t mavlink_msg_safety_set_allowed_area_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_safety_set_allowed_area_t* safety_set_allowed_area)
234 return mavlink_msg_safety_set_allowed_area_pack(system_id, component_id, msg, safety_set_allowed_area->target_system, safety_set_allowed_area->target_component, safety_set_allowed_area->frame, safety_set_allowed_area->p1x, safety_set_allowed_area->p1y, safety_set_allowed_area->p1z, safety_set_allowed_area->p2x, safety_set_allowed_area->p2y, safety_set_allowed_area->p2z);
238
239
240
241
242
243
244
245
246static inline uint16_t mavlink_msg_safety_set_allowed_area_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_safety_set_allowed_area_t* safety_set_allowed_area)
248 return mavlink_msg_safety_set_allowed_area_pack_chan(system_id, component_id, chan, msg, safety_set_allowed_area->target_system, safety_set_allowed_area->target_component, safety_set_allowed_area->frame, safety_set_allowed_area->p1x, safety_set_allowed_area->p1y, safety_set_allowed_area->p1z, safety_set_allowed_area->p2x, safety_set_allowed_area->p2y, safety_set_allowed_area->p2z);
252
253
254
255
256
257
258
259
260static inline uint16_t mavlink_msg_safety_set_allowed_area_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg,
const mavlink_safety_set_allowed_area_t* safety_set_allowed_area)
262 return mavlink_msg_safety_set_allowed_area_pack_status(system_id, component_id, _status, msg, safety_set_allowed_area->target_system, safety_set_allowed_area->target_component, safety_set_allowed_area->frame, safety_set_allowed_area->p1x, safety_set_allowed_area->p1y, safety_set_allowed_area->p1z, safety_set_allowed_area->p2x, safety_set_allowed_area->p2y, safety_set_allowed_area->p2z);
266
267
268
269
270
271
272
273
274
275
276
277
278
279#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
281static inline void mavlink_msg_safety_set_allowed_area_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t frame,
float p1x,
float p1y,
float p1z,
float p2x,
float p2y,
float p2z)
283#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
284 char buf[MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN];
285 _mav_put_float(buf, 0, p1x);
286 _mav_put_float(buf, 4, p1y);
287 _mav_put_float(buf, 8, p1z);
288 _mav_put_float(buf, 12, p2x);
289 _mav_put_float(buf, 16, p2y);
290 _mav_put_float(buf, 20, p2z);
291 _mav_put_uint8_t(buf, 24, target_system);
292 _mav_put_uint8_t(buf, 25, target_component);
293 _mav_put_uint8_t(buf, 26, frame);
295 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA, buf, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_MIN_LEN, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_CRC);
297 mavlink_safety_set_allowed_area_t packet;
304 packet.target_system = target_system;
305 packet.target_component = target_component;
306 packet.frame = frame;
308 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA, (
const char *)&packet, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_MIN_LEN, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_CRC);
313
314
315
316
317static inline void mavlink_msg_safety_set_allowed_area_send_struct(mavlink_channel_t chan,
const mavlink_safety_set_allowed_area_t* safety_set_allowed_area)
319#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
320 mavlink_msg_safety_set_allowed_area_send(chan, safety_set_allowed_area->target_system, safety_set_allowed_area->target_component, safety_set_allowed_area->frame, safety_set_allowed_area->p1x, safety_set_allowed_area->p1y, safety_set_allowed_area->p1z, safety_set_allowed_area->p2x, safety_set_allowed_area->p2y, safety_set_allowed_area->p2z);
322 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA, (
const char *)safety_set_allowed_area, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_MIN_LEN, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_CRC);
326#if MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN <= MAVLINK_MAX_PAYLOAD_LEN
328
329
330
331
332
333
334static inline void mavlink_msg_safety_set_allowed_area_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint8_t frame,
float p1x,
float p1y,
float p1z,
float p2x,
float p2y,
float p2z)
336#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
337 char *buf = (
char *)msgbuf;
338 _mav_put_float(buf, 0, p1x);
339 _mav_put_float(buf, 4, p1y);
340 _mav_put_float(buf, 8, p1z);
341 _mav_put_float(buf, 12, p2x);
342 _mav_put_float(buf, 16, p2y);
343 _mav_put_float(buf, 20, p2z);
344 _mav_put_uint8_t(buf, 24, target_system);
345 _mav_put_uint8_t(buf, 25, target_component);
346 _mav_put_uint8_t(buf, 26, frame);
348 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA, buf, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_MIN_LEN, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_CRC);
350 mavlink_safety_set_allowed_area_t *packet = (mavlink_safety_set_allowed_area_t *)msgbuf;
357 packet->target_system = target_system;
358 packet->target_component = target_component;
359 packet->frame = frame;
361 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA, (
const char *)packet, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_MIN_LEN, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_CRC);
372
373
374
375
376static inline uint8_t mavlink_msg_safety_set_allowed_area_get_target_system(
const mavlink_message_t* msg)
378 return _MAV_RETURN_uint8_t(msg, 24);
382
383
384
385
386static inline uint8_t mavlink_msg_safety_set_allowed_area_get_target_component(
const mavlink_message_t* msg)
388 return _MAV_RETURN_uint8_t(msg, 25);
392
393
394
395
396static inline uint8_t mavlink_msg_safety_set_allowed_area_get_frame(
const mavlink_message_t* msg)
398 return _MAV_RETURN_uint8_t(msg, 26);
402
403
404
405
406static inline float mavlink_msg_safety_set_allowed_area_get_p1x(
const mavlink_message_t* msg)
408 return _MAV_RETURN_float(msg, 0);
412
413
414
415
416static inline float mavlink_msg_safety_set_allowed_area_get_p1y(
const mavlink_message_t* msg)
418 return _MAV_RETURN_float(msg, 4);
422
423
424
425
426static inline float mavlink_msg_safety_set_allowed_area_get_p1z(
const mavlink_message_t* msg)
428 return _MAV_RETURN_float(msg, 8);
432
433
434
435
436static inline float mavlink_msg_safety_set_allowed_area_get_p2x(
const mavlink_message_t* msg)
438 return _MAV_RETURN_float(msg, 12);
442
443
444
445
446static inline float mavlink_msg_safety_set_allowed_area_get_p2y(
const mavlink_message_t* msg)
448 return _MAV_RETURN_float(msg, 16);
452
453
454
455
456static inline float mavlink_msg_safety_set_allowed_area_get_p2z(
const mavlink_message_t* msg)
458 return _MAV_RETURN_float(msg, 20);
462
463
464
465
466
467static inline void mavlink_msg_safety_set_allowed_area_decode(
const mavlink_message_t* msg, mavlink_safety_set_allowed_area_t* safety_set_allowed_area)
469#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
470 safety_set_allowed_area->p1x = mavlink_msg_safety_set_allowed_area_get_p1x(msg);
471 safety_set_allowed_area->p1y = mavlink_msg_safety_set_allowed_area_get_p1y(msg);
472 safety_set_allowed_area->p1z = mavlink_msg_safety_set_allowed_area_get_p1z(msg);
473 safety_set_allowed_area->p2x = mavlink_msg_safety_set_allowed_area_get_p2x(msg);
474 safety_set_allowed_area->p2y = mavlink_msg_safety_set_allowed_area_get_p2y(msg);
475 safety_set_allowed_area->p2z = mavlink_msg_safety_set_allowed_area_get_p2z(msg);
476 safety_set_allowed_area->target_system = mavlink_msg_safety_set_allowed_area_get_target_system(msg);
477 safety_set_allowed_area->target_component = mavlink_msg_safety_set_allowed_area_get_target_component(msg);
478 safety_set_allowed_area->frame = mavlink_msg_safety_set_allowed_area_get_frame(msg);
480 uint8_t len = msg->len < MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN? msg->len : MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN;
481 memset(safety_set_allowed_area, 0, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN);
482 memcpy(safety_set_allowed_area, _MAV_PAYLOAD(msg), len);
#define MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_CRC
Definition: mavlink_msg_safety_set_allowed_area.h:24
#define MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA
Definition: mavlink_msg_safety_set_allowed_area.h:4
#define MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN
Definition: mavlink_msg_safety_set_allowed_area.h:19
#define MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_MIN_LEN
Definition: mavlink_msg_safety_set_allowed_area.h:20
Definition: mavlink_msg_safety_set_allowed_area.h:7
float p1x
Definition: mavlink_msg_safety_set_allowed_area.h:8
uint8_t target_component
Definition: mavlink_msg_safety_set_allowed_area.h:15
float p1y
Definition: mavlink_msg_safety_set_allowed_area.h:9
float p2y
Definition: mavlink_msg_safety_set_allowed_area.h:12
uint8_t frame
Definition: mavlink_msg_safety_set_allowed_area.h:16
float p2z
Definition: mavlink_msg_safety_set_allowed_area.h:13
float p1z
Definition: mavlink_msg_safety_set_allowed_area.h:10
uint8_t target_system
Definition: mavlink_msg_safety_set_allowed_area.h:14
float p2x
Definition: mavlink_msg_safety_set_allowed_area.h:11