4#define MAVLINK_MSG_ID_MEMORY_VECT 249
12} mavlink_memory_vect_t;
14#define MAVLINK_MSG_ID_MEMORY_VECT_LEN 36
15#define MAVLINK_MSG_ID_MEMORY_VECT_MIN_LEN 36
16#define MAVLINK_MSG_ID_249_LEN 36
17#define MAVLINK_MSG_ID_249_MIN_LEN 36
19#define MAVLINK_MSG_ID_MEMORY_VECT_CRC 204
20#define MAVLINK_MSG_ID_249_CRC 204
22#define MAVLINK_MSG_MEMORY_VECT_FIELD_VALUE_LEN 32
24#if MAVLINK_COMMAND_24BIT
25#define MAVLINK_MESSAGE_INFO_MEMORY_VECT {
29 { { "address", NULL, MAVLINK_TYPE_UINT16_T, 0
, 0
, offsetof(mavlink_memory_vect_t, address) },
30 { "ver", NULL, MAVLINK_TYPE_UINT8_T, 0
, 2
, offsetof(mavlink_memory_vect_t, ver) },
31 { "type", NULL, MAVLINK_TYPE_UINT8_T, 0
, 3
, offsetof(mavlink_memory_vect_t, type) },
32 { "value", NULL, MAVLINK_TYPE_INT8_T, 32
, 4
, offsetof(mavlink_memory_vect_t, value) },
34}
36#define MAVLINK_MESSAGE_INFO_MEMORY_VECT {
39 { { "address", NULL, MAVLINK_TYPE_UINT16_T, 0
, 0
, offsetof(mavlink_memory_vect_t, address) },
40 { "ver", NULL, MAVLINK_TYPE_UINT8_T, 0
, 2
, offsetof(mavlink_memory_vect_t, ver) },
41 { "type", NULL, MAVLINK_TYPE_UINT8_T, 0
, 3
, offsetof(mavlink_memory_vect_t, type) },
42 { "value", NULL, MAVLINK_TYPE_INT8_T, 32
, 4
, offsetof(mavlink_memory_vect_t, value) },
44}
48
49
50
51
52
53
54
55
56
57
58
59static inline uint16_t mavlink_msg_memory_vect_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
60 uint16_t address, uint8_t ver, uint8_t type,
const int8_t *value)
62#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
64 _mav_put_uint16_t(buf, 0, address);
65 _mav_put_uint8_t(buf, 2, ver);
66 _mav_put_uint8_t(buf, 3, type);
67 _mav_put_int8_t_array(buf, 4, value, 32);
70 mavlink_memory_vect_t packet;
71 packet.address = address;
74 mav_array_memcpy(packet.value, value,
sizeof(int8_t)*32);
75 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MEMORY_VECT_LEN);
83
84
85
86
87
88
89
90
91
92
93
94
95static inline uint16_t mavlink_msg_memory_vect_pack_status(uint8_t system_id, uint8_t component_id, mavlink_status_t *_status, mavlink_message_t* msg,
96 uint16_t address, uint8_t ver, uint8_t type,
const int8_t *value)
98#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
100 _mav_put_uint16_t(buf, 0, address);
101 _mav_put_uint8_t(buf, 2, ver);
102 _mav_put_uint8_t(buf, 3, type);
103 _mav_put_int8_t_array(buf, 4, value, 32);
106 mavlink_memory_vect_t packet;
107 packet.address = address;
110 mav_array_memcpy(packet.value, value,
sizeof(int8_t)*32);
111 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MEMORY_VECT_LEN);
116 return mavlink_finalize_message_buffer(msg, system_id, component_id, _status, MAVLINK_MSG_ID_MEMORY_VECT_MIN_LEN, MAVLINK_MSG_ID_MEMORY_VECT_LEN, MAVLINK_MSG_ID_MEMORY_VECT_CRC);
123
124
125
126
127
128
129
130
131
132
133
134static inline uint16_t mavlink_msg_memory_vect_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
135 mavlink_message_t* msg,
136 uint16_t address,uint8_t ver,uint8_t type,
const int8_t *value)
138#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
140 _mav_put_uint16_t(buf, 0, address);
141 _mav_put_uint8_t(buf, 2, ver);
142 _mav_put_uint8_t(buf, 3, type);
143 _mav_put_int8_t_array(buf, 4, value, 32);
146 mavlink_memory_vect_t packet;
147 packet.address = address;
150 mav_array_memcpy(packet.value, value,
sizeof(int8_t)*32);
151 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MEMORY_VECT_LEN);
159
160
161
162
163
164
165
166static inline uint16_t mavlink_msg_memory_vect_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_memory_vect_t* memory_vect)
168 return mavlink_msg_memory_vect_pack(system_id, component_id, msg, memory_vect->address, memory_vect->ver, memory_vect->type, memory_vect->value);
172
173
174
175
176
177
178
179
180static inline uint16_t mavlink_msg_memory_vect_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_memory_vect_t* memory_vect)
182 return mavlink_msg_memory_vect_pack_chan(system_id, component_id, chan, msg, memory_vect->address, memory_vect->ver, memory_vect->type, memory_vect->value);
186
187
188
189
190
191
192
193
194static inline uint16_t mavlink_msg_memory_vect_encode_status(uint8_t system_id, uint8_t component_id, mavlink_status_t* _status, mavlink_message_t* msg,
const mavlink_memory_vect_t* memory_vect)
196 return mavlink_msg_memory_vect_pack_status(system_id, component_id, _status, msg, memory_vect->address, memory_vect->ver, memory_vect->type, memory_vect->value);
200
201
202
203
204
205
206
207
208#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
210static inline void mavlink_msg_memory_vect_send(mavlink_channel_t chan, uint16_t address, uint8_t ver, uint8_t type,
const int8_t *value)
212#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
213 char buf[MAVLINK_MSG_ID_MEMORY_VECT_LEN];
214 _mav_put_uint16_t(buf, 0, address);
215 _mav_put_uint8_t(buf, 2, ver);
216 _mav_put_uint8_t(buf, 3, type);
217 _mav_put_int8_t_array(buf, 4, value, 32);
218 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MEMORY_VECT, buf, MAVLINK_MSG_ID_MEMORY_VECT_MIN_LEN, MAVLINK_MSG_ID_MEMORY_VECT_LEN, MAVLINK_MSG_ID_MEMORY_VECT_CRC);
220 mavlink_memory_vect_t packet;
221 packet.address = address;
224 mav_array_memcpy(packet.value, value,
sizeof(int8_t)*32);
225 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MEMORY_VECT, (
const char *)&packet, MAVLINK_MSG_ID_MEMORY_VECT_MIN_LEN, MAVLINK_MSG_ID_MEMORY_VECT_LEN, MAVLINK_MSG_ID_MEMORY_VECT_CRC);
230
231
232
233
234static inline void mavlink_msg_memory_vect_send_struct(mavlink_channel_t chan,
const mavlink_memory_vect_t* memory_vect)
236#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
237 mavlink_msg_memory_vect_send(chan, memory_vect->address, memory_vect->ver, memory_vect->type, memory_vect->value);
239 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MEMORY_VECT, (
const char *)memory_vect, MAVLINK_MSG_ID_MEMORY_VECT_MIN_LEN, MAVLINK_MSG_ID_MEMORY_VECT_LEN, MAVLINK_MSG_ID_MEMORY_VECT_CRC);
243#if MAVLINK_MSG_ID_MEMORY_VECT_LEN <= MAVLINK_MAX_PAYLOAD_LEN
245
246
247
248
249
250
251static inline void mavlink_msg_memory_vect_send_buf(mavlink_message_t *msgbuf, mavlink_channel_t chan, uint16_t address, uint8_t ver, uint8_t type,
const int8_t *value)
253#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
254 char *buf = (
char *)msgbuf;
255 _mav_put_uint16_t(buf, 0, address);
256 _mav_put_uint8_t(buf, 2, ver);
257 _mav_put_uint8_t(buf, 3, type);
258 _mav_put_int8_t_array(buf, 4, value, 32);
259 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MEMORY_VECT, buf, MAVLINK_MSG_ID_MEMORY_VECT_MIN_LEN, MAVLINK_MSG_ID_MEMORY_VECT_LEN, MAVLINK_MSG_ID_MEMORY_VECT_CRC);
261 mavlink_memory_vect_t *packet = (mavlink_memory_vect_t *)msgbuf;
262 packet->address = address;
265 mav_array_memcpy(packet->value, value,
sizeof(int8_t)*32);
266 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MEMORY_VECT, (
const char *)packet, MAVLINK_MSG_ID_MEMORY_VECT_MIN_LEN, MAVLINK_MSG_ID_MEMORY_VECT_LEN, MAVLINK_MSG_ID_MEMORY_VECT_CRC);
277
278
279
280
281static inline uint16_t mavlink_msg_memory_vect_get_address(
const mavlink_message_t* msg)
283 return _MAV_RETURN_uint16_t(msg, 0);
287
288
289
290
291static inline uint8_t mavlink_msg_memory_vect_get_ver(
const mavlink_message_t* msg)
293 return _MAV_RETURN_uint8_t(msg, 2);
297
298
299
300
301static inline uint8_t mavlink_msg_memory_vect_get_type(
const mavlink_message_t* msg)
303 return _MAV_RETURN_uint8_t(msg, 3);
307
308
309
310
311static inline uint16_t mavlink_msg_memory_vect_get_value(
const mavlink_message_t* msg, int8_t *value)
313 return _MAV_RETURN_int8_t_array(msg, value, 32, 4);
317
318
319
320
321
322static inline void mavlink_msg_memory_vect_decode(
const mavlink_message_t* msg, mavlink_memory_vect_t* memory_vect)
324#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
325 memory_vect->address = mavlink_msg_memory_vect_get_address(msg);
326 memory_vect->ver = mavlink_msg_memory_vect_get_ver(msg);
327 memory_vect->type = mavlink_msg_memory_vect_get_type(msg);
328 mavlink_msg_memory_vect_get_value(msg, memory_vect->value);
330 uint8_t len = msg->len < MAVLINK_MSG_ID_MEMORY_VECT_LEN? msg->len : MAVLINK_MSG_ID_MEMORY_VECT_LEN;
331 memset(memory_vect, 0, MAVLINK_MSG_ID_MEMORY_VECT_LEN);
332 memcpy(memory_vect, _MAV_PAYLOAD(msg), len);
#define MAVLINK_MSG_ID_MEMORY_VECT
Definition: mavlink_msg_memory_vect.h:4
#define MAVLINK_MSG_ID_MEMORY_VECT_CRC
Definition: mavlink_msg_memory_vect.h:19
#define MAVLINK_MSG_ID_MEMORY_VECT_LEN
Definition: mavlink_msg_memory_vect.h:14
#define MAVLINK_MSG_ID_MEMORY_VECT_MIN_LEN
Definition: mavlink_msg_memory_vect.h:15
Definition: mavlink_msg_memory_vect.h:7
uint8_t type
Definition: mavlink_msg_memory_vect.h:10
uint16_t address
Definition: mavlink_msg_memory_vect.h:8
uint8_t ver
Definition: mavlink_msg_memory_vect.h:9