3 #define MAVLINK_MSG_ID_MEMORY_VECT 249
13 #define MAVLINK_MSG_ID_MEMORY_VECT_LEN 36
14 #define MAVLINK_MSG_ID_249_LEN 36
16 #define MAVLINK_MSG_ID_MEMORY_VECT_CRC 204
17 #define MAVLINK_MSG_ID_249_CRC 204
19 #define MAVLINK_MSG_MEMORY_VECT_FIELD_VALUE_LEN 32
21 #define MAVLINK_MESSAGE_INFO_MEMORY_VECT { \
24 { { "address", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_memory_vect_t, address) }, \
25 { "ver", NULL, MAVLINK_TYPE_UINT8_T, 0, 2, offsetof(mavlink_memory_vect_t, ver) }, \
26 { "type", NULL, MAVLINK_TYPE_UINT8_T, 0, 3, offsetof(mavlink_memory_vect_t, type) }, \
27 { "value", NULL, MAVLINK_TYPE_INT8_T, 32, 4, offsetof(mavlink_memory_vect_t, value) }, \
44 static inline uint16_t mavlink_msg_memory_vect_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
45 uint16_t address, uint8_t ver, uint8_t type,
const int8_t *value)
47 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
48 char buf[MAVLINK_MSG_ID_MEMORY_VECT_LEN];
49 _mav_put_uint16_t(buf, 0, address);
50 _mav_put_uint8_t(buf, 2, ver);
51 _mav_put_uint8_t(buf, 3, type);
52 _mav_put_int8_t_array(buf, 4, value, 32);
53 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MEMORY_VECT_LEN);
59 mav_array_memcpy(packet.
value, value,
sizeof(int8_t)*32);
60 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MEMORY_VECT_LEN);
63 msg->msgid = MAVLINK_MSG_ID_MEMORY_VECT;
65 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MEMORY_VECT_LEN, MAVLINK_MSG_ID_MEMORY_VECT_CRC);
67 return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_MEMORY_VECT_LEN);
83 static inline uint16_t mavlink_msg_memory_vect_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
84 mavlink_message_t* msg,
85 uint16_t address,uint8_t ver,uint8_t type,
const int8_t *value)
87 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
88 char buf[MAVLINK_MSG_ID_MEMORY_VECT_LEN];
89 _mav_put_uint16_t(buf, 0, address);
90 _mav_put_uint8_t(buf, 2, ver);
91 _mav_put_uint8_t(buf, 3, type);
92 _mav_put_int8_t_array(buf, 4, value, 32);
93 memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_MEMORY_VECT_LEN);
99 mav_array_memcpy(packet.
value, value,
sizeof(int8_t)*32);
100 memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_MEMORY_VECT_LEN);
103 msg->msgid = MAVLINK_MSG_ID_MEMORY_VECT;
104 #if MAVLINK_CRC_EXTRA
105 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MEMORY_VECT_LEN, MAVLINK_MSG_ID_MEMORY_VECT_CRC);
107 return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_MEMORY_VECT_LEN);
119 static 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)
121 return mavlink_msg_memory_vect_pack(system_id, component_id, msg, memory_vect->
address, memory_vect->
ver, memory_vect->
type, memory_vect->
value);
133 static 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)
135 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);
147 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
149 static inline void mavlink_msg_memory_vect_send(mavlink_channel_t chan, uint16_t address, uint8_t ver, uint8_t type,
const int8_t *value)
151 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
152 char buf[MAVLINK_MSG_ID_MEMORY_VECT_LEN];
153 _mav_put_uint16_t(buf, 0, address);
154 _mav_put_uint8_t(buf, 2, ver);
155 _mav_put_uint8_t(buf, 3, type);
156 _mav_put_int8_t_array(buf, 4, value, 32);
157 #if MAVLINK_CRC_EXTRA
158 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MEMORY_VECT, buf, MAVLINK_MSG_ID_MEMORY_VECT_LEN, MAVLINK_MSG_ID_MEMORY_VECT_CRC);
160 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MEMORY_VECT, buf, MAVLINK_MSG_ID_MEMORY_VECT_LEN);
167 mav_array_memcpy(packet.
value, value,
sizeof(int8_t)*32);
168 #if MAVLINK_CRC_EXTRA
169 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MEMORY_VECT, (
const char *)&packet, MAVLINK_MSG_ID_MEMORY_VECT_LEN, MAVLINK_MSG_ID_MEMORY_VECT_CRC);
171 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MEMORY_VECT, (
const char *)&packet, MAVLINK_MSG_ID_MEMORY_VECT_LEN);
176 #if MAVLINK_MSG_ID_MEMORY_VECT_LEN <= MAVLINK_MAX_PAYLOAD_LEN
184 static 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)
186 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
187 char *buf = (
char *)msgbuf;
188 _mav_put_uint16_t(buf, 0, address);
189 _mav_put_uint8_t(buf, 2, ver);
190 _mav_put_uint8_t(buf, 3, type);
191 _mav_put_int8_t_array(buf, 4, value, 32);
192 #if MAVLINK_CRC_EXTRA
193 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MEMORY_VECT, buf, MAVLINK_MSG_ID_MEMORY_VECT_LEN, MAVLINK_MSG_ID_MEMORY_VECT_CRC);
195 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MEMORY_VECT, buf, MAVLINK_MSG_ID_MEMORY_VECT_LEN);
202 mav_array_memcpy(packet->
value, value,
sizeof(int8_t)*32);
203 #if MAVLINK_CRC_EXTRA
204 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MEMORY_VECT, (
const char *)packet, MAVLINK_MSG_ID_MEMORY_VECT_LEN, MAVLINK_MSG_ID_MEMORY_VECT_CRC);
206 _mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_MEMORY_VECT, (
const char *)packet, MAVLINK_MSG_ID_MEMORY_VECT_LEN);
222 static inline uint16_t mavlink_msg_memory_vect_get_address(
const mavlink_message_t* msg)
224 return _MAV_RETURN_uint16_t(msg, 0);
232 static inline uint8_t mavlink_msg_memory_vect_get_ver(
const mavlink_message_t* msg)
234 return _MAV_RETURN_uint8_t(msg, 2);
242 static inline uint8_t mavlink_msg_memory_vect_get_type(
const mavlink_message_t* msg)
244 return _MAV_RETURN_uint8_t(msg, 3);
252 static inline uint16_t mavlink_msg_memory_vect_get_value(
const mavlink_message_t* msg, int8_t *value)
254 return _MAV_RETURN_int8_t_array(msg, value, 32, 4);
263 static inline void mavlink_msg_memory_vect_decode(
const mavlink_message_t* msg,
mavlink_memory_vect_t* memory_vect)
265 #if MAVLINK_NEED_BYTE_SWAP
266 memory_vect->
address = mavlink_msg_memory_vect_get_address(msg);
267 memory_vect->
ver = mavlink_msg_memory_vect_get_ver(msg);
268 memory_vect->
type = mavlink_msg_memory_vect_get_type(msg);
269 mavlink_msg_memory_vect_get_value(msg, memory_vect->
value);
271 memcpy(memory_vect, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_MEMORY_VECT_LEN);
uint8_t ver
Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below...
Definition: mavlink_msg_memory_vect.h:8
uint16_t address
Starting address of the debug variables.
Definition: mavlink_msg_memory_vect.h:7
uint8_t type
Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15...
Definition: mavlink_msg_memory_vect.h:9
int8_t value[32]
Memory contents at specified address.
Definition: mavlink_msg_memory_vect.h:10
Definition: mavlink_msg_memory_vect.h:5