4#define MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY 11001
7typedef struct __mavlink_device_op_read_reply_t {
13}) mavlink_device_op_read_reply_t;
15#define MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY_LEN 135
16#define MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY_MIN_LEN 135
17#define MAVLINK_MSG_ID_11001_LEN 135
18#define MAVLINK_MSG_ID_11001_MIN_LEN 135
20#define MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY_CRC 15
21#define MAVLINK_MSG_ID_11001_CRC 15
23#define MAVLINK_MSG_DEVICE_OP_READ_REPLY_FIELD_DATA_LEN 128
25#if MAVLINK_COMMAND_24BIT
26#define MAVLINK_MESSAGE_INFO_DEVICE_OP_READ_REPLY { \
28 "DEVICE_OP_READ_REPLY", \
30 { { "request_id", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_device_op_read_reply_t, request_id) }, \
31 { "result", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_device_op_read_reply_t, result) }, \
32 { "regstart", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_device_op_read_reply_t, regstart) }, \
33 { "count", NULL, MAVLINK_TYPE_UINT8_T, 0, 6, offsetof(mavlink_device_op_read_reply_t, count) }, \
34 { "data", NULL, MAVLINK_TYPE_UINT8_T, 128, 7, offsetof(mavlink_device_op_read_reply_t, data) }, \
38#define MAVLINK_MESSAGE_INFO_DEVICE_OP_READ_REPLY { \
39 "DEVICE_OP_READ_REPLY", \
41 { { "request_id", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_device_op_read_reply_t, request_id) }, \
42 { "result", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_device_op_read_reply_t, result) }, \
43 { "regstart", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_device_op_read_reply_t, regstart) }, \
44 { "count", NULL, MAVLINK_TYPE_UINT8_T, 0, 6, offsetof(mavlink_device_op_read_reply_t, count) }, \
45 { "data", NULL, MAVLINK_TYPE_UINT8_T, 128, 7, offsetof(mavlink_device_op_read_reply_t, data) }, \
63static inline uint16_t mavlink_msg_device_op_read_reply_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
64 uint32_t request_id, uint8_t result, uint8_t regstart, uint8_t count,
const uint8_t *data)
66#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
67 char buf[MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY_LEN];
68 _mav_put_uint32_t(buf, 0, request_id);
69 _mav_put_uint8_t(buf, 4, result);
70 _mav_put_uint8_t(buf, 5, regstart);
71 _mav_put_uint8_t(buf, 6, count);
72 _mav_put_uint8_t_array(buf, 7, data, 128);
73 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY_LEN);
75 mavlink_device_op_read_reply_t packet;
76 packet.request_id = request_id;
77 packet.result = result;
78 packet.regstart = regstart;
80 mav_array_memcpy(packet.data, data,
sizeof(uint8_t)*128);
81 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY_LEN);
84 msg->msgid = MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY;
85 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY_MIN_LEN, MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY_LEN, MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY_CRC);
101static inline uint16_t mavlink_msg_device_op_read_reply_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
102 mavlink_message_t* msg,
103 uint32_t request_id,uint8_t result,uint8_t regstart,uint8_t count,
const uint8_t *data)
105#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
106 char buf[MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY_LEN];
107 _mav_put_uint32_t(buf, 0, request_id);
108 _mav_put_uint8_t(buf, 4, result);
109 _mav_put_uint8_t(buf, 5, regstart);
110 _mav_put_uint8_t(buf, 6, count);
111 _mav_put_uint8_t_array(buf, 7, data, 128);
112 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY_LEN);
114 mavlink_device_op_read_reply_t packet;
115 packet.request_id = request_id;
116 packet.result = result;
117 packet.regstart = regstart;
118 packet.count = count;
119 mav_array_memcpy(packet.data, data,
sizeof(uint8_t)*128);
120 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY_LEN);
123 msg->msgid = MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY;
124 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY_MIN_LEN, MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY_LEN, MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY_CRC);
135static inline uint16_t mavlink_msg_device_op_read_reply_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_device_op_read_reply_t* device_op_read_reply)
137 return mavlink_msg_device_op_read_reply_pack(system_id, component_id, msg, device_op_read_reply->request_id, device_op_read_reply->result, device_op_read_reply->regstart, device_op_read_reply->count, device_op_read_reply->data);
149static inline uint16_t mavlink_msg_device_op_read_reply_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_device_op_read_reply_t* device_op_read_reply)
151 return mavlink_msg_device_op_read_reply_pack_chan(system_id, component_id, chan, msg, device_op_read_reply->request_id, device_op_read_reply->result, device_op_read_reply->regstart, device_op_read_reply->count, device_op_read_reply->data);
164#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
166static inline void mavlink_msg_device_op_read_reply_send(mavlink_channel_t chan, uint32_t request_id, uint8_t result, uint8_t regstart, uint8_t count,
const uint8_t *data)
168#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
169 char buf[MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY_LEN];
170 _mav_put_uint32_t(buf, 0, request_id);
171 _mav_put_uint8_t(buf, 4, result);
172 _mav_put_uint8_t(buf, 5, regstart);
173 _mav_put_uint8_t(buf, 6, count);
174 _mav_put_uint8_t_array(buf, 7, data, 128);
175 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY, buf, MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY_MIN_LEN, MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY_LEN, MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY_CRC);
177 mavlink_device_op_read_reply_t packet;
178 packet.request_id = request_id;
179 packet.result = result;
180 packet.regstart = regstart;
181 packet.count = count;
182 mav_array_memcpy(packet.data, data,
sizeof(uint8_t)*128);
183 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY, (
const char *)&packet, MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY_MIN_LEN, MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY_LEN, MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY_CRC);
192static inline void mavlink_msg_device_op_read_reply_send_struct(mavlink_channel_t chan,
const mavlink_device_op_read_reply_t* device_op_read_reply)
194#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
195 mavlink_msg_device_op_read_reply_send(chan, device_op_read_reply->request_id, device_op_read_reply->result, device_op_read_reply->regstart, device_op_read_reply->count, device_op_read_reply->data);
197 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY, (
const char *)device_op_read_reply, MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY_MIN_LEN, MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY_LEN, MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY_CRC);
201#if MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY_LEN <= MAVLINK_MAX_PAYLOAD_LEN
209static inline void mavlink_msg_device_op_read_reply_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t request_id, uint8_t result, uint8_t regstart, uint8_t count,
const uint8_t *data)
211#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
212 char *buf = (
char *)msgbuf;
213 _mav_put_uint32_t(buf, 0, request_id);
214 _mav_put_uint8_t(buf, 4, result);
215 _mav_put_uint8_t(buf, 5, regstart);
216 _mav_put_uint8_t(buf, 6, count);
217 _mav_put_uint8_t_array(buf, 7, data, 128);
218 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY, buf, MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY_MIN_LEN, MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY_LEN, MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY_CRC);
220 mavlink_device_op_read_reply_t *packet = (mavlink_device_op_read_reply_t *)msgbuf;
221 packet->request_id = request_id;
222 packet->result = result;
223 packet->regstart = regstart;
224 packet->count = count;
225 mav_array_memcpy(packet->data, data,
sizeof(uint8_t)*128);
226 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY, (
const char *)packet, MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY_MIN_LEN, MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY_LEN, MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY_CRC);
241static inline uint32_t mavlink_msg_device_op_read_reply_get_request_id(
const mavlink_message_t* msg)
243 return _MAV_RETURN_uint32_t(msg, 0);
251static inline uint8_t mavlink_msg_device_op_read_reply_get_result(
const mavlink_message_t* msg)
253 return _MAV_RETURN_uint8_t(msg, 4);
261static inline uint8_t mavlink_msg_device_op_read_reply_get_regstart(
const mavlink_message_t* msg)
263 return _MAV_RETURN_uint8_t(msg, 5);
271static inline uint8_t mavlink_msg_device_op_read_reply_get_count(
const mavlink_message_t* msg)
273 return _MAV_RETURN_uint8_t(msg, 6);
281static inline uint16_t mavlink_msg_device_op_read_reply_get_data(
const mavlink_message_t* msg, uint8_t *data)
283 return _MAV_RETURN_uint8_t_array(msg, data, 128, 7);
292static inline void mavlink_msg_device_op_read_reply_decode(
const mavlink_message_t* msg, mavlink_device_op_read_reply_t* device_op_read_reply)
294#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
295 device_op_read_reply->request_id = mavlink_msg_device_op_read_reply_get_request_id(msg);
296 device_op_read_reply->result = mavlink_msg_device_op_read_reply_get_result(msg);
297 device_op_read_reply->regstart = mavlink_msg_device_op_read_reply_get_regstart(msg);
298 device_op_read_reply->count = mavlink_msg_device_op_read_reply_get_count(msg);
299 mavlink_msg_device_op_read_reply_get_data(msg, device_op_read_reply->data);
301 uint8_t len = msg->len < MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY_LEN? msg->len : MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY_LEN;
302 memset(device_op_read_reply, 0, MAVLINK_MSG_ID_DEVICE_OP_READ_REPLY_LEN);
303 memcpy(device_op_read_reply, _MAV_PAYLOAD(msg), len);