4#define MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA 54
7typedef struct __mavlink_safety_set_allowed_area_t {
14 uint8_t target_system;
15 uint8_t target_component;
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) }, \
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) }, \
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
83 char buf[MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN];
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);
94 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN);
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);
110 msg->msgid = MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA;
111 return mavlink_finalize_message(msg, system_id, component_id, 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);
131static inline uint16_t mavlink_msg_safety_set_allowed_area_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
132 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
136 char buf[MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN];
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);
147 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN);
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);
163 msg->msgid = MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA;
164 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, 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);
175static 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)
177 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);
189static 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)
191 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);
208#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
210static 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)
212#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
213 char buf[MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN];
214 _mav_put_float(buf, 0, p1x);
215 _mav_put_float(buf, 4, p1y);
216 _mav_put_float(buf, 8, p1z);
217 _mav_put_float(buf, 12, p2x);
218 _mav_put_float(buf, 16, p2y);
219 _mav_put_float(buf, 20, p2z);
220 _mav_put_uint8_t(buf, 24, target_system);
221 _mav_put_uint8_t(buf, 25, target_component);
222 _mav_put_uint8_t(buf, 26, frame);
224 _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);
226 mavlink_safety_set_allowed_area_t packet;
233 packet.target_system = target_system;
234 packet.target_component = target_component;
235 packet.frame = frame;
237 _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);
246static 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)
248#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
249 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);
251 _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);
255#if MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN <= MAVLINK_MAX_PAYLOAD_LEN
263static 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)
265#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
266 char *buf = (
char *)msgbuf;
267 _mav_put_float(buf, 0, p1x);
268 _mav_put_float(buf, 4, p1y);
269 _mav_put_float(buf, 8, p1z);
270 _mav_put_float(buf, 12, p2x);
271 _mav_put_float(buf, 16, p2y);
272 _mav_put_float(buf, 20, p2z);
273 _mav_put_uint8_t(buf, 24, target_system);
274 _mav_put_uint8_t(buf, 25, target_component);
275 _mav_put_uint8_t(buf, 26, frame);
277 _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);
279 mavlink_safety_set_allowed_area_t *packet = (mavlink_safety_set_allowed_area_t *)msgbuf;
286 packet->target_system = target_system;
287 packet->target_component = target_component;
288 packet->frame = frame;
290 _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);
305static inline uint8_t mavlink_msg_safety_set_allowed_area_get_target_system(
const mavlink_message_t* msg)
307 return _MAV_RETURN_uint8_t(msg, 24);
315static inline uint8_t mavlink_msg_safety_set_allowed_area_get_target_component(
const mavlink_message_t* msg)
317 return _MAV_RETURN_uint8_t(msg, 25);
325static inline uint8_t mavlink_msg_safety_set_allowed_area_get_frame(
const mavlink_message_t* msg)
327 return _MAV_RETURN_uint8_t(msg, 26);
335static inline float mavlink_msg_safety_set_allowed_area_get_p1x(
const mavlink_message_t* msg)
337 return _MAV_RETURN_float(msg, 0);
345static inline float mavlink_msg_safety_set_allowed_area_get_p1y(
const mavlink_message_t* msg)
347 return _MAV_RETURN_float(msg, 4);
355static inline float mavlink_msg_safety_set_allowed_area_get_p1z(
const mavlink_message_t* msg)
357 return _MAV_RETURN_float(msg, 8);
365static inline float mavlink_msg_safety_set_allowed_area_get_p2x(
const mavlink_message_t* msg)
367 return _MAV_RETURN_float(msg, 12);
375static inline float mavlink_msg_safety_set_allowed_area_get_p2y(
const mavlink_message_t* msg)
377 return _MAV_RETURN_float(msg, 16);
385static inline float mavlink_msg_safety_set_allowed_area_get_p2z(
const mavlink_message_t* msg)
387 return _MAV_RETURN_float(msg, 20);
396static inline void mavlink_msg_safety_set_allowed_area_decode(
const mavlink_message_t* msg, mavlink_safety_set_allowed_area_t* safety_set_allowed_area)
398#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
399 safety_set_allowed_area->p1x = mavlink_msg_safety_set_allowed_area_get_p1x(msg);
400 safety_set_allowed_area->p1y = mavlink_msg_safety_set_allowed_area_get_p1y(msg);
401 safety_set_allowed_area->p1z = mavlink_msg_safety_set_allowed_area_get_p1z(msg);
402 safety_set_allowed_area->p2x = mavlink_msg_safety_set_allowed_area_get_p2x(msg);
403 safety_set_allowed_area->p2y = mavlink_msg_safety_set_allowed_area_get_p2y(msg);
404 safety_set_allowed_area->p2z = mavlink_msg_safety_set_allowed_area_get_p2z(msg);
405 safety_set_allowed_area->target_system = mavlink_msg_safety_set_allowed_area_get_target_system(msg);
406 safety_set_allowed_area->target_component = mavlink_msg_safety_set_allowed_area_get_target_component(msg);
407 safety_set_allowed_area->frame = mavlink_msg_safety_set_allowed_area_get_frame(msg);
409 uint8_t len = msg->len < MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN? msg->len : MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN;
410 memset(safety_set_allowed_area, 0, MAVLINK_MSG_ID_SAFETY_SET_ALLOWED_AREA_LEN);
411 memcpy(safety_set_allowed_area, _MAV_PAYLOAD(msg), len);