3 #define MAVLINK_MSG_ID_PARAM_VALUE 22
14 #define MAVLINK_MSG_ID_PARAM_VALUE_LEN 25
15 #define MAVLINK_MSG_ID_22_LEN 25
17 #define MAVLINK_MSG_ID_PARAM_VALUE_CRC 220
18 #define MAVLINK_MSG_ID_22_CRC 220
20 #define MAVLINK_MSG_PARAM_VALUE_FIELD_PARAM_ID_LEN 16
22 #define MAVLINK_MESSAGE_INFO_PARAM_VALUE { \
25 { { "param_value", NULL, MAVLINK_TYPE_FLOAT, 0, 0, offsetof(mavlink_param_value_t, param_value) }, \
26 { "param_count", NULL, MAVLINK_TYPE_UINT16_T, 0, 4, offsetof(mavlink_param_value_t, param_count) }, \
27 { "param_index", NULL, MAVLINK_TYPE_UINT16_T, 0, 6, offsetof(mavlink_param_value_t, param_index) }, \
28 { "param_id", NULL, MAVLINK_TYPE_CHAR, 16, 8, offsetof(mavlink_param_value_t, param_id) }, \
29 { "param_type", NULL, MAVLINK_TYPE_UINT8_T, 0, 24, offsetof(mavlink_param_value_t, param_type) }, \
47 static inline uint16_t mavlink_msg_param_value_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
48 const char *param_id,
float param_value, uint8_t param_type, uint16_t param_count, uint16_t param_index)
50 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
56 _mav_put_char_array(buf, 8, param_id, 16);
64 mav_array_memcpy(packet.
param_id, param_id,
sizeof(
char)*16);
89 static inline uint16_t mavlink_msg_param_value_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan,
90 mavlink_message_t* msg,
91 const char *param_id,
float param_value,uint8_t param_type,uint16_t param_count,uint16_t param_index)
93 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
99 _mav_put_char_array(buf, 8, param_id, 16);
107 mav_array_memcpy(packet.
param_id, param_id,
sizeof(
char)*16);
112 #if MAVLINK_CRC_EXTRA
127 static inline uint16_t mavlink_msg_param_value_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg,
const mavlink_param_value_t* param_value)
141 static inline uint16_t mavlink_msg_param_value_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg,
const mavlink_param_value_t* param_value)
156 #ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS
158 static inline void mavlink_msg_param_value_send(
mavlink_channel_t chan,
const char *param_id,
float param_value, uint8_t param_type, uint16_t param_count, uint16_t param_index)
160 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
166 _mav_put_char_array(buf, 8, param_id, 16);
167 #if MAVLINK_CRC_EXTRA
178 mav_array_memcpy(packet.
param_id, param_id,
sizeof(
char)*16);
179 #if MAVLINK_CRC_EXTRA
187 #if MAVLINK_MSG_ID_PARAM_VALUE_LEN <= MAVLINK_MAX_PAYLOAD_LEN
195 static inline void mavlink_msg_param_value_send_buf(mavlink_message_t *msgbuf,
mavlink_channel_t chan,
const char *param_id,
float param_value, uint8_t param_type, uint16_t param_count, uint16_t param_index)
197 #if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS
198 char *buf = (
char *)msgbuf;
203 _mav_put_char_array(buf, 8, param_id, 16);
204 #if MAVLINK_CRC_EXTRA
215 mav_array_memcpy(packet->
param_id, param_id,
sizeof(
char)*16);
216 #if MAVLINK_CRC_EXTRA
235 static inline uint16_t mavlink_msg_param_value_get_param_id(
const mavlink_message_t* msg,
char *param_id)
237 return _MAV_RETURN_char_array(msg, param_id, 16, 8);
245 static inline float mavlink_msg_param_value_get_param_value(
const mavlink_message_t* msg)
247 return _MAV_RETURN_float(msg, 0);
255 static inline uint8_t mavlink_msg_param_value_get_param_type(
const mavlink_message_t* msg)
265 static inline uint16_t mavlink_msg_param_value_get_param_count(
const mavlink_message_t* msg)
267 return _MAV_RETURN_uint16_t(msg, 4);
275 static inline uint16_t mavlink_msg_param_value_get_param_index(
const mavlink_message_t* msg)
277 return _MAV_RETURN_uint16_t(msg, 6);
286 static inline void mavlink_msg_param_value_decode(
const mavlink_message_t* msg,
mavlink_param_value_t* param_value)
288 #if MAVLINK_NEED_BYTE_SWAP
289 param_value->
param_value = mavlink_msg_param_value_get_param_value(msg);
290 param_value->
param_count = mavlink_msg_param_value_get_param_count(msg);
291 param_value->
param_index = mavlink_msg_param_value_get_param_index(msg);
292 mavlink_msg_param_value_get_param_id(msg, param_value->
param_id);
293 param_value->
param_type = mavlink_msg_param_value_get_param_type(msg);
#define _mav_put_float(buf, wire_offset, b)
Definition: protocol.h:145
Definition: mavlink_msg_param_value.h:5
#define _MAV_RETURN_uint8_t(msg, wire_offset)
Definition: protocol.h:238
MAVLINK_HELPER uint16_t mavlink_finalize_message(mavlink_message_t *msg, uint8_t system_id, uint8_t component_id, uint8_t length)
Finalize a MAVLink message with MAVLINK_COMM_0 as default channel.
Definition: mavlink_helpers.h:105
#define _mav_put_uint8_t(buf, wire_offset, b)
Definition: protocol.h:134
#define _MAV_PAYLOAD_NON_CONST(msg)
Definition: mavlink_types.h:172
mavlink_channel_t
Definition: mavlink_types.h:178
char param_id[16]
Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHO...
Definition: mavlink_msg_param_value.h:10
uint8_t param_type
Onboard parameter type: see the MAV_PARAM_TYPE enum for supported data types.
Definition: mavlink_msg_param_value.h:11
#define _MAV_PAYLOAD(msg)
Definition: mavlink_types.h:171
struct __mavlink_param_value_t mavlink_param_value_t
#define MAVLINK_MSG_ID_PARAM_VALUE_LEN
Definition: mavlink_msg_param_value.h:14
#define MAVLINK_MSG_ID_PARAM_VALUE
Definition: mavlink_msg_param_value.h:3
uint16_t param_count
Total number of onboard parameters.
Definition: mavlink_msg_param_value.h:8
#define MAVLINK_MSG_ID_PARAM_VALUE_CRC
Definition: mavlink_msg_param_value.h:17
#define _mav_put_uint16_t(buf, wire_offset, b)
Definition: protocol.h:139
MAVLINK_HELPER uint16_t mavlink_finalize_message_chan(mavlink_message_t *msg, uint8_t system_id, uint8_t component_id, uint8_t chan, uint8_t length)
Finalize a MAVLink message with channel assignment.
Definition: mavlink_helpers.h:71
float param_value
Onboard parameter value.
Definition: mavlink_msg_param_value.h:7
uint16_t param_index
Index of this onboard parameter.
Definition: mavlink_msg_param_value.h:9