4#define MAVLINK_MSG_ID_STORAGE_INFORMATION 261
20
21
22
23} mavlink_storage_information_t;
25#define MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN 61
26#define MAVLINK_MSG_ID_STORAGE_INFORMATION_MIN_LEN 27
27#define MAVLINK_MSG_ID_261_LEN 61
28#define MAVLINK_MSG_ID_261_MIN_LEN 27
30#define MAVLINK_MSG_ID_STORAGE_INFORMATION_CRC 179
31#define MAVLINK_MSG_ID_261_CRC 179
33#define MAVLINK_MSG_STORAGE_INFORMATION_FIELD_NAME_LEN 32
35#if MAVLINK_COMMAND_24BIT
36#define MAVLINK_MESSAGE_INFO_STORAGE_INFORMATION {
38 "STORAGE_INFORMATION",
40 { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0
, 0
, offsetof(mavlink_storage_information_t, time_boot_ms) },
41 { "storage_id", NULL, MAVLINK_TYPE_UINT8_T, 0
, 24
, offsetof(mavlink_storage_information_t, storage_id) },
42 { "storage_count", NULL, MAVLINK_TYPE_UINT8_T, 0
, 25
, offsetof(mavlink_storage_information_t, storage_count) },
43 { "status", NULL, MAVLINK_TYPE_UINT8_T, 0
, 26
, offsetof(mavlink_storage_information_t, status) },
44 { "total_capacity", NULL, MAVLINK_TYPE_FLOAT, 0
, 4
, offsetof(mavlink_storage_information_t, total_capacity) },
45 { "used_capacity", NULL, MAVLINK_TYPE_FLOAT, 0
, 8
, offsetof(mavlink_storage_information_t, used_capacity) },
46 { "available_capacity", NULL, MAVLINK_TYPE_FLOAT, 0
, 12
, offsetof(mavlink_storage_information_t, available_capacity) },
47 { "read_speed", NULL, MAVLINK_TYPE_FLOAT, 0
, 16
, offsetof(mavlink_storage_information_t, read_speed) },
48 { "write_speed", NULL, MAVLINK_TYPE_FLOAT, 0
, 20
, offsetof(mavlink_storage_information_t, write_speed) },
49 { "type", NULL, MAVLINK_TYPE_UINT8_T, 0
, 27
, offsetof(mavlink_storage_information_t, type) },
50 { "name", NULL, MAVLINK_TYPE_CHAR, 32
, 28
, offsetof(mavlink_storage_information_t, name) },
51 { "storage_usage", NULL, MAVLINK_TYPE_UINT8_T, 0
, 60
, offsetof(mavlink_storage_information_t, storage_usage) },
53}
55#define MAVLINK_MESSAGE_INFO_STORAGE_INFORMATION {
56 "STORAGE_INFORMATION",
58 { { "time_boot_ms", NULL, MAVLINK_TYPE_UINT32_T, 0
, 0
, offsetof(mavlink_storage_information_t, time_boot_ms) },
59 { "storage_id", NULL, MAVLINK_TYPE_UINT8_T, 0
, 24
, offsetof(mavlink_storage_information_t, storage_id) },
60 { "storage_count", NULL, MAVLINK_TYPE_UINT8_T, 0
, 25
, offsetof(mavlink_storage_information_t, storage_count) },
61 { "status", NULL, MAVLINK_TYPE_UINT8_T, 0
, 26
, offsetof(mavlink_storage_information_t, status) },
62 { "total_capacity", NULL, MAVLINK_TYPE_FLOAT, 0
, 4
, offsetof(mavlink_storage_information_t, total_capacity) },
63 { "used_capacity", NULL, MAVLINK_TYPE_FLOAT, 0
, 8
, offsetof(mavlink_storage_information_t, used_capacity) },
64 { "available_capacity", NULL, MAVLINK_TYPE_FLOAT, 0
, 12
, offsetof(mavlink_storage_information_t, available_capacity) },
65 { "read_speed", NULL, MAVLINK_TYPE_FLOAT, 0
, 16
, offsetof(mavlink_storage_information_t, read_speed) },
66 { "write_speed", NULL, MAVLINK_TYPE_FLOAT, 0
, 20
, offsetof(mavlink_storage_information_t, write_speed) },
67 { "type", NULL, MAVLINK_TYPE_UINT8_T, 0
, 27
, offsetof(mavlink_storage_information_t, type) },
68 { "name", NULL, MAVLINK_TYPE_CHAR, 32
, 28
, offsetof(mavlink_storage_information_t, name) },
69 { "storage_usage", NULL, MAVLINK_TYPE_UINT8_T, 0
, 60
, offsetof(mavlink_storage_information_t, storage_usage) },
71}
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97static inline uint16_t mavlink_msg_storage_information_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
98 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, uint8_t type,
const char *name, uint8_t storage_usage)
100#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
102 _mav_put_uint32_t(buf, 0, time_boot_ms);
103 _mav_put_float(buf, 4, total_capacity);
104 _mav_put_float(buf, 8, used_capacity);
105 _mav_put_float(buf, 12, available_capacity);
106 _mav_put_float(buf, 16, read_speed);
107 _mav_put_float(buf, 20, write_speed);
108 _mav_put_uint8_t(buf, 24, storage_id);
109 _mav_put_uint8_t(buf, 25, storage_count);
110 _mav_put_uint8_t(buf, 26, status);
111 _mav_put_uint8_t(buf, 27, type);
112 _mav_put_uint8_t(buf, 60, storage_usage);
113 _mav_put_char_array(buf, 28, name, 32);
116 mavlink_storage_information_t packet;
117 packet.time_boot_ms = time_boot_ms;
118 packet.total_capacity = total_capacity;
119 packet.used_capacity = used_capacity;
120 packet.available_capacity = available_capacity;
121 packet.read_speed = read_speed;
122 packet.write_speed = write_speed;
123 packet.storage_id = storage_id;
124 packet.storage_count = storage_count;
125 packet.status = status;
127 packet.storage_usage = storage_usage;
128 mav_array_memcpy(packet.name, name,
sizeof(
char)*32);
129 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN);
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160static inline uint16_t mavlink_msg_storage_information_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
161 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, uint8_t type,
const char *name, uint8_t storage_usage)
163#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
165 _mav_put_uint32_t(buf, 0, time_boot_ms);
166 _mav_put_float(buf, 4, total_capacity);
167 _mav_put_float(buf, 8, used_capacity);
168 _mav_put_float(buf, 12, available_capacity);
169 _mav_put_float(buf, 16, read_speed);
170 _mav_put_float(buf, 20, write_speed);
171 _mav_put_uint8_t(buf, 24, storage_id);
172 _mav_put_uint8_t(buf, 25, storage_count);
173 _mav_put_uint8_t(buf, 26, status);
174 _mav_put_uint8_t(buf, 27, type);
175 _mav_put_uint8_t(buf, 60, storage_usage);
176 _mav_put_char_array(buf, 28, name, 32);
179 mavlink_storage_information_t packet;
180 packet.time_boot_ms = time_boot_ms;
181 packet.total_capacity = total_capacity;
182 packet.used_capacity = used_capacity;
183 packet.available_capacity = available_capacity;
184 packet.read_speed = read_speed;
185 packet.write_speed = write_speed;
186 packet.storage_id = storage_id;
187 packet.storage_count = storage_count;
188 packet.status = status;
190 packet.storage_usage = storage_usage;
191 mav_array_memcpy(packet.name, name,
sizeof(
char)*32);
192 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN);
197 return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_STORAGE_INFORMATION_MIN_LEN, MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN, MAVLINK_MSG_ID_STORAGE_INFORMATION_CRC);
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226static inline uint16_t mavlink_msg_storage_information_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
227 mavlink_message_t* msg,
228 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,uint8_t type,
const char *name,uint8_t storage_usage)
230#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
232 _mav_put_uint32_t(buf, 0, time_boot_ms);
233 _mav_put_float(buf, 4, total_capacity);
234 _mav_put_float(buf, 8, used_capacity);
235 _mav_put_float(buf, 12, available_capacity);
236 _mav_put_float(buf, 16, read_speed);
237 _mav_put_float(buf, 20, write_speed);
238 _mav_put_uint8_t(buf, 24, storage_id);
239 _mav_put_uint8_t(buf, 25, storage_count);
240 _mav_put_uint8_t(buf, 26, status);
241 _mav_put_uint8_t(buf, 27, type);
242 _mav_put_uint8_t(buf, 60, storage_usage);
243 _mav_put_char_array(buf, 28, name, 32);
246 mavlink_storage_information_t packet;
247 packet.time_boot_ms = time_boot_ms;
248 packet.total_capacity = total_capacity;
249 packet.used_capacity = used_capacity;
250 packet.available_capacity = available_capacity;
251 packet.read_speed = read_speed;
252 packet.write_speed = write_speed;
253 packet.storage_id = storage_id;
254 packet.storage_count = storage_count;
255 packet.status = status;
257 packet.storage_usage = storage_usage;
258 mav_array_memcpy(packet.name, name,
sizeof(
char)*32);
259 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN);
267
268
269
270
271
272
273
274static 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)
276 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, storage_information->type, storage_information->name, storage_information->storage_usage);
280
281
282
283
284
285
286
287
288static 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)
290 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, storage_information->type, storage_information->name, storage_information->storage_usage);
294
295
296
297
298
299
300
301
302static inline uint16_t mavlink_msg_storage_information_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg,
const mavlink_storage_information_t* storage_information)
304 return mavlink_msg_storage_information_pack_status(system_id, component_id, _status, 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, storage_information->type, storage_information->name, storage_information->storage_usage);
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
329static 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, uint8_t type,
const char *name, uint8_t storage_usage)
331#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
332 char buf[MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN];
333 _mav_put_uint32_t(buf, 0, time_boot_ms);
334 _mav_put_float(buf, 4, total_capacity);
335 _mav_put_float(buf, 8, used_capacity);
336 _mav_put_float(buf, 12, available_capacity);
337 _mav_put_float(buf, 16, read_speed);
338 _mav_put_float(buf, 20, write_speed);
339 _mav_put_uint8_t(buf, 24, storage_id);
340 _mav_put_uint8_t(buf, 25, storage_count);
341 _mav_put_uint8_t(buf, 26, status);
342 _mav_put_uint8_t(buf, 27, type);
343 _mav_put_uint8_t(buf, 60, storage_usage);
344 _mav_put_char_array(buf, 28, name, 32);
345 _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);
347 mavlink_storage_information_t packet;
348 packet.time_boot_ms = time_boot_ms;
349 packet.total_capacity = total_capacity;
350 packet.used_capacity = used_capacity;
351 packet.available_capacity = available_capacity;
352 packet.read_speed = read_speed;
353 packet.write_speed = write_speed;
354 packet.storage_id = storage_id;
355 packet.storage_count = storage_count;
356 packet.status = status;
358 packet.storage_usage = storage_usage;
359 mav_array_memcpy(packet.name, name,
sizeof(
char)*32);
360 _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);
365
366
367
368
369static inline void mavlink_msg_storage_information_send_struct(mavlink_channel_t chan,
const mavlink_storage_information_t* storage_information)
371#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
372 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, storage_information->type, storage_information->name, storage_information->storage_usage);
374 _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);
378#if MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN <= MAVLINK_MAX_PAYLOAD_LEN
380
381
382
383
384
385
386static 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, uint8_t type,
const char *name, uint8_t storage_usage)
388#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
389 char *buf = (
char *)msgbuf;
390 _mav_put_uint32_t(buf, 0, time_boot_ms);
391 _mav_put_float(buf, 4, total_capacity);
392 _mav_put_float(buf, 8, used_capacity);
393 _mav_put_float(buf, 12, available_capacity);
394 _mav_put_float(buf, 16, read_speed);
395 _mav_put_float(buf, 20, write_speed);
396 _mav_put_uint8_t(buf, 24, storage_id);
397 _mav_put_uint8_t(buf, 25, storage_count);
398 _mav_put_uint8_t(buf, 26, status);
399 _mav_put_uint8_t(buf, 27, type);
400 _mav_put_uint8_t(buf, 60, storage_usage);
401 _mav_put_char_array(buf, 28, name, 32);
402 _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);
404 mavlink_storage_information_t *packet = (mavlink_storage_information_t *)msgbuf;
405 packet->time_boot_ms = time_boot_ms;
406 packet->total_capacity = total_capacity;
407 packet->used_capacity = used_capacity;
408 packet->available_capacity = available_capacity;
409 packet->read_speed = read_speed;
410 packet->write_speed = write_speed;
411 packet->storage_id = storage_id;
412 packet->storage_count = storage_count;
413 packet->status = status;
415 packet->storage_usage = storage_usage;
416 mav_array_memcpy(packet->name, name,
sizeof(
char)*32);
417 _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);
428
429
430
431
432static inline uint32_t mavlink_msg_storage_information_get_time_boot_ms(
const mavlink_message_t* msg)
434 return _MAV_RETURN_uint32_t(msg, 0);
438
439
440
441
442static inline uint8_t mavlink_msg_storage_information_get_storage_id(
const mavlink_message_t* msg)
444 return _MAV_RETURN_uint8_t(msg, 24);
448
449
450
451
452static inline uint8_t mavlink_msg_storage_information_get_storage_count(
const mavlink_message_t* msg)
454 return _MAV_RETURN_uint8_t(msg, 25);
458
459
460
461
462static inline uint8_t mavlink_msg_storage_information_get_status(
const mavlink_message_t* msg)
464 return _MAV_RETURN_uint8_t(msg, 26);
468
469
470
471
472static inline float mavlink_msg_storage_information_get_total_capacity(
const mavlink_message_t* msg)
474 return _MAV_RETURN_float(msg, 4);
478
479
480
481
482static inline float mavlink_msg_storage_information_get_used_capacity(
const mavlink_message_t* msg)
484 return _MAV_RETURN_float(msg, 8);
488
489
490
491
492static inline float mavlink_msg_storage_information_get_available_capacity(
const mavlink_message_t* msg)
494 return _MAV_RETURN_float(msg, 12);
498
499
500
501
502static inline float mavlink_msg_storage_information_get_read_speed(
const mavlink_message_t* msg)
504 return _MAV_RETURN_float(msg, 16);
508
509
510
511
512static inline float mavlink_msg_storage_information_get_write_speed(
const mavlink_message_t* msg)
514 return _MAV_RETURN_float(msg, 20);
518
519
520
521
522static inline uint8_t mavlink_msg_storage_information_get_type(
const mavlink_message_t* msg)
524 return _MAV_RETURN_uint8_t(msg, 27);
528
529
530
531
532static inline uint16_t mavlink_msg_storage_information_get_name(
const mavlink_message_t* msg,
char *name)
534 return _MAV_RETURN_char_array(msg, name, 32, 28);
538
539
540
541
542
543
544
545static inline uint8_t mavlink_msg_storage_information_get_storage_usage(
const mavlink_message_t* msg)
547 return _MAV_RETURN_uint8_t(msg, 60);
551
552
553
554
555
556static inline void mavlink_msg_storage_information_decode(
const mavlink_message_t* msg, mavlink_storage_information_t* storage_information)
558#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
559 storage_information->time_boot_ms = mavlink_msg_storage_information_get_time_boot_ms(msg);
560 storage_information->total_capacity = mavlink_msg_storage_information_get_total_capacity(msg);
561 storage_information->used_capacity = mavlink_msg_storage_information_get_used_capacity(msg);
562 storage_information->available_capacity = mavlink_msg_storage_information_get_available_capacity(msg);
563 storage_information->read_speed = mavlink_msg_storage_information_get_read_speed(msg);
564 storage_information->write_speed = mavlink_msg_storage_information_get_write_speed(msg);
565 storage_information->storage_id = mavlink_msg_storage_information_get_storage_id(msg);
566 storage_information->storage_count = mavlink_msg_storage_information_get_storage_count(msg);
567 storage_information->status = mavlink_msg_storage_information_get_status(msg);
568 storage_information->type = mavlink_msg_storage_information_get_type(msg);
569 mavlink_msg_storage_information_get_name(msg, storage_information->name);
570 storage_information->storage_usage = mavlink_msg_storage_information_get_storage_usage(msg);
572 uint8_t len = msg->len < MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN? msg->len : MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN;
573 memset(storage_information, 0, MAVLINK_MSG_ID_STORAGE_INFORMATION_LEN);
574 memcpy(storage_information, _MAV_PAYLOAD(msg), len);