6 changed files with 1408 additions and 0 deletions
@ -0,0 +1,237 @@
@@ -0,0 +1,237 @@
|
||||
// MESSAGE LOG_DATA PACKING
|
||||
|
||||
#define MAVLINK_MSG_ID_LOG_DATA 120 |
||||
|
||||
typedef struct __mavlink_log_data_t |
||||
{ |
||||
uint32_t ofs; ///< Offset into the log
|
||||
uint16_t id; ///< Log id (from LOG_ENTRY reply)
|
||||
uint8_t count; ///< Number of bytes (zero for end of log)
|
||||
uint8_t data[90]; ///< log data
|
||||
} mavlink_log_data_t; |
||||
|
||||
#define MAVLINK_MSG_ID_LOG_DATA_LEN 97 |
||||
#define MAVLINK_MSG_ID_120_LEN 97 |
||||
|
||||
#define MAVLINK_MSG_ID_LOG_DATA_CRC 134 |
||||
#define MAVLINK_MSG_ID_120_CRC 134 |
||||
|
||||
#define MAVLINK_MSG_LOG_DATA_FIELD_DATA_LEN 90 |
||||
|
||||
#define MAVLINK_MESSAGE_INFO_LOG_DATA { \ |
||||
"LOG_DATA", \
|
||||
4, \
|
||||
{ { "ofs", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_log_data_t, ofs) }, \
|
||||
{ "id", NULL, MAVLINK_TYPE_UINT16_T, 0, 4, offsetof(mavlink_log_data_t, id) }, \
|
||||
{ "count", NULL, MAVLINK_TYPE_UINT8_T, 0, 6, offsetof(mavlink_log_data_t, count) }, \
|
||||
{ "data", NULL, MAVLINK_TYPE_UINT8_T, 90, 7, offsetof(mavlink_log_data_t, data) }, \
|
||||
} \
|
||||
} |
||||
|
||||
|
||||
/**
|
||||
* @brief Pack a log_data message |
||||
* @param system_id ID of this system |
||||
* @param component_id ID of this component (e.g. 200 for IMU) |
||||
* @param msg The MAVLink message to compress the data into |
||||
* |
||||
* @param id Log id (from LOG_ENTRY reply) |
||||
* @param ofs Offset into the log |
||||
* @param count Number of bytes (zero for end of log) |
||||
* @param data log data |
||||
* @return length of the message in bytes (excluding serial stream start sign) |
||||
*/ |
||||
static inline uint16_t mavlink_msg_log_data_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, |
||||
uint16_t id, uint32_t ofs, uint8_t count, const uint8_t *data) |
||||
{ |
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
char buf[MAVLINK_MSG_ID_LOG_DATA_LEN]; |
||||
_mav_put_uint32_t(buf, 0, ofs); |
||||
_mav_put_uint16_t(buf, 4, id); |
||||
_mav_put_uint8_t(buf, 6, count); |
||||
_mav_put_uint8_t_array(buf, 7, data, 90); |
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_LOG_DATA_LEN); |
||||
#else |
||||
mavlink_log_data_t packet; |
||||
packet.ofs = ofs; |
||||
packet.id = id; |
||||
packet.count = count; |
||||
mav_array_memcpy(packet.data, data, sizeof(uint8_t)*90); |
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_LOG_DATA_LEN); |
||||
#endif |
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_LOG_DATA; |
||||
#if MAVLINK_CRC_EXTRA |
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_LOG_DATA_LEN, MAVLINK_MSG_ID_LOG_DATA_CRC); |
||||
#else |
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_LOG_DATA_LEN); |
||||
#endif |
||||
} |
||||
|
||||
/**
|
||||
* @brief Pack a log_data message on a channel |
||||
* @param system_id ID of this system |
||||
* @param component_id ID of this component (e.g. 200 for IMU) |
||||
* @param chan The MAVLink channel this message will be sent over |
||||
* @param msg The MAVLink message to compress the data into |
||||
* @param id Log id (from LOG_ENTRY reply) |
||||
* @param ofs Offset into the log |
||||
* @param count Number of bytes (zero for end of log) |
||||
* @param data log data |
||||
* @return length of the message in bytes (excluding serial stream start sign) |
||||
*/ |
||||
static inline uint16_t mavlink_msg_log_data_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, |
||||
mavlink_message_t* msg, |
||||
uint16_t id,uint32_t ofs,uint8_t count,const uint8_t *data) |
||||
{ |
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
char buf[MAVLINK_MSG_ID_LOG_DATA_LEN]; |
||||
_mav_put_uint32_t(buf, 0, ofs); |
||||
_mav_put_uint16_t(buf, 4, id); |
||||
_mav_put_uint8_t(buf, 6, count); |
||||
_mav_put_uint8_t_array(buf, 7, data, 90); |
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_LOG_DATA_LEN); |
||||
#else |
||||
mavlink_log_data_t packet; |
||||
packet.ofs = ofs; |
||||
packet.id = id; |
||||
packet.count = count; |
||||
mav_array_memcpy(packet.data, data, sizeof(uint8_t)*90); |
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_LOG_DATA_LEN); |
||||
#endif |
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_LOG_DATA; |
||||
#if MAVLINK_CRC_EXTRA |
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_LOG_DATA_LEN, MAVLINK_MSG_ID_LOG_DATA_CRC); |
||||
#else |
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_LOG_DATA_LEN); |
||||
#endif |
||||
} |
||||
|
||||
/**
|
||||
* @brief Encode a log_data struct |
||||
* |
||||
* @param system_id ID of this system |
||||
* @param component_id ID of this component (e.g. 200 for IMU) |
||||
* @param msg The MAVLink message to compress the data into |
||||
* @param log_data C-struct to read the message contents from |
||||
*/ |
||||
static inline uint16_t mavlink_msg_log_data_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_log_data_t* log_data) |
||||
{ |
||||
return mavlink_msg_log_data_pack(system_id, component_id, msg, log_data->id, log_data->ofs, log_data->count, log_data->data); |
||||
} |
||||
|
||||
/**
|
||||
* @brief Encode a log_data struct on a channel |
||||
* |
||||
* @param system_id ID of this system |
||||
* @param component_id ID of this component (e.g. 200 for IMU) |
||||
* @param chan The MAVLink channel this message will be sent over |
||||
* @param msg The MAVLink message to compress the data into |
||||
* @param log_data C-struct to read the message contents from |
||||
*/ |
||||
static inline uint16_t mavlink_msg_log_data_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_log_data_t* log_data) |
||||
{ |
||||
return mavlink_msg_log_data_pack_chan(system_id, component_id, chan, msg, log_data->id, log_data->ofs, log_data->count, log_data->data); |
||||
} |
||||
|
||||
/**
|
||||
* @brief Send a log_data message |
||||
* @param chan MAVLink channel to send the message |
||||
* |
||||
* @param id Log id (from LOG_ENTRY reply) |
||||
* @param ofs Offset into the log |
||||
* @param count Number of bytes (zero for end of log) |
||||
* @param data log data |
||||
*/ |
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS |
||||
|
||||
static inline void mavlink_msg_log_data_send(mavlink_channel_t chan, uint16_t id, uint32_t ofs, uint8_t count, const uint8_t *data) |
||||
{ |
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
char buf[MAVLINK_MSG_ID_LOG_DATA_LEN]; |
||||
_mav_put_uint32_t(buf, 0, ofs); |
||||
_mav_put_uint16_t(buf, 4, id); |
||||
_mav_put_uint8_t(buf, 6, count); |
||||
_mav_put_uint8_t_array(buf, 7, data, 90); |
||||
#if MAVLINK_CRC_EXTRA |
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOG_DATA, buf, MAVLINK_MSG_ID_LOG_DATA_LEN, MAVLINK_MSG_ID_LOG_DATA_CRC); |
||||
#else |
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOG_DATA, buf, MAVLINK_MSG_ID_LOG_DATA_LEN); |
||||
#endif |
||||
#else |
||||
mavlink_log_data_t packet; |
||||
packet.ofs = ofs; |
||||
packet.id = id; |
||||
packet.count = count; |
||||
mav_array_memcpy(packet.data, data, sizeof(uint8_t)*90); |
||||
#if MAVLINK_CRC_EXTRA |
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOG_DATA, (const char *)&packet, MAVLINK_MSG_ID_LOG_DATA_LEN, MAVLINK_MSG_ID_LOG_DATA_CRC); |
||||
#else |
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOG_DATA, (const char *)&packet, MAVLINK_MSG_ID_LOG_DATA_LEN); |
||||
#endif |
||||
#endif |
||||
} |
||||
|
||||
#endif |
||||
|
||||
// MESSAGE LOG_DATA UNPACKING
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get field id from log_data message |
||||
* |
||||
* @return Log id (from LOG_ENTRY reply) |
||||
*/ |
||||
static inline uint16_t mavlink_msg_log_data_get_id(const mavlink_message_t* msg) |
||||
{ |
||||
return _MAV_RETURN_uint16_t(msg, 4); |
||||
} |
||||
|
||||
/**
|
||||
* @brief Get field ofs from log_data message |
||||
* |
||||
* @return Offset into the log |
||||
*/ |
||||
static inline uint32_t mavlink_msg_log_data_get_ofs(const mavlink_message_t* msg) |
||||
{ |
||||
return _MAV_RETURN_uint32_t(msg, 0); |
||||
} |
||||
|
||||
/**
|
||||
* @brief Get field count from log_data message |
||||
* |
||||
* @return Number of bytes (zero for end of log) |
||||
*/ |
||||
static inline uint8_t mavlink_msg_log_data_get_count(const mavlink_message_t* msg) |
||||
{ |
||||
return _MAV_RETURN_uint8_t(msg, 6); |
||||
} |
||||
|
||||
/**
|
||||
* @brief Get field data from log_data message |
||||
* |
||||
* @return log data |
||||
*/ |
||||
static inline uint16_t mavlink_msg_log_data_get_data(const mavlink_message_t* msg, uint8_t *data) |
||||
{ |
||||
return _MAV_RETURN_uint8_t_array(msg, data, 90, 7); |
||||
} |
||||
|
||||
/**
|
||||
* @brief Decode a log_data message into a struct |
||||
* |
||||
* @param msg The message to decode |
||||
* @param log_data C-struct to decode the message contents into |
||||
*/ |
||||
static inline void mavlink_msg_log_data_decode(const mavlink_message_t* msg, mavlink_log_data_t* log_data) |
||||
{ |
||||
#if MAVLINK_NEED_BYTE_SWAP |
||||
log_data->ofs = mavlink_msg_log_data_get_ofs(msg); |
||||
log_data->id = mavlink_msg_log_data_get_id(msg); |
||||
log_data->count = mavlink_msg_log_data_get_count(msg); |
||||
mavlink_msg_log_data_get_data(msg, log_data->data); |
||||
#else |
||||
memcpy(log_data, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_LOG_DATA_LEN); |
||||
#endif |
||||
} |
@ -0,0 +1,265 @@
@@ -0,0 +1,265 @@
|
||||
// MESSAGE LOG_ENTRY PACKING
|
||||
|
||||
#define MAVLINK_MSG_ID_LOG_ENTRY 118 |
||||
|
||||
typedef struct __mavlink_log_entry_t |
||||
{ |
||||
uint32_t time_utc; ///< UTC timestamp of log in seconds since 1970, or 0 if not available
|
||||
uint32_t size; ///< Size of the log (may be approximate) in bytes
|
||||
uint16_t id; ///< Log id
|
||||
uint16_t num_logs; ///< Total number of logs
|
||||
uint16_t last_log_num; ///< High log number
|
||||
} mavlink_log_entry_t; |
||||
|
||||
#define MAVLINK_MSG_ID_LOG_ENTRY_LEN 14 |
||||
#define MAVLINK_MSG_ID_118_LEN 14 |
||||
|
||||
#define MAVLINK_MSG_ID_LOG_ENTRY_CRC 56 |
||||
#define MAVLINK_MSG_ID_118_CRC 56 |
||||
|
||||
|
||||
|
||||
#define MAVLINK_MESSAGE_INFO_LOG_ENTRY { \ |
||||
"LOG_ENTRY", \
|
||||
5, \
|
||||
{ { "time_utc", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_log_entry_t, time_utc) }, \
|
||||
{ "size", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_log_entry_t, size) }, \
|
||||
{ "id", NULL, MAVLINK_TYPE_UINT16_T, 0, 8, offsetof(mavlink_log_entry_t, id) }, \
|
||||
{ "num_logs", NULL, MAVLINK_TYPE_UINT16_T, 0, 10, offsetof(mavlink_log_entry_t, num_logs) }, \
|
||||
{ "last_log_num", NULL, MAVLINK_TYPE_UINT16_T, 0, 12, offsetof(mavlink_log_entry_t, last_log_num) }, \
|
||||
} \
|
||||
} |
||||
|
||||
|
||||
/**
|
||||
* @brief Pack a log_entry message |
||||
* @param system_id ID of this system |
||||
* @param component_id ID of this component (e.g. 200 for IMU) |
||||
* @param msg The MAVLink message to compress the data into |
||||
* |
||||
* @param id Log id |
||||
* @param num_logs Total number of logs |
||||
* @param last_log_num High log number |
||||
* @param time_utc UTC timestamp of log in seconds since 1970, or 0 if not available |
||||
* @param size Size of the log (may be approximate) in bytes |
||||
* @return length of the message in bytes (excluding serial stream start sign) |
||||
*/ |
||||
static inline uint16_t mavlink_msg_log_entry_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, |
||||
uint16_t id, uint16_t num_logs, uint16_t last_log_num, uint32_t time_utc, uint32_t size) |
||||
{ |
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
char buf[MAVLINK_MSG_ID_LOG_ENTRY_LEN]; |
||||
_mav_put_uint32_t(buf, 0, time_utc); |
||||
_mav_put_uint32_t(buf, 4, size); |
||||
_mav_put_uint16_t(buf, 8, id); |
||||
_mav_put_uint16_t(buf, 10, num_logs); |
||||
_mav_put_uint16_t(buf, 12, last_log_num); |
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_LOG_ENTRY_LEN); |
||||
#else |
||||
mavlink_log_entry_t packet; |
||||
packet.time_utc = time_utc; |
||||
packet.size = size; |
||||
packet.id = id; |
||||
packet.num_logs = num_logs; |
||||
packet.last_log_num = last_log_num; |
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_LOG_ENTRY_LEN); |
||||
#endif |
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_LOG_ENTRY; |
||||
#if MAVLINK_CRC_EXTRA |
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_LOG_ENTRY_LEN, MAVLINK_MSG_ID_LOG_ENTRY_CRC); |
||||
#else |
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_LOG_ENTRY_LEN); |
||||
#endif |
||||
} |
||||
|
||||
/**
|
||||
* @brief Pack a log_entry message on a channel |
||||
* @param system_id ID of this system |
||||
* @param component_id ID of this component (e.g. 200 for IMU) |
||||
* @param chan The MAVLink channel this message will be sent over |
||||
* @param msg The MAVLink message to compress the data into |
||||
* @param id Log id |
||||
* @param num_logs Total number of logs |
||||
* @param last_log_num High log number |
||||
* @param time_utc UTC timestamp of log in seconds since 1970, or 0 if not available |
||||
* @param size Size of the log (may be approximate) in bytes |
||||
* @return length of the message in bytes (excluding serial stream start sign) |
||||
*/ |
||||
static inline uint16_t mavlink_msg_log_entry_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, |
||||
mavlink_message_t* msg, |
||||
uint16_t id,uint16_t num_logs,uint16_t last_log_num,uint32_t time_utc,uint32_t size) |
||||
{ |
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
char buf[MAVLINK_MSG_ID_LOG_ENTRY_LEN]; |
||||
_mav_put_uint32_t(buf, 0, time_utc); |
||||
_mav_put_uint32_t(buf, 4, size); |
||||
_mav_put_uint16_t(buf, 8, id); |
||||
_mav_put_uint16_t(buf, 10, num_logs); |
||||
_mav_put_uint16_t(buf, 12, last_log_num); |
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_LOG_ENTRY_LEN); |
||||
#else |
||||
mavlink_log_entry_t packet; |
||||
packet.time_utc = time_utc; |
||||
packet.size = size; |
||||
packet.id = id; |
||||
packet.num_logs = num_logs; |
||||
packet.last_log_num = last_log_num; |
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_LOG_ENTRY_LEN); |
||||
#endif |
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_LOG_ENTRY; |
||||
#if MAVLINK_CRC_EXTRA |
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_LOG_ENTRY_LEN, MAVLINK_MSG_ID_LOG_ENTRY_CRC); |
||||
#else |
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_LOG_ENTRY_LEN); |
||||
#endif |
||||
} |
||||
|
||||
/**
|
||||
* @brief Encode a log_entry struct |
||||
* |
||||
* @param system_id ID of this system |
||||
* @param component_id ID of this component (e.g. 200 for IMU) |
||||
* @param msg The MAVLink message to compress the data into |
||||
* @param log_entry C-struct to read the message contents from |
||||
*/ |
||||
static inline uint16_t mavlink_msg_log_entry_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_log_entry_t* log_entry) |
||||
{ |
||||
return mavlink_msg_log_entry_pack(system_id, component_id, msg, log_entry->id, log_entry->num_logs, log_entry->last_log_num, log_entry->time_utc, log_entry->size); |
||||
} |
||||
|
||||
/**
|
||||
* @brief Encode a log_entry struct on a channel |
||||
* |
||||
* @param system_id ID of this system |
||||
* @param component_id ID of this component (e.g. 200 for IMU) |
||||
* @param chan The MAVLink channel this message will be sent over |
||||
* @param msg The MAVLink message to compress the data into |
||||
* @param log_entry C-struct to read the message contents from |
||||
*/ |
||||
static inline uint16_t mavlink_msg_log_entry_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_log_entry_t* log_entry) |
||||
{ |
||||
return mavlink_msg_log_entry_pack_chan(system_id, component_id, chan, msg, log_entry->id, log_entry->num_logs, log_entry->last_log_num, log_entry->time_utc, log_entry->size); |
||||
} |
||||
|
||||
/**
|
||||
* @brief Send a log_entry message |
||||
* @param chan MAVLink channel to send the message |
||||
* |
||||
* @param id Log id |
||||
* @param num_logs Total number of logs |
||||
* @param last_log_num High log number |
||||
* @param time_utc UTC timestamp of log in seconds since 1970, or 0 if not available |
||||
* @param size Size of the log (may be approximate) in bytes |
||||
*/ |
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS |
||||
|
||||
static inline void mavlink_msg_log_entry_send(mavlink_channel_t chan, uint16_t id, uint16_t num_logs, uint16_t last_log_num, uint32_t time_utc, uint32_t size) |
||||
{ |
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
char buf[MAVLINK_MSG_ID_LOG_ENTRY_LEN]; |
||||
_mav_put_uint32_t(buf, 0, time_utc); |
||||
_mav_put_uint32_t(buf, 4, size); |
||||
_mav_put_uint16_t(buf, 8, id); |
||||
_mav_put_uint16_t(buf, 10, num_logs); |
||||
_mav_put_uint16_t(buf, 12, last_log_num); |
||||
|
||||
#if MAVLINK_CRC_EXTRA |
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOG_ENTRY, buf, MAVLINK_MSG_ID_LOG_ENTRY_LEN, MAVLINK_MSG_ID_LOG_ENTRY_CRC); |
||||
#else |
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOG_ENTRY, buf, MAVLINK_MSG_ID_LOG_ENTRY_LEN); |
||||
#endif |
||||
#else |
||||
mavlink_log_entry_t packet; |
||||
packet.time_utc = time_utc; |
||||
packet.size = size; |
||||
packet.id = id; |
||||
packet.num_logs = num_logs; |
||||
packet.last_log_num = last_log_num; |
||||
|
||||
#if MAVLINK_CRC_EXTRA |
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOG_ENTRY, (const char *)&packet, MAVLINK_MSG_ID_LOG_ENTRY_LEN, MAVLINK_MSG_ID_LOG_ENTRY_CRC); |
||||
#else |
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOG_ENTRY, (const char *)&packet, MAVLINK_MSG_ID_LOG_ENTRY_LEN); |
||||
#endif |
||||
#endif |
||||
} |
||||
|
||||
#endif |
||||
|
||||
// MESSAGE LOG_ENTRY UNPACKING
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get field id from log_entry message |
||||
* |
||||
* @return Log id |
||||
*/ |
||||
static inline uint16_t mavlink_msg_log_entry_get_id(const mavlink_message_t* msg) |
||||
{ |
||||
return _MAV_RETURN_uint16_t(msg, 8); |
||||
} |
||||
|
||||
/**
|
||||
* @brief Get field num_logs from log_entry message |
||||
* |
||||
* @return Total number of logs |
||||
*/ |
||||
static inline uint16_t mavlink_msg_log_entry_get_num_logs(const mavlink_message_t* msg) |
||||
{ |
||||
return _MAV_RETURN_uint16_t(msg, 10); |
||||
} |
||||
|
||||
/**
|
||||
* @brief Get field last_log_num from log_entry message |
||||
* |
||||
* @return High log number |
||||
*/ |
||||
static inline uint16_t mavlink_msg_log_entry_get_last_log_num(const mavlink_message_t* msg) |
||||
{ |
||||
return _MAV_RETURN_uint16_t(msg, 12); |
||||
} |
||||
|
||||
/**
|
||||
* @brief Get field time_utc from log_entry message |
||||
* |
||||
* @return UTC timestamp of log in seconds since 1970, or 0 if not available |
||||
*/ |
||||
static inline uint32_t mavlink_msg_log_entry_get_time_utc(const mavlink_message_t* msg) |
||||
{ |
||||
return _MAV_RETURN_uint32_t(msg, 0); |
||||
} |
||||
|
||||
/**
|
||||
* @brief Get field size from log_entry message |
||||
* |
||||
* @return Size of the log (may be approximate) in bytes |
||||
*/ |
||||
static inline uint32_t mavlink_msg_log_entry_get_size(const mavlink_message_t* msg) |
||||
{ |
||||
return _MAV_RETURN_uint32_t(msg, 4); |
||||
} |
||||
|
||||
/**
|
||||
* @brief Decode a log_entry message into a struct |
||||
* |
||||
* @param msg The message to decode |
||||
* @param log_entry C-struct to decode the message contents into |
||||
*/ |
||||
static inline void mavlink_msg_log_entry_decode(const mavlink_message_t* msg, mavlink_log_entry_t* log_entry) |
||||
{ |
||||
#if MAVLINK_NEED_BYTE_SWAP |
||||
log_entry->time_utc = mavlink_msg_log_entry_get_time_utc(msg); |
||||
log_entry->size = mavlink_msg_log_entry_get_size(msg); |
||||
log_entry->id = mavlink_msg_log_entry_get_id(msg); |
||||
log_entry->num_logs = mavlink_msg_log_entry_get_num_logs(msg); |
||||
log_entry->last_log_num = mavlink_msg_log_entry_get_last_log_num(msg); |
||||
#else |
||||
memcpy(log_entry, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_LOG_ENTRY_LEN); |
||||
#endif |
||||
} |
@ -0,0 +1,199 @@
@@ -0,0 +1,199 @@
|
||||
// MESSAGE LOG_ERASE PACKING
|
||||
|
||||
#define MAVLINK_MSG_ID_LOG_ERASE 121 |
||||
|
||||
typedef struct __mavlink_log_erase_t |
||||
{ |
||||
uint8_t target_system; ///< System ID
|
||||
uint8_t target_component; ///< Component ID
|
||||
} mavlink_log_erase_t; |
||||
|
||||
#define MAVLINK_MSG_ID_LOG_ERASE_LEN 2 |
||||
#define MAVLINK_MSG_ID_121_LEN 2 |
||||
|
||||
#define MAVLINK_MSG_ID_LOG_ERASE_CRC 237 |
||||
#define MAVLINK_MSG_ID_121_CRC 237 |
||||
|
||||
|
||||
|
||||
#define MAVLINK_MESSAGE_INFO_LOG_ERASE { \ |
||||
"LOG_ERASE", \
|
||||
2, \
|
||||
{ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_log_erase_t, target_system) }, \
|
||||
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_log_erase_t, target_component) }, \
|
||||
} \
|
||||
} |
||||
|
||||
|
||||
/**
|
||||
* @brief Pack a log_erase message |
||||
* @param system_id ID of this system |
||||
* @param component_id ID of this component (e.g. 200 for IMU) |
||||
* @param msg The MAVLink message to compress the data into |
||||
* |
||||
* @param target_system System ID |
||||
* @param target_component Component ID |
||||
* @return length of the message in bytes (excluding serial stream start sign) |
||||
*/ |
||||
static inline uint16_t mavlink_msg_log_erase_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, |
||||
uint8_t target_system, uint8_t target_component) |
||||
{ |
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
char buf[MAVLINK_MSG_ID_LOG_ERASE_LEN]; |
||||
_mav_put_uint8_t(buf, 0, target_system); |
||||
_mav_put_uint8_t(buf, 1, target_component); |
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_LOG_ERASE_LEN); |
||||
#else |
||||
mavlink_log_erase_t packet; |
||||
packet.target_system = target_system; |
||||
packet.target_component = target_component; |
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_LOG_ERASE_LEN); |
||||
#endif |
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_LOG_ERASE; |
||||
#if MAVLINK_CRC_EXTRA |
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_LOG_ERASE_LEN, MAVLINK_MSG_ID_LOG_ERASE_CRC); |
||||
#else |
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_LOG_ERASE_LEN); |
||||
#endif |
||||
} |
||||
|
||||
/**
|
||||
* @brief Pack a log_erase message on a channel |
||||
* @param system_id ID of this system |
||||
* @param component_id ID of this component (e.g. 200 for IMU) |
||||
* @param chan The MAVLink channel this message will be sent over |
||||
* @param msg The MAVLink message to compress the data into |
||||
* @param target_system System ID |
||||
* @param target_component Component ID |
||||
* @return length of the message in bytes (excluding serial stream start sign) |
||||
*/ |
||||
static inline uint16_t mavlink_msg_log_erase_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, |
||||
mavlink_message_t* msg, |
||||
uint8_t target_system,uint8_t target_component) |
||||
{ |
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
char buf[MAVLINK_MSG_ID_LOG_ERASE_LEN]; |
||||
_mav_put_uint8_t(buf, 0, target_system); |
||||
_mav_put_uint8_t(buf, 1, target_component); |
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_LOG_ERASE_LEN); |
||||
#else |
||||
mavlink_log_erase_t packet; |
||||
packet.target_system = target_system; |
||||
packet.target_component = target_component; |
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_LOG_ERASE_LEN); |
||||
#endif |
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_LOG_ERASE; |
||||
#if MAVLINK_CRC_EXTRA |
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_LOG_ERASE_LEN, MAVLINK_MSG_ID_LOG_ERASE_CRC); |
||||
#else |
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_LOG_ERASE_LEN); |
||||
#endif |
||||
} |
||||
|
||||
/**
|
||||
* @brief Encode a log_erase struct |
||||
* |
||||
* @param system_id ID of this system |
||||
* @param component_id ID of this component (e.g. 200 for IMU) |
||||
* @param msg The MAVLink message to compress the data into |
||||
* @param log_erase C-struct to read the message contents from |
||||
*/ |
||||
static inline uint16_t mavlink_msg_log_erase_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_log_erase_t* log_erase) |
||||
{ |
||||
return mavlink_msg_log_erase_pack(system_id, component_id, msg, log_erase->target_system, log_erase->target_component); |
||||
} |
||||
|
||||
/**
|
||||
* @brief Encode a log_erase struct on a channel |
||||
* |
||||
* @param system_id ID of this system |
||||
* @param component_id ID of this component (e.g. 200 for IMU) |
||||
* @param chan The MAVLink channel this message will be sent over |
||||
* @param msg The MAVLink message to compress the data into |
||||
* @param log_erase C-struct to read the message contents from |
||||
*/ |
||||
static inline uint16_t mavlink_msg_log_erase_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_log_erase_t* log_erase) |
||||
{ |
||||
return mavlink_msg_log_erase_pack_chan(system_id, component_id, chan, msg, log_erase->target_system, log_erase->target_component); |
||||
} |
||||
|
||||
/**
|
||||
* @brief Send a log_erase message |
||||
* @param chan MAVLink channel to send the message |
||||
* |
||||
* @param target_system System ID |
||||
* @param target_component Component ID |
||||
*/ |
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS |
||||
|
||||
static inline void mavlink_msg_log_erase_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component) |
||||
{ |
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
char buf[MAVLINK_MSG_ID_LOG_ERASE_LEN]; |
||||
_mav_put_uint8_t(buf, 0, target_system); |
||||
_mav_put_uint8_t(buf, 1, target_component); |
||||
|
||||
#if MAVLINK_CRC_EXTRA |
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOG_ERASE, buf, MAVLINK_MSG_ID_LOG_ERASE_LEN, MAVLINK_MSG_ID_LOG_ERASE_CRC); |
||||
#else |
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOG_ERASE, buf, MAVLINK_MSG_ID_LOG_ERASE_LEN); |
||||
#endif |
||||
#else |
||||
mavlink_log_erase_t packet; |
||||
packet.target_system = target_system; |
||||
packet.target_component = target_component; |
||||
|
||||
#if MAVLINK_CRC_EXTRA |
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOG_ERASE, (const char *)&packet, MAVLINK_MSG_ID_LOG_ERASE_LEN, MAVLINK_MSG_ID_LOG_ERASE_CRC); |
||||
#else |
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOG_ERASE, (const char *)&packet, MAVLINK_MSG_ID_LOG_ERASE_LEN); |
||||
#endif |
||||
#endif |
||||
} |
||||
|
||||
#endif |
||||
|
||||
// MESSAGE LOG_ERASE UNPACKING
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get field target_system from log_erase message |
||||
* |
||||
* @return System ID |
||||
*/ |
||||
static inline uint8_t mavlink_msg_log_erase_get_target_system(const mavlink_message_t* msg) |
||||
{ |
||||
return _MAV_RETURN_uint8_t(msg, 0); |
||||
} |
||||
|
||||
/**
|
||||
* @brief Get field target_component from log_erase message |
||||
* |
||||
* @return Component ID |
||||
*/ |
||||
static inline uint8_t mavlink_msg_log_erase_get_target_component(const mavlink_message_t* msg) |
||||
{ |
||||
return _MAV_RETURN_uint8_t(msg, 1); |
||||
} |
||||
|
||||
/**
|
||||
* @brief Decode a log_erase message into a struct |
||||
* |
||||
* @param msg The message to decode |
||||
* @param log_erase C-struct to decode the message contents into |
||||
*/ |
||||
static inline void mavlink_msg_log_erase_decode(const mavlink_message_t* msg, mavlink_log_erase_t* log_erase) |
||||
{ |
||||
#if MAVLINK_NEED_BYTE_SWAP |
||||
log_erase->target_system = mavlink_msg_log_erase_get_target_system(msg); |
||||
log_erase->target_component = mavlink_msg_log_erase_get_target_component(msg); |
||||
#else |
||||
memcpy(log_erase, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_LOG_ERASE_LEN); |
||||
#endif |
||||
} |
@ -0,0 +1,265 @@
@@ -0,0 +1,265 @@
|
||||
// MESSAGE LOG_REQUEST_DATA PACKING
|
||||
|
||||
#define MAVLINK_MSG_ID_LOG_REQUEST_DATA 119 |
||||
|
||||
typedef struct __mavlink_log_request_data_t |
||||
{ |
||||
uint32_t ofs; ///< Offset into the log
|
||||
uint32_t count; ///< Number of bytes
|
||||
uint16_t id; ///< Log id (from LOG_ENTRY reply)
|
||||
uint8_t target_system; ///< System ID
|
||||
uint8_t target_component; ///< Component ID
|
||||
} mavlink_log_request_data_t; |
||||
|
||||
#define MAVLINK_MSG_ID_LOG_REQUEST_DATA_LEN 12 |
||||
#define MAVLINK_MSG_ID_119_LEN 12 |
||||
|
||||
#define MAVLINK_MSG_ID_LOG_REQUEST_DATA_CRC 116 |
||||
#define MAVLINK_MSG_ID_119_CRC 116 |
||||
|
||||
|
||||
|
||||
#define MAVLINK_MESSAGE_INFO_LOG_REQUEST_DATA { \ |
||||
"LOG_REQUEST_DATA", \
|
||||
5, \
|
||||
{ { "ofs", NULL, MAVLINK_TYPE_UINT32_T, 0, 0, offsetof(mavlink_log_request_data_t, ofs) }, \
|
||||
{ "count", NULL, MAVLINK_TYPE_UINT32_T, 0, 4, offsetof(mavlink_log_request_data_t, count) }, \
|
||||
{ "id", NULL, MAVLINK_TYPE_UINT16_T, 0, 8, offsetof(mavlink_log_request_data_t, id) }, \
|
||||
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 10, offsetof(mavlink_log_request_data_t, target_system) }, \
|
||||
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 11, offsetof(mavlink_log_request_data_t, target_component) }, \
|
||||
} \
|
||||
} |
||||
|
||||
|
||||
/**
|
||||
* @brief Pack a log_request_data message |
||||
* @param system_id ID of this system |
||||
* @param component_id ID of this component (e.g. 200 for IMU) |
||||
* @param msg The MAVLink message to compress the data into |
||||
* |
||||
* @param target_system System ID |
||||
* @param target_component Component ID |
||||
* @param id Log id (from LOG_ENTRY reply) |
||||
* @param ofs Offset into the log |
||||
* @param count Number of bytes |
||||
* @return length of the message in bytes (excluding serial stream start sign) |
||||
*/ |
||||
static inline uint16_t mavlink_msg_log_request_data_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, |
||||
uint8_t target_system, uint8_t target_component, uint16_t id, uint32_t ofs, uint32_t count) |
||||
{ |
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
char buf[MAVLINK_MSG_ID_LOG_REQUEST_DATA_LEN]; |
||||
_mav_put_uint32_t(buf, 0, ofs); |
||||
_mav_put_uint32_t(buf, 4, count); |
||||
_mav_put_uint16_t(buf, 8, id); |
||||
_mav_put_uint8_t(buf, 10, target_system); |
||||
_mav_put_uint8_t(buf, 11, target_component); |
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_LOG_REQUEST_DATA_LEN); |
||||
#else |
||||
mavlink_log_request_data_t packet; |
||||
packet.ofs = ofs; |
||||
packet.count = count; |
||||
packet.id = id; |
||||
packet.target_system = target_system; |
||||
packet.target_component = target_component; |
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_LOG_REQUEST_DATA_LEN); |
||||
#endif |
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_LOG_REQUEST_DATA; |
||||
#if MAVLINK_CRC_EXTRA |
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_LOG_REQUEST_DATA_LEN, MAVLINK_MSG_ID_LOG_REQUEST_DATA_CRC); |
||||
#else |
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_LOG_REQUEST_DATA_LEN); |
||||
#endif |
||||
} |
||||
|
||||
/**
|
||||
* @brief Pack a log_request_data message on a channel |
||||
* @param system_id ID of this system |
||||
* @param component_id ID of this component (e.g. 200 for IMU) |
||||
* @param chan The MAVLink channel this message will be sent over |
||||
* @param msg The MAVLink message to compress the data into |
||||
* @param target_system System ID |
||||
* @param target_component Component ID |
||||
* @param id Log id (from LOG_ENTRY reply) |
||||
* @param ofs Offset into the log |
||||
* @param count Number of bytes |
||||
* @return length of the message in bytes (excluding serial stream start sign) |
||||
*/ |
||||
static inline uint16_t mavlink_msg_log_request_data_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, |
||||
mavlink_message_t* msg, |
||||
uint8_t target_system,uint8_t target_component,uint16_t id,uint32_t ofs,uint32_t count) |
||||
{ |
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
char buf[MAVLINK_MSG_ID_LOG_REQUEST_DATA_LEN]; |
||||
_mav_put_uint32_t(buf, 0, ofs); |
||||
_mav_put_uint32_t(buf, 4, count); |
||||
_mav_put_uint16_t(buf, 8, id); |
||||
_mav_put_uint8_t(buf, 10, target_system); |
||||
_mav_put_uint8_t(buf, 11, target_component); |
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_LOG_REQUEST_DATA_LEN); |
||||
#else |
||||
mavlink_log_request_data_t packet; |
||||
packet.ofs = ofs; |
||||
packet.count = count; |
||||
packet.id = id; |
||||
packet.target_system = target_system; |
||||
packet.target_component = target_component; |
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_LOG_REQUEST_DATA_LEN); |
||||
#endif |
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_LOG_REQUEST_DATA; |
||||
#if MAVLINK_CRC_EXTRA |
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_LOG_REQUEST_DATA_LEN, MAVLINK_MSG_ID_LOG_REQUEST_DATA_CRC); |
||||
#else |
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_LOG_REQUEST_DATA_LEN); |
||||
#endif |
||||
} |
||||
|
||||
/**
|
||||
* @brief Encode a log_request_data struct |
||||
* |
||||
* @param system_id ID of this system |
||||
* @param component_id ID of this component (e.g. 200 for IMU) |
||||
* @param msg The MAVLink message to compress the data into |
||||
* @param log_request_data C-struct to read the message contents from |
||||
*/ |
||||
static inline uint16_t mavlink_msg_log_request_data_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_log_request_data_t* log_request_data) |
||||
{ |
||||
return mavlink_msg_log_request_data_pack(system_id, component_id, msg, log_request_data->target_system, log_request_data->target_component, log_request_data->id, log_request_data->ofs, log_request_data->count); |
||||
} |
||||
|
||||
/**
|
||||
* @brief Encode a log_request_data struct on a channel |
||||
* |
||||
* @param system_id ID of this system |
||||
* @param component_id ID of this component (e.g. 200 for IMU) |
||||
* @param chan The MAVLink channel this message will be sent over |
||||
* @param msg The MAVLink message to compress the data into |
||||
* @param log_request_data C-struct to read the message contents from |
||||
*/ |
||||
static inline uint16_t mavlink_msg_log_request_data_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_log_request_data_t* log_request_data) |
||||
{ |
||||
return mavlink_msg_log_request_data_pack_chan(system_id, component_id, chan, msg, log_request_data->target_system, log_request_data->target_component, log_request_data->id, log_request_data->ofs, log_request_data->count); |
||||
} |
||||
|
||||
/**
|
||||
* @brief Send a log_request_data message |
||||
* @param chan MAVLink channel to send the message |
||||
* |
||||
* @param target_system System ID |
||||
* @param target_component Component ID |
||||
* @param id Log id (from LOG_ENTRY reply) |
||||
* @param ofs Offset into the log |
||||
* @param count Number of bytes |
||||
*/ |
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS |
||||
|
||||
static inline void mavlink_msg_log_request_data_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t id, uint32_t ofs, uint32_t count) |
||||
{ |
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
char buf[MAVLINK_MSG_ID_LOG_REQUEST_DATA_LEN]; |
||||
_mav_put_uint32_t(buf, 0, ofs); |
||||
_mav_put_uint32_t(buf, 4, count); |
||||
_mav_put_uint16_t(buf, 8, id); |
||||
_mav_put_uint8_t(buf, 10, target_system); |
||||
_mav_put_uint8_t(buf, 11, target_component); |
||||
|
||||
#if MAVLINK_CRC_EXTRA |
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOG_REQUEST_DATA, buf, MAVLINK_MSG_ID_LOG_REQUEST_DATA_LEN, MAVLINK_MSG_ID_LOG_REQUEST_DATA_CRC); |
||||
#else |
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOG_REQUEST_DATA, buf, MAVLINK_MSG_ID_LOG_REQUEST_DATA_LEN); |
||||
#endif |
||||
#else |
||||
mavlink_log_request_data_t packet; |
||||
packet.ofs = ofs; |
||||
packet.count = count; |
||||
packet.id = id; |
||||
packet.target_system = target_system; |
||||
packet.target_component = target_component; |
||||
|
||||
#if MAVLINK_CRC_EXTRA |
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOG_REQUEST_DATA, (const char *)&packet, MAVLINK_MSG_ID_LOG_REQUEST_DATA_LEN, MAVLINK_MSG_ID_LOG_REQUEST_DATA_CRC); |
||||
#else |
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOG_REQUEST_DATA, (const char *)&packet, MAVLINK_MSG_ID_LOG_REQUEST_DATA_LEN); |
||||
#endif |
||||
#endif |
||||
} |
||||
|
||||
#endif |
||||
|
||||
// MESSAGE LOG_REQUEST_DATA UNPACKING
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get field target_system from log_request_data message |
||||
* |
||||
* @return System ID |
||||
*/ |
||||
static inline uint8_t mavlink_msg_log_request_data_get_target_system(const mavlink_message_t* msg) |
||||
{ |
||||
return _MAV_RETURN_uint8_t(msg, 10); |
||||
} |
||||
|
||||
/**
|
||||
* @brief Get field target_component from log_request_data message |
||||
* |
||||
* @return Component ID |
||||
*/ |
||||
static inline uint8_t mavlink_msg_log_request_data_get_target_component(const mavlink_message_t* msg) |
||||
{ |
||||
return _MAV_RETURN_uint8_t(msg, 11); |
||||
} |
||||
|
||||
/**
|
||||
* @brief Get field id from log_request_data message |
||||
* |
||||
* @return Log id (from LOG_ENTRY reply) |
||||
*/ |
||||
static inline uint16_t mavlink_msg_log_request_data_get_id(const mavlink_message_t* msg) |
||||
{ |
||||
return _MAV_RETURN_uint16_t(msg, 8); |
||||
} |
||||
|
||||
/**
|
||||
* @brief Get field ofs from log_request_data message |
||||
* |
||||
* @return Offset into the log |
||||
*/ |
||||
static inline uint32_t mavlink_msg_log_request_data_get_ofs(const mavlink_message_t* msg) |
||||
{ |
||||
return _MAV_RETURN_uint32_t(msg, 0); |
||||
} |
||||
|
||||
/**
|
||||
* @brief Get field count from log_request_data message |
||||
* |
||||
* @return Number of bytes |
||||
*/ |
||||
static inline uint32_t mavlink_msg_log_request_data_get_count(const mavlink_message_t* msg) |
||||
{ |
||||
return _MAV_RETURN_uint32_t(msg, 4); |
||||
} |
||||
|
||||
/**
|
||||
* @brief Decode a log_request_data message into a struct |
||||
* |
||||
* @param msg The message to decode |
||||
* @param log_request_data C-struct to decode the message contents into |
||||
*/ |
||||
static inline void mavlink_msg_log_request_data_decode(const mavlink_message_t* msg, mavlink_log_request_data_t* log_request_data) |
||||
{ |
||||
#if MAVLINK_NEED_BYTE_SWAP |
||||
log_request_data->ofs = mavlink_msg_log_request_data_get_ofs(msg); |
||||
log_request_data->count = mavlink_msg_log_request_data_get_count(msg); |
||||
log_request_data->id = mavlink_msg_log_request_data_get_id(msg); |
||||
log_request_data->target_system = mavlink_msg_log_request_data_get_target_system(msg); |
||||
log_request_data->target_component = mavlink_msg_log_request_data_get_target_component(msg); |
||||
#else |
||||
memcpy(log_request_data, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_LOG_REQUEST_DATA_LEN); |
||||
#endif |
||||
} |
@ -0,0 +1,199 @@
@@ -0,0 +1,199 @@
|
||||
// MESSAGE LOG_REQUEST_END PACKING
|
||||
|
||||
#define MAVLINK_MSG_ID_LOG_REQUEST_END 122 |
||||
|
||||
typedef struct __mavlink_log_request_end_t |
||||
{ |
||||
uint8_t target_system; ///< System ID
|
||||
uint8_t target_component; ///< Component ID
|
||||
} mavlink_log_request_end_t; |
||||
|
||||
#define MAVLINK_MSG_ID_LOG_REQUEST_END_LEN 2 |
||||
#define MAVLINK_MSG_ID_122_LEN 2 |
||||
|
||||
#define MAVLINK_MSG_ID_LOG_REQUEST_END_CRC 203 |
||||
#define MAVLINK_MSG_ID_122_CRC 203 |
||||
|
||||
|
||||
|
||||
#define MAVLINK_MESSAGE_INFO_LOG_REQUEST_END { \ |
||||
"LOG_REQUEST_END", \
|
||||
2, \
|
||||
{ { "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 0, offsetof(mavlink_log_request_end_t, target_system) }, \
|
||||
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 1, offsetof(mavlink_log_request_end_t, target_component) }, \
|
||||
} \
|
||||
} |
||||
|
||||
|
||||
/**
|
||||
* @brief Pack a log_request_end message |
||||
* @param system_id ID of this system |
||||
* @param component_id ID of this component (e.g. 200 for IMU) |
||||
* @param msg The MAVLink message to compress the data into |
||||
* |
||||
* @param target_system System ID |
||||
* @param target_component Component ID |
||||
* @return length of the message in bytes (excluding serial stream start sign) |
||||
*/ |
||||
static inline uint16_t mavlink_msg_log_request_end_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, |
||||
uint8_t target_system, uint8_t target_component) |
||||
{ |
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
char buf[MAVLINK_MSG_ID_LOG_REQUEST_END_LEN]; |
||||
_mav_put_uint8_t(buf, 0, target_system); |
||||
_mav_put_uint8_t(buf, 1, target_component); |
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_LOG_REQUEST_END_LEN); |
||||
#else |
||||
mavlink_log_request_end_t packet; |
||||
packet.target_system = target_system; |
||||
packet.target_component = target_component; |
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_LOG_REQUEST_END_LEN); |
||||
#endif |
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_LOG_REQUEST_END; |
||||
#if MAVLINK_CRC_EXTRA |
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_LOG_REQUEST_END_LEN, MAVLINK_MSG_ID_LOG_REQUEST_END_CRC); |
||||
#else |
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_LOG_REQUEST_END_LEN); |
||||
#endif |
||||
} |
||||
|
||||
/**
|
||||
* @brief Pack a log_request_end message on a channel |
||||
* @param system_id ID of this system |
||||
* @param component_id ID of this component (e.g. 200 for IMU) |
||||
* @param chan The MAVLink channel this message will be sent over |
||||
* @param msg The MAVLink message to compress the data into |
||||
* @param target_system System ID |
||||
* @param target_component Component ID |
||||
* @return length of the message in bytes (excluding serial stream start sign) |
||||
*/ |
||||
static inline uint16_t mavlink_msg_log_request_end_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, |
||||
mavlink_message_t* msg, |
||||
uint8_t target_system,uint8_t target_component) |
||||
{ |
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
char buf[MAVLINK_MSG_ID_LOG_REQUEST_END_LEN]; |
||||
_mav_put_uint8_t(buf, 0, target_system); |
||||
_mav_put_uint8_t(buf, 1, target_component); |
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_LOG_REQUEST_END_LEN); |
||||
#else |
||||
mavlink_log_request_end_t packet; |
||||
packet.target_system = target_system; |
||||
packet.target_component = target_component; |
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_LOG_REQUEST_END_LEN); |
||||
#endif |
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_LOG_REQUEST_END; |
||||
#if MAVLINK_CRC_EXTRA |
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_LOG_REQUEST_END_LEN, MAVLINK_MSG_ID_LOG_REQUEST_END_CRC); |
||||
#else |
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_LOG_REQUEST_END_LEN); |
||||
#endif |
||||
} |
||||
|
||||
/**
|
||||
* @brief Encode a log_request_end struct |
||||
* |
||||
* @param system_id ID of this system |
||||
* @param component_id ID of this component (e.g. 200 for IMU) |
||||
* @param msg The MAVLink message to compress the data into |
||||
* @param log_request_end C-struct to read the message contents from |
||||
*/ |
||||
static inline uint16_t mavlink_msg_log_request_end_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_log_request_end_t* log_request_end) |
||||
{ |
||||
return mavlink_msg_log_request_end_pack(system_id, component_id, msg, log_request_end->target_system, log_request_end->target_component); |
||||
} |
||||
|
||||
/**
|
||||
* @brief Encode a log_request_end struct on a channel |
||||
* |
||||
* @param system_id ID of this system |
||||
* @param component_id ID of this component (e.g. 200 for IMU) |
||||
* @param chan The MAVLink channel this message will be sent over |
||||
* @param msg The MAVLink message to compress the data into |
||||
* @param log_request_end C-struct to read the message contents from |
||||
*/ |
||||
static inline uint16_t mavlink_msg_log_request_end_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_log_request_end_t* log_request_end) |
||||
{ |
||||
return mavlink_msg_log_request_end_pack_chan(system_id, component_id, chan, msg, log_request_end->target_system, log_request_end->target_component); |
||||
} |
||||
|
||||
/**
|
||||
* @brief Send a log_request_end message |
||||
* @param chan MAVLink channel to send the message |
||||
* |
||||
* @param target_system System ID |
||||
* @param target_component Component ID |
||||
*/ |
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS |
||||
|
||||
static inline void mavlink_msg_log_request_end_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component) |
||||
{ |
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
char buf[MAVLINK_MSG_ID_LOG_REQUEST_END_LEN]; |
||||
_mav_put_uint8_t(buf, 0, target_system); |
||||
_mav_put_uint8_t(buf, 1, target_component); |
||||
|
||||
#if MAVLINK_CRC_EXTRA |
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOG_REQUEST_END, buf, MAVLINK_MSG_ID_LOG_REQUEST_END_LEN, MAVLINK_MSG_ID_LOG_REQUEST_END_CRC); |
||||
#else |
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOG_REQUEST_END, buf, MAVLINK_MSG_ID_LOG_REQUEST_END_LEN); |
||||
#endif |
||||
#else |
||||
mavlink_log_request_end_t packet; |
||||
packet.target_system = target_system; |
||||
packet.target_component = target_component; |
||||
|
||||
#if MAVLINK_CRC_EXTRA |
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOG_REQUEST_END, (const char *)&packet, MAVLINK_MSG_ID_LOG_REQUEST_END_LEN, MAVLINK_MSG_ID_LOG_REQUEST_END_CRC); |
||||
#else |
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOG_REQUEST_END, (const char *)&packet, MAVLINK_MSG_ID_LOG_REQUEST_END_LEN); |
||||
#endif |
||||
#endif |
||||
} |
||||
|
||||
#endif |
||||
|
||||
// MESSAGE LOG_REQUEST_END UNPACKING
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get field target_system from log_request_end message |
||||
* |
||||
* @return System ID |
||||
*/ |
||||
static inline uint8_t mavlink_msg_log_request_end_get_target_system(const mavlink_message_t* msg) |
||||
{ |
||||
return _MAV_RETURN_uint8_t(msg, 0); |
||||
} |
||||
|
||||
/**
|
||||
* @brief Get field target_component from log_request_end message |
||||
* |
||||
* @return Component ID |
||||
*/ |
||||
static inline uint8_t mavlink_msg_log_request_end_get_target_component(const mavlink_message_t* msg) |
||||
{ |
||||
return _MAV_RETURN_uint8_t(msg, 1); |
||||
} |
||||
|
||||
/**
|
||||
* @brief Decode a log_request_end message into a struct |
||||
* |
||||
* @param msg The message to decode |
||||
* @param log_request_end C-struct to decode the message contents into |
||||
*/ |
||||
static inline void mavlink_msg_log_request_end_decode(const mavlink_message_t* msg, mavlink_log_request_end_t* log_request_end) |
||||
{ |
||||
#if MAVLINK_NEED_BYTE_SWAP |
||||
log_request_end->target_system = mavlink_msg_log_request_end_get_target_system(msg); |
||||
log_request_end->target_component = mavlink_msg_log_request_end_get_target_component(msg); |
||||
#else |
||||
memcpy(log_request_end, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_LOG_REQUEST_END_LEN); |
||||
#endif |
||||
} |
@ -0,0 +1,243 @@
@@ -0,0 +1,243 @@
|
||||
// MESSAGE LOG_REQUEST_LIST PACKING
|
||||
|
||||
#define MAVLINK_MSG_ID_LOG_REQUEST_LIST 117 |
||||
|
||||
typedef struct __mavlink_log_request_list_t |
||||
{ |
||||
uint16_t start; ///< First log id (0 for first available)
|
||||
uint16_t end; ///< Last log id (0xffff for last available)
|
||||
uint8_t target_system; ///< System ID
|
||||
uint8_t target_component; ///< Component ID
|
||||
} mavlink_log_request_list_t; |
||||
|
||||
#define MAVLINK_MSG_ID_LOG_REQUEST_LIST_LEN 6 |
||||
#define MAVLINK_MSG_ID_117_LEN 6 |
||||
|
||||
#define MAVLINK_MSG_ID_LOG_REQUEST_LIST_CRC 128 |
||||
#define MAVLINK_MSG_ID_117_CRC 128 |
||||
|
||||
|
||||
|
||||
#define MAVLINK_MESSAGE_INFO_LOG_REQUEST_LIST { \ |
||||
"LOG_REQUEST_LIST", \
|
||||
4, \
|
||||
{ { "start", NULL, MAVLINK_TYPE_UINT16_T, 0, 0, offsetof(mavlink_log_request_list_t, start) }, \
|
||||
{ "end", NULL, MAVLINK_TYPE_UINT16_T, 0, 2, offsetof(mavlink_log_request_list_t, end) }, \
|
||||
{ "target_system", NULL, MAVLINK_TYPE_UINT8_T, 0, 4, offsetof(mavlink_log_request_list_t, target_system) }, \
|
||||
{ "target_component", NULL, MAVLINK_TYPE_UINT8_T, 0, 5, offsetof(mavlink_log_request_list_t, target_component) }, \
|
||||
} \
|
||||
} |
||||
|
||||
|
||||
/**
|
||||
* @brief Pack a log_request_list message |
||||
* @param system_id ID of this system |
||||
* @param component_id ID of this component (e.g. 200 for IMU) |
||||
* @param msg The MAVLink message to compress the data into |
||||
* |
||||
* @param target_system System ID |
||||
* @param target_component Component ID |
||||
* @param start First log id (0 for first available) |
||||
* @param end Last log id (0xffff for last available) |
||||
* @return length of the message in bytes (excluding serial stream start sign) |
||||
*/ |
||||
static inline uint16_t mavlink_msg_log_request_list_pack(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, |
||||
uint8_t target_system, uint8_t target_component, uint16_t start, uint16_t end) |
||||
{ |
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
char buf[MAVLINK_MSG_ID_LOG_REQUEST_LIST_LEN]; |
||||
_mav_put_uint16_t(buf, 0, start); |
||||
_mav_put_uint16_t(buf, 2, end); |
||||
_mav_put_uint8_t(buf, 4, target_system); |
||||
_mav_put_uint8_t(buf, 5, target_component); |
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_LOG_REQUEST_LIST_LEN); |
||||
#else |
||||
mavlink_log_request_list_t packet; |
||||
packet.start = start; |
||||
packet.end = end; |
||||
packet.target_system = target_system; |
||||
packet.target_component = target_component; |
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_LOG_REQUEST_LIST_LEN); |
||||
#endif |
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_LOG_REQUEST_LIST; |
||||
#if MAVLINK_CRC_EXTRA |
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_LOG_REQUEST_LIST_LEN, MAVLINK_MSG_ID_LOG_REQUEST_LIST_CRC); |
||||
#else |
||||
return mavlink_finalize_message(msg, system_id, component_id, MAVLINK_MSG_ID_LOG_REQUEST_LIST_LEN); |
||||
#endif |
||||
} |
||||
|
||||
/**
|
||||
* @brief Pack a log_request_list message on a channel |
||||
* @param system_id ID of this system |
||||
* @param component_id ID of this component (e.g. 200 for IMU) |
||||
* @param chan The MAVLink channel this message will be sent over |
||||
* @param msg The MAVLink message to compress the data into |
||||
* @param target_system System ID |
||||
* @param target_component Component ID |
||||
* @param start First log id (0 for first available) |
||||
* @param end Last log id (0xffff for last available) |
||||
* @return length of the message in bytes (excluding serial stream start sign) |
||||
*/ |
||||
static inline uint16_t mavlink_msg_log_request_list_pack_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, |
||||
mavlink_message_t* msg, |
||||
uint8_t target_system,uint8_t target_component,uint16_t start,uint16_t end) |
||||
{ |
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
char buf[MAVLINK_MSG_ID_LOG_REQUEST_LIST_LEN]; |
||||
_mav_put_uint16_t(buf, 0, start); |
||||
_mav_put_uint16_t(buf, 2, end); |
||||
_mav_put_uint8_t(buf, 4, target_system); |
||||
_mav_put_uint8_t(buf, 5, target_component); |
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), buf, MAVLINK_MSG_ID_LOG_REQUEST_LIST_LEN); |
||||
#else |
||||
mavlink_log_request_list_t packet; |
||||
packet.start = start; |
||||
packet.end = end; |
||||
packet.target_system = target_system; |
||||
packet.target_component = target_component; |
||||
|
||||
memcpy(_MAV_PAYLOAD_NON_CONST(msg), &packet, MAVLINK_MSG_ID_LOG_REQUEST_LIST_LEN); |
||||
#endif |
||||
|
||||
msg->msgid = MAVLINK_MSG_ID_LOG_REQUEST_LIST; |
||||
#if MAVLINK_CRC_EXTRA |
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_LOG_REQUEST_LIST_LEN, MAVLINK_MSG_ID_LOG_REQUEST_LIST_CRC); |
||||
#else |
||||
return mavlink_finalize_message_chan(msg, system_id, component_id, chan, MAVLINK_MSG_ID_LOG_REQUEST_LIST_LEN); |
||||
#endif |
||||
} |
||||
|
||||
/**
|
||||
* @brief Encode a log_request_list struct |
||||
* |
||||
* @param system_id ID of this system |
||||
* @param component_id ID of this component (e.g. 200 for IMU) |
||||
* @param msg The MAVLink message to compress the data into |
||||
* @param log_request_list C-struct to read the message contents from |
||||
*/ |
||||
static inline uint16_t mavlink_msg_log_request_list_encode(uint8_t system_id, uint8_t component_id, mavlink_message_t* msg, const mavlink_log_request_list_t* log_request_list) |
||||
{ |
||||
return mavlink_msg_log_request_list_pack(system_id, component_id, msg, log_request_list->target_system, log_request_list->target_component, log_request_list->start, log_request_list->end); |
||||
} |
||||
|
||||
/**
|
||||
* @brief Encode a log_request_list struct on a channel |
||||
* |
||||
* @param system_id ID of this system |
||||
* @param component_id ID of this component (e.g. 200 for IMU) |
||||
* @param chan The MAVLink channel this message will be sent over |
||||
* @param msg The MAVLink message to compress the data into |
||||
* @param log_request_list C-struct to read the message contents from |
||||
*/ |
||||
static inline uint16_t mavlink_msg_log_request_list_encode_chan(uint8_t system_id, uint8_t component_id, uint8_t chan, mavlink_message_t* msg, const mavlink_log_request_list_t* log_request_list) |
||||
{ |
||||
return mavlink_msg_log_request_list_pack_chan(system_id, component_id, chan, msg, log_request_list->target_system, log_request_list->target_component, log_request_list->start, log_request_list->end); |
||||
} |
||||
|
||||
/**
|
||||
* @brief Send a log_request_list message |
||||
* @param chan MAVLink channel to send the message |
||||
* |
||||
* @param target_system System ID |
||||
* @param target_component Component ID |
||||
* @param start First log id (0 for first available) |
||||
* @param end Last log id (0xffff for last available) |
||||
*/ |
||||
#ifdef MAVLINK_USE_CONVENIENCE_FUNCTIONS |
||||
|
||||
static inline void mavlink_msg_log_request_list_send(mavlink_channel_t chan, uint8_t target_system, uint8_t target_component, uint16_t start, uint16_t end) |
||||
{ |
||||
#if MAVLINK_NEED_BYTE_SWAP || !MAVLINK_ALIGNED_FIELDS |
||||
char buf[MAVLINK_MSG_ID_LOG_REQUEST_LIST_LEN]; |
||||
_mav_put_uint16_t(buf, 0, start); |
||||
_mav_put_uint16_t(buf, 2, end); |
||||
_mav_put_uint8_t(buf, 4, target_system); |
||||
_mav_put_uint8_t(buf, 5, target_component); |
||||
|
||||
#if MAVLINK_CRC_EXTRA |
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOG_REQUEST_LIST, buf, MAVLINK_MSG_ID_LOG_REQUEST_LIST_LEN, MAVLINK_MSG_ID_LOG_REQUEST_LIST_CRC); |
||||
#else |
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOG_REQUEST_LIST, buf, MAVLINK_MSG_ID_LOG_REQUEST_LIST_LEN); |
||||
#endif |
||||
#else |
||||
mavlink_log_request_list_t packet; |
||||
packet.start = start; |
||||
packet.end = end; |
||||
packet.target_system = target_system; |
||||
packet.target_component = target_component; |
||||
|
||||
#if MAVLINK_CRC_EXTRA |
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOG_REQUEST_LIST, (const char *)&packet, MAVLINK_MSG_ID_LOG_REQUEST_LIST_LEN, MAVLINK_MSG_ID_LOG_REQUEST_LIST_CRC); |
||||
#else |
||||
_mav_finalize_message_chan_send(chan, MAVLINK_MSG_ID_LOG_REQUEST_LIST, (const char *)&packet, MAVLINK_MSG_ID_LOG_REQUEST_LIST_LEN); |
||||
#endif |
||||
#endif |
||||
} |
||||
|
||||
#endif |
||||
|
||||
// MESSAGE LOG_REQUEST_LIST UNPACKING
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get field target_system from log_request_list message |
||||
* |
||||
* @return System ID |
||||
*/ |
||||
static inline uint8_t mavlink_msg_log_request_list_get_target_system(const mavlink_message_t* msg) |
||||
{ |
||||
return _MAV_RETURN_uint8_t(msg, 4); |
||||
} |
||||
|
||||
/**
|
||||
* @brief Get field target_component from log_request_list message |
||||
* |
||||
* @return Component ID |
||||
*/ |
||||
static inline uint8_t mavlink_msg_log_request_list_get_target_component(const mavlink_message_t* msg) |
||||
{ |
||||
return _MAV_RETURN_uint8_t(msg, 5); |
||||
} |
||||
|
||||
/**
|
||||
* @brief Get field start from log_request_list message |
||||
* |
||||
* @return First log id (0 for first available) |
||||
*/ |
||||
static inline uint16_t mavlink_msg_log_request_list_get_start(const mavlink_message_t* msg) |
||||
{ |
||||
return _MAV_RETURN_uint16_t(msg, 0); |
||||
} |
||||
|
||||
/**
|
||||
* @brief Get field end from log_request_list message |
||||
* |
||||
* @return Last log id (0xffff for last available) |
||||
*/ |
||||
static inline uint16_t mavlink_msg_log_request_list_get_end(const mavlink_message_t* msg) |
||||
{ |
||||
return _MAV_RETURN_uint16_t(msg, 2); |
||||
} |
||||
|
||||
/**
|
||||
* @brief Decode a log_request_list message into a struct |
||||
* |
||||
* @param msg The message to decode |
||||
* @param log_request_list C-struct to decode the message contents into |
||||
*/ |
||||
static inline void mavlink_msg_log_request_list_decode(const mavlink_message_t* msg, mavlink_log_request_list_t* log_request_list) |
||||
{ |
||||
#if MAVLINK_NEED_BYTE_SWAP |
||||
log_request_list->start = mavlink_msg_log_request_list_get_start(msg); |
||||
log_request_list->end = mavlink_msg_log_request_list_get_end(msg); |
||||
log_request_list->target_system = mavlink_msg_log_request_list_get_target_system(msg); |
||||
log_request_list->target_component = mavlink_msg_log_request_list_get_target_component(msg); |
||||
#else |
||||
memcpy(log_request_list, _MAV_PAYLOAD(msg), MAVLINK_MSG_ID_LOG_REQUEST_LIST_LEN); |
||||
#endif |
||||
} |
Loading…
Reference in new issue