4#define MAVLINK_MSG_ID_CAMERA_STATUS 179
7typedef struct __mavlink_camera_status_t {
14 uint8_t target_system;
17}) mavlink_camera_status_t;
19#define MAVLINK_MSG_ID_CAMERA_STATUS_LEN 29
20#define MAVLINK_MSG_ID_CAMERA_STATUS_MIN_LEN 29
21#define MAVLINK_MSG_ID_179_LEN 29
22#define MAVLINK_MSG_ID_179_MIN_LEN 29
24#define MAVLINK_MSG_ID_CAMERA_STATUS_CRC 189
25#define MAVLINK_MSG_ID_179_CRC 189
29#if MAVLINK_COMMAND_24BIT
30#define MAVLINK_MESSAGE_INFO_CAMERA_STATUS { \
34 { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_camera_status_t, time_usec) }, \
35 { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 26, offsetof(mavlink_camera_status_t, target_system) }, \
36 { "cam_idx", NULL, MAVLINK_TYPE_UINT8_T, 0, 27, offsetof(mavlink_camera_status_t, cam_idx) }, \
37 { "img_idx", NULL, MAVLINK_TYPE_UINT16_T, 0, 24, offsetof(mavlink_camera_status_t, img_idx) }, \
38 { "event_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 28, offsetof(mavlink_camera_status_t, event_id) }, \
39 { "p1", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_camera_status_t, p1) }, \
40 { "p2", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_camera_status_t, p2) }, \
41 { "p3", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_camera_status_t, p3) }, \
42 { "p4", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_camera_status_t, p4) }, \
46#define MAVLINK_MESSAGE_INFO_CAMERA_STATUS { \
49 { { "time_usec", NULL, MAVLINK_TYPE_UINT64_T, 0, 0, offsetof(mavlink_camera_status_t, time_usec) }, \
50 { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 26, offsetof(mavlink_camera_status_t, target_system) }, \
51 { "cam_idx", NULL, MAVLINK_TYPE_UINT8_T, 0, 27, offsetof(mavlink_camera_status_t, cam_idx) }, \
52 { "img_idx", NULL, MAVLINK_TYPE_UINT16_T, 0, 24, offsetof(mavlink_camera_status_t, img_idx) }, \
53 { "event_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 28, offsetof(mavlink_camera_status_t, event_id) }, \
54 { "p1", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_camera_status_t, p1) }, \
55 { "p2", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_camera_status_t, p2) }, \
56 { "p3", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_camera_status_t, p3) }, \
57 { "p4", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_camera_status_t, p4) }, \
79static inline uint16_t mavlink_msg_camera_status_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
80 uint64_t time_usec, uint8_t target_system, uint8_t cam_idx, uint16_t img_idx, uint8_t event_id,
float p1,
float p2,
float p3,
float p4)
82#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
83 char buf[MAVLINK_MSG_ID_CAMERA_STATUS_LEN];
84 _mav_put_uint64_t(buf, 0, time_usec);
85 _mav_put_float(buf, 8, p1);
86 _mav_put_float(buf, 12, p2);
87 _mav_put_float(buf, 16, p3);
88 _mav_put_float(buf, 20, p4);
89 _mav_put_uint16_t(buf, 24, img_idx);
90 _mav_put_uint8_t(buf, 26, target_system);
91 _mav_put_uint8_t(buf, 27, cam_idx);
92 _mav_put_uint8_t(buf, 28, event_id);
94 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CAMERA_STATUS_LEN);
96 mavlink_camera_status_t packet;
97 packet.time_usec = time_usec;
102 packet.img_idx = img_idx;
103 packet.target_system = target_system;
104 packet.cam_idx = cam_idx;
105 packet.event_id = event_id;
107 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CAMERA_STATUS_LEN);
110 msg->msgid = MAVLINK_MSG_ID_CAMERA_STATUS;
111 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_CAMERA_STATUS_MIN_LEN, MAVLINK_MSG_ID_CAMERA_STATUS_LEN, MAVLINK_MSG_ID_CAMERA_STATUS_CRC);
131static inline uint16_t mavlink_msg_camera_status_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
132 mavlink_message_t* msg,
133 uint64_t time_usec,uint8_t target_system,uint8_t cam_idx,uint16_t img_idx,uint8_t event_id,
float p1,
float p2,
float p3,
float p4)
135#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
136 char buf[MAVLINK_MSG_ID_CAMERA_STATUS_LEN];
137 _mav_put_uint64_t(buf, 0, time_usec);
138 _mav_put_float(buf, 8, p1);
139 _mav_put_float(buf, 12, p2);
140 _mav_put_float(buf, 16, p3);
141 _mav_put_float(buf, 20, p4);
142 _mav_put_uint16_t(buf, 24, img_idx);
143 _mav_put_uint8_t(buf, 26, target_system);
144 _mav_put_uint8_t(buf, 27, cam_idx);
145 _mav_put_uint8_t(buf, 28, event_id);
147 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_CAMERA_STATUS_LEN);
149 mavlink_camera_status_t packet;
150 packet.time_usec = time_usec;
155 packet.img_idx = img_idx;
156 packet.target_system = target_system;
157 packet.cam_idx = cam_idx;
158 packet.event_id = event_id;
160 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_CAMERA_STATUS_LEN);
163 msg->msgid = MAVLINK_MSG_ID_CAMERA_STATUS;
164 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_CAMERA_STATUS_MIN_LEN, MAVLINK_MSG_ID_CAMERA_STATUS_LEN, MAVLINK_MSG_ID_CAMERA_STATUS_CRC);
175static inline uint16_t mavlink_msg_camera_status_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_camera_status_t* camera_status)
177 return mavlink_msg_camera_status_pack(system_id, component_id, msg, camera_status->time_usec, camera_status->target_system, camera_status->cam_idx, camera_status->img_idx, camera_status->event_id, camera_status->p1, camera_status->p2, camera_status->p3, camera_status->p4);
189static inline uint16_t mavlink_msg_camera_status_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_camera_status_t* camera_status)
191 return mavlink_msg_camera_status_pack_chan(system_id, component_id, chan, msg, camera_status->time_usec, camera_status->target_system, camera_status->cam_idx, camera_status->img_idx, camera_status->event_id, camera_status->p1, camera_status->p2, camera_status->p3, camera_status->p4);
208#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
210static inline void mavlink_msg_camera_status_send(mavlink_channel_t chan, uint64_t time_usec, uint8_t target_system, uint8_t cam_idx, uint16_t img_idx, uint8_t event_id,
float p1,
float p2,
float p3,
float p4)
212#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
213 char buf[MAVLINK_MSG_ID_CAMERA_STATUS_LEN];
214 _mav_put_uint64_t(buf, 0, time_usec);
215 _mav_put_float(buf, 8, p1);
216 _mav_put_float(buf, 12, p2);
217 _mav_put_float(buf, 16, p3);
218 _mav_put_float(buf, 20, p4);
219 _mav_put_uint16_t(buf, 24, img_idx);
220 _mav_put_uint8_t(buf, 26, target_system);
221 _mav_put_uint8_t(buf, 27, cam_idx);
222 _mav_put_uint8_t(buf, 28, event_id);
224 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CAMERA_STATUS, buf, MAVLINK_MSG_ID_CAMERA_STATUS_MIN_LEN, MAVLINK_MSG_ID_CAMERA_STATUS_LEN, MAVLINK_MSG_ID_CAMERA_STATUS_CRC);
226 mavlink_camera_status_t packet;
227 packet.time_usec = time_usec;
232 packet.img_idx = img_idx;
233 packet.target_system = target_system;
234 packet.cam_idx = cam_idx;
235 packet.event_id = event_id;
237 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CAMERA_STATUS, (
const char *)&packet, MAVLINK_MSG_ID_CAMERA_STATUS_MIN_LEN, MAVLINK_MSG_ID_CAMERA_STATUS_LEN, MAVLINK_MSG_ID_CAMERA_STATUS_CRC);
246static inline void mavlink_msg_camera_status_send_struct(mavlink_channel_t chan,
const mavlink_camera_status_t* camera_status)
248#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
249 mavlink_msg_camera_status_send(chan, camera_status->time_usec, camera_status->target_system, camera_status->cam_idx, camera_status->img_idx, camera_status->event_id, camera_status->p1, camera_status->p2, camera_status->p3, camera_status->p4);
251 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CAMERA_STATUS, (
const char *)camera_status, MAVLINK_MSG_ID_CAMERA_STATUS_MIN_LEN, MAVLINK_MSG_ID_CAMERA_STATUS_LEN, MAVLINK_MSG_ID_CAMERA_STATUS_CRC);
255#if MAVLINK_MSG_ID_CAMERA_STATUS_LEN <= MAVLINK_MAX_PAYLOAD_LEN
263static inline void mavlink_msg_camera_status_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint64_t time_usec, uint8_t target_system, uint8_t cam_idx, uint16_t img_idx, uint8_t event_id,
float p1,
float p2,
float p3,
float p4)
265#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
266 char *buf = (
char *)msgbuf;
267 _mav_put_uint64_t(buf, 0, time_usec);
268 _mav_put_float(buf, 8, p1);
269 _mav_put_float(buf, 12, p2);
270 _mav_put_float(buf, 16, p3);
271 _mav_put_float(buf, 20, p4);
272 _mav_put_uint16_t(buf, 24, img_idx);
273 _mav_put_uint8_t(buf, 26, target_system);
274 _mav_put_uint8_t(buf, 27, cam_idx);
275 _mav_put_uint8_t(buf, 28, event_id);
277 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CAMERA_STATUS, buf, MAVLINK_MSG_ID_CAMERA_STATUS_MIN_LEN, MAVLINK_MSG_ID_CAMERA_STATUS_LEN, MAVLINK_MSG_ID_CAMERA_STATUS_CRC);
279 mavlink_camera_status_t *packet = (mavlink_camera_status_t *)msgbuf;
280 packet->time_usec = time_usec;
285 packet->img_idx = img_idx;
286 packet->target_system = target_system;
287 packet->cam_idx = cam_idx;
288 packet->event_id = event_id;
290 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_CAMERA_STATUS, (
const char *)packet, MAVLINK_MSG_ID_CAMERA_STATUS_MIN_LEN, MAVLINK_MSG_ID_CAMERA_STATUS_LEN, MAVLINK_MSG_ID_CAMERA_STATUS_CRC);
305static inline uint64_t mavlink_msg_camera_status_get_time_usec(
const mavlink_message_t* msg)
307 return _MAV_RETURN_uint64_t(msg, 0);
315static inline uint8_t mavlink_msg_camera_status_get_target_system(
const mavlink_message_t* msg)
317 return _MAV_RETURN_uint8_t(msg, 26);
325static inline uint8_t mavlink_msg_camera_status_get_cam_idx(
const mavlink_message_t* msg)
327 return _MAV_RETURN_uint8_t(msg, 27);
335static inline uint16_t mavlink_msg_camera_status_get_img_idx(
const mavlink_message_t* msg)
337 return _MAV_RETURN_uint16_t(msg, 24);
345static inline uint8_t mavlink_msg_camera_status_get_event_id(
const mavlink_message_t* msg)
347 return _MAV_RETURN_uint8_t(msg, 28);
355static inline float mavlink_msg_camera_status_get_p1(
const mavlink_message_t* msg)
357 return _MAV_RETURN_float(msg, 8);
365static inline float mavlink_msg_camera_status_get_p2(
const mavlink_message_t* msg)
367 return _MAV_RETURN_float(msg, 12);
375static inline float mavlink_msg_camera_status_get_p3(
const mavlink_message_t* msg)
377 return _MAV_RETURN_float(msg, 16);
385static inline float mavlink_msg_camera_status_get_p4(
const mavlink_message_t* msg)
387 return _MAV_RETURN_float(msg, 20);
396static inline void mavlink_msg_camera_status_decode(
const mavlink_message_t* msg, mavlink_camera_status_t* camera_status)
398#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
399 camera_status->time_usec = mavlink_msg_camera_status_get_time_usec(msg);
400 camera_status->p1 = mavlink_msg_camera_status_get_p1(msg);
401 camera_status->p2 = mavlink_msg_camera_status_get_p2(msg);
402 camera_status->p3 = mavlink_msg_camera_status_get_p3(msg);
403 camera_status->p4 = mavlink_msg_camera_status_get_p4(msg);
404 camera_status->img_idx = mavlink_msg_camera_status_get_img_idx(msg);
405 camera_status->target_system = mavlink_msg_camera_status_get_target_system(msg);
406 camera_status->cam_idx = mavlink_msg_camera_status_get_cam_idx(msg);
407 camera_status->event_id = mavlink_msg_camera_status_get_event_id(msg);
409 uint8_t len = msg->len < MAVLINK_MSG_ID_CAMERA_STATUS_LEN? msg->len : MAVLINK_MSG_ID_CAMERA_STATUS_LEN;
410 memset(camera_status, 0, MAVLINK_MSG_ID_CAMERA_STATUS_LEN);
411 memcpy(camera_status, _MAV_PAYLOAD(msg), len);