4#define MAVLINK_MSG_ID_STORAGE_INFORMATION 261
7typedef struct __mavlink_storage_information_t {
11 float available_capacity;
15 uint8_t storage_count;
17}) mavlink_storage_information_t;
19#define MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN 27
20#define MAVLINK_MSG_ID_STORAGE_INFORMATION_MIN_LEN 27
21#define MAVLINK_MSG_ID_261_LEN 27
22#define MAVLINK_MSG_ID_261_MIN_LEN 27
24#define MAVLINK_MSG_ID_STORAGE_INFORMATION_CRC 179
25#define MAVLINK_MSG_ID_261_CRC 179
29#if MAVLINK_COMMAND_24BIT
30#define MAVLINK_MESSAGE_INFO_STORAGE_INFORMATION { \
32 "STORAGE_INFORMATION", \
34 { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_storage_information_t, time_boot_ms) }, \
35 { "storage_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 24, offsetof(mavlink_storage_information_t, storage_id) }, \
36 { "storage_count", NULL, MAVLINK_TYPE_UINT8_T, 0, 25, offsetof(mavlink_storage_information_t, storage_count) }, \
37 { "status", NULL, MAVLINK_TYPE_UINT8_T, 0, 26, offsetof(mavlink_storage_information_t, status) }, \
38 { "total_capacity", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_storage_information_t, total_capacity) }, \
39 { "used_capacity", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_storage_information_t, used_capacity) }, \
40 { "available_capacity", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_storage_information_t, available_capacity) }, \
41 { "read_speed", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_storage_information_t, read_speed) }, \
42 { "write_speed", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_storage_information_t, write_speed) }, \
46#define MAVLINK_MESSAGE_INFO_STORAGE_INFORMATION { \
47 "STORAGE_INFORMATION", \
49 { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_storage_information_t, time_boot_ms) }, \
50 { "storage_id", NULL, MAVLINK_TYPE_UINT8_T, 0, 24, offsetof(mavlink_storage_information_t, storage_id) }, \
51 { "storage_count", NULL, MAVLINK_TYPE_UINT8_T, 0, 25, offsetof(mavlink_storage_information_t, storage_count) }, \
52 { "status", NULL, MAVLINK_TYPE_UINT8_T, 0, 26, offsetof(mavlink_storage_information_t, status) }, \
53 { "total_capacity", NULL, MAVLINK_TYPE_FLOAT, 0, 4, offsetof(mavlink_storage_information_t, total_capacity) }, \
54 { "used_capacity", NULL, MAVLINK_TYPE_FLOAT, 0, 8, offsetof(mavlink_storage_information_t, used_capacity) }, \
55 { "available_capacity", NULL, MAVLINK_TYPE_FLOAT, 0, 12, offsetof(mavlink_storage_information_t, available_capacity) }, \
56 { "read_speed", NULL, MAVLINK_TYPE_FLOAT, 0, 16, offsetof(mavlink_storage_information_t, read_speed) }, \
57 { "write_speed", NULL, MAVLINK_TYPE_FLOAT, 0, 20, offsetof(mavlink_storage_information_t, write_speed) }, \
79static inline uint16_t mavlink_msg_storage_information_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
80 uint32_t time_boot_ms, uint8_t storage_id, uint8_t storage_count, uint8_t status,
float total_capacity,
float used_capacity,
float available_capacity,
float read_speed,
float write_speed)
82#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
83 char buf[MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN];
84 _mav_put_uint32_t(buf, 0, time_boot_ms);
85 _mav_put_float(buf, 4, total_capacity);
86 _mav_put_float(buf, 8, used_capacity);
87 _mav_put_float(buf, 12, available_capacity);
88 _mav_put_float(buf, 16, read_speed);
89 _mav_put_float(buf, 20, write_speed);
90 _mav_put_uint8_t(buf, 24, storage_id);
91 _mav_put_uint8_t(buf, 25, storage_count);
92 _mav_put_uint8_t(buf, 26, status);
94 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN);
96 mavlink_storage_information_t packet;
97 packet.time_boot_ms = time_boot_ms;
98 packet.total_capacity = total_capacity;
99 packet.used_capacity = used_capacity;
100 packet.available_capacity = available_capacity;
101 packet.read_speed = read_speed;
102 packet.write_speed = write_speed;
103 packet.storage_id = storage_id;
104 packet.storage_count = storage_count;
105 packet.status = status;
107 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN);
110 msg->msgid = MAVLINK_MSG_ID_STORAGE_INFORMATION;
111 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_STORAGE_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN, MAVLINK_MSG_ID_STORAGE_INFORMATION_CRC);
131static inline uint16_t mavlink_msg_storage_information_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
132 mavlink_message_t* msg,
133 uint32_t time_boot_ms,uint8_t storage_id,uint8_t storage_count,uint8_t status,
float total_capacity,
float used_capacity,
float available_capacity,
float read_speed,
float write_speed)
135#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
136 char buf[MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN];
137 _mav_put_uint32_t(buf, 0, time_boot_ms);
138 _mav_put_float(buf, 4, total_capacity);
139 _mav_put_float(buf, 8, used_capacity);
140 _mav_put_float(buf, 12, available_capacity);
141 _mav_put_float(buf, 16, read_speed);
142 _mav_put_float(buf, 20, write_speed);
143 _mav_put_uint8_t(buf, 24, storage_id);
144 _mav_put_uint8_t(buf, 25, storage_count);
145 _mav_put_uint8_t(buf, 26, status);
147 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN);
149 mavlink_storage_information_t packet;
150 packet.time_boot_ms = time_boot_ms;
151 packet.total_capacity = total_capacity;
152 packet.used_capacity = used_capacity;
153 packet.available_capacity = available_capacity;
154 packet.read_speed = read_speed;
155 packet.write_speed = write_speed;
156 packet.storage_id = storage_id;
157 packet.storage_count = storage_count;
158 packet.status = status;
160 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN);
163 msg->msgid = MAVLINK_MSG_ID_STORAGE_INFORMATION;
164 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_STORAGE_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN, MAVLINK_MSG_ID_STORAGE_INFORMATION_CRC);
175static inline uint16_t mavlink_msg_storage_information_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_storage_information_t* storage_information)
177 return mavlink_msg_storage_information_pack(system_id, component_id, msg, storage_information->time_boot_ms, storage_information->storage_id, storage_information->storage_count, storage_information->status, storage_information->total_capacity, storage_information->used_capacity, storage_information->available_capacity, storage_information->read_speed, storage_information->write_speed);
189static inline uint16_t mavlink_msg_storage_information_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_storage_information_t* storage_information)
191 return mavlink_msg_storage_information_pack_chan(system_id, component_id, chan, msg, storage_information->time_boot_ms, storage_information->storage_id, storage_information->storage_count, storage_information->status, storage_information->total_capacity, storage_information->used_capacity, storage_information->available_capacity, storage_information->read_speed, storage_information->write_speed);
208#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
210static inline void mavlink_msg_storage_information_send(mavlink_channel_t chan, uint32_t time_boot_ms, uint8_t storage_id, uint8_t storage_count, uint8_t status,
float total_capacity,
float used_capacity,
float available_capacity,
float read_speed,
float write_speed)
212#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
213 char buf[MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN];
214 _mav_put_uint32_t(buf, 0, time_boot_ms);
215 _mav_put_float(buf, 4, total_capacity);
216 _mav_put_float(buf, 8, used_capacity);
217 _mav_put_float(buf, 12, available_capacity);
218 _mav_put_float(buf, 16, read_speed);
219 _mav_put_float(buf, 20, write_speed);
220 _mav_put_uint8_t(buf, 24, storage_id);
221 _mav_put_uint8_t(buf, 25, storage_count);
222 _mav_put_uint8_t(buf, 26, status);
224 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_STORAGE_INFORMATION, buf, MAVLINK_MSG_ID_STORAGE_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN, MAVLINK_MSG_ID_STORAGE_INFORMATION_CRC);
226 mavlink_storage_information_t packet;
227 packet.time_boot_ms = time_boot_ms;
228 packet.total_capacity = total_capacity;
229 packet.used_capacity = used_capacity;
230 packet.available_capacity = available_capacity;
231 packet.read_speed = read_speed;
232 packet.write_speed = write_speed;
233 packet.storage_id = storage_id;
234 packet.storage_count = storage_count;
235 packet.status = status;
237 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_STORAGE_INFORMATION, (
const char *)&packet, MAVLINK_MSG_ID_STORAGE_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN, MAVLINK_MSG_ID_STORAGE_INFORMATION_CRC);
246static inline void mavlink_msg_storage_information_send_struct(mavlink_channel_t chan,
const mavlink_storage_information_t* storage_information)
248#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
249 mavlink_msg_storage_information_send(chan, storage_information->time_boot_ms, storage_information->storage_id, storage_information->storage_count, storage_information->status, storage_information->total_capacity, storage_information->used_capacity, storage_information->available_capacity, storage_information->read_speed, storage_information->write_speed);
251 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_STORAGE_INFORMATION, (
const char *)storage_information, MAVLINK_MSG_ID_STORAGE_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN, MAVLINK_MSG_ID_STORAGE_INFORMATION_CRC);
255#if MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN <= MAVLINK_MAX_PAYLOAD_LEN
263static inline void mavlink_msg_storage_information_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint32_t time_boot_ms, uint8_t storage_id, uint8_t storage_count, uint8_t status,
float total_capacity,
float used_capacity,
float available_capacity,
float read_speed,
float write_speed)
265#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
266 char *buf = (
char *)msgbuf;
267 _mav_put_uint32_t(buf, 0, time_boot_ms);
268 _mav_put_float(buf, 4, total_capacity);
269 _mav_put_float(buf, 8, used_capacity);
270 _mav_put_float(buf, 12, available_capacity);
271 _mav_put_float(buf, 16, read_speed);
272 _mav_put_float(buf, 20, write_speed);
273 _mav_put_uint8_t(buf, 24, storage_id);
274 _mav_put_uint8_t(buf, 25, storage_count);
275 _mav_put_uint8_t(buf, 26, status);
277 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_STORAGE_INFORMATION, buf, MAVLINK_MSG_ID_STORAGE_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN, MAVLINK_MSG_ID_STORAGE_INFORMATION_CRC);
279 mavlink_storage_information_t *packet = (mavlink_storage_information_t *)msgbuf;
280 packet->time_boot_ms = time_boot_ms;
281 packet->total_capacity = total_capacity;
282 packet->used_capacity = used_capacity;
283 packet->available_capacity = available_capacity;
284 packet->read_speed = read_speed;
285 packet->write_speed = write_speed;
286 packet->storage_id = storage_id;
287 packet->storage_count = storage_count;
288 packet->status = status;
290 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_STORAGE_INFORMATION, (
const char *)packet, MAVLINK_MSG_ID_STORAGE_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN, MAVLINK_MSG_ID_STORAGE_INFORMATION_CRC);
305static inline uint32_t mavlink_msg_storage_information_get_time_boot_ms(
const mavlink_message_t* msg)
307 return _MAV_RETURN_uint32_t(msg, 0);
315static inline uint8_t mavlink_msg_storage_information_get_storage_id(
const mavlink_message_t* msg)
317 return _MAV_RETURN_uint8_t(msg, 24);
325static inline uint8_t mavlink_msg_storage_information_get_storage_count(
const mavlink_message_t* msg)
327 return _MAV_RETURN_uint8_t(msg, 25);
335static inline uint8_t mavlink_msg_storage_information_get_status(
const mavlink_message_t* msg)
337 return _MAV_RETURN_uint8_t(msg, 26);
345static inline float mavlink_msg_storage_information_get_total_capacity(
const mavlink_message_t* msg)
347 return _MAV_RETURN_float(msg, 4);
355static inline float mavlink_msg_storage_information_get_used_capacity(
const mavlink_message_t* msg)
357 return _MAV_RETURN_float(msg, 8);
365static inline float mavlink_msg_storage_information_get_available_capacity(
const mavlink_message_t* msg)
367 return _MAV_RETURN_float(msg, 12);
375static inline float mavlink_msg_storage_information_get_read_speed(
const mavlink_message_t* msg)
377 return _MAV_RETURN_float(msg, 16);
385static inline float mavlink_msg_storage_information_get_write_speed(
const mavlink_message_t* msg)
387 return _MAV_RETURN_float(msg, 20);
396static inline void mavlink_msg_storage_information_decode(
const mavlink_message_t* msg, mavlink_storage_information_t* storage_information)
398#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
399 storage_information->time_boot_ms = mavlink_msg_storage_information_get_time_boot_ms(msg);
400 storage_information->total_capacity = mavlink_msg_storage_information_get_total_capacity(msg);
401 storage_information->used_capacity = mavlink_msg_storage_information_get_used_capacity(msg);
402 storage_information->available_capacity = mavlink_msg_storage_information_get_available_capacity(msg);
403 storage_information->read_speed = mavlink_msg_storage_information_get_read_speed(msg);
404 storage_information->write_speed = mavlink_msg_storage_information_get_write_speed(msg);
405 storage_information->storage_id = mavlink_msg_storage_information_get_storage_id(msg);
406 storage_information->storage_count = mavlink_msg_storage_information_get_storage_count(msg);
407 storage_information->status = mavlink_msg_storage_information_get_status(msg);
409 uint8_t len = msg->len < MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN? msg->len : MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN;
410 memset(storage_information, 0, MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN);
411 memcpy(storage_information, _MAV_PAYLOAD(msg), len);