#include "thormang3_imu_3dm_gx4/imu.hpp"
#include <chrono>
#include <locale>
#include <tuple>
#include <algorithm>
#include <iostream>
#include <string>
#include <sstream>
#include <stdexcept>
#include <boost/assert.hpp>
#include <fcntl.h>
#include <getopt.h>
#include <poll.h>
#include <time.h>
#include <errno.h>
#include <termios.h>
#include <sys/ioctl.h>
#include <assert.h>
#include <unistd.h>
#include <string.h>
Go to the source code of this file.
|
| template<typename T > |
| void | decode (const uint8_t *buffer, size_t count, T *output) |
| |
| template<typename T > |
| size_t | encode (uint8_t *buffer, const T &t) |
| |
| template<typename T , typename... Ts> |
| size_t | encode (uint8_t *buffer, const T &t, const Ts &...ts) |
| |
| static std::string | ltrim (std::string s) |
| |
| template<size_t sz> |
| void | to_device_order (uint8_t buffer[sz]) |
| |
| template<> |
| void | to_device_order< 1 > (uint8_t buffer[1]) |
| |
Value:byte1 += (x); \
byte2 += byte1;
| #define COMAMND_FILTER_MESSAGE_FORMAT u8(0x0A) |
| #define COMMAND_CLASS_3DM u8(0x0C) |
| #define COMMAND_CLASS_BASE u8(0x01) |
| #define COMMAND_CLASS_FILTER u8(0x0D) |
| #define COMMAND_DEVICE_STATUS u8(0x64) |
| #define COMMAND_ENABLE_DATA_STREAM u8(0x11) |
| #define COMMAND_ENABLE_MEASUREMENTS u8(0x41) |
| #define COMMAND_FILTER_CONTROL_FLAGS u8(0x14) |
| #define COMMAND_GET_DEVICE_INFO u8(0x03) |
| #define COMMAND_GET_FILTER_BASE_RATE u8(0x0B) |
| #define COMMAND_GET_IMU_BASE_RATE u8(0x06) |
| #define COMMAND_IMU_MESSAGE_FORMAT u8(0x08) |
| #define COMMAND_SET_HARD_IRON u8(0x3A) |
| #define COMMAND_SET_SOFT_IRON u8(0x3B) |
| #define COMMAND_UART_BAUD_RATE u8(0x40) |
| #define DATA_CLASS_FILTER u8(0x82) |
| #define DATA_CLASS_IMU u8(0x80) |
| #define DEVICE_IDLE u8(0x02) |
| #define DEVICE_PING u8(0x01) |
| #define DEVICE_RESUME u8(0x06) |
| #define FIELD_ACCELEROMETER u8(0x04) |
| #define FIELD_ACK_OR_NACK u8(0xF1) |
| #define FIELD_ANGLE_UNCERTAINTY u8(0x0A) |
| #define FIELD_BAROMETER u8(0x17) |
| #define FIELD_BIAS_UNCERTAINTY u8(0x0B) |
| #define FIELD_DEVICE_INFO u8(0x81) |
| #define FIELD_FILTER_BASERATE u8(0x8A) |
| #define FIELD_GYRO_BIAS u8(0x06) |
| #define FIELD_GYROSCOPE u8(0x05) |
| #define FIELD_IMU_BASERATE u8(0x83) |
| #define FIELD_MAGNETOMETER u8(0x06) |
| #define FIELD_QUATERNION u8(0x03) |
| #define FIELD_STATUS_REPORT u8(0x90) |
| #define FUNCTION_APPLY u8(0x01) |
| #define kDefaultTimeout (300) |
| #define SELECTOR_FILTER u8(0x03) |
| #define SELECTOR_IMU u8(0x01) |
| #define u8 |
( |
|
x | ) |
static_cast<uint8_t>((x)) |
template<typename T >
| void decode |
( |
const uint8_t * |
buffer, |
|
|
size_t |
count, |
|
|
T * |
output |
|
) |
| |
template<typename T >
| size_t encode |
( |
uint8_t * |
buffer, |
|
|
const T & |
t |
|
) |
| |
template<typename T , typename... Ts>
| size_t encode |
( |
uint8_t * |
buffer, |
|
|
const T & |
t, |
|
|
const Ts &... |
ts |
|
) |
| |
| static std::string ltrim |
( |
std::string |
s | ) |
|
|
inlinestatic |
template<size_t sz>
| void to_device_order |
( |
uint8_t |
buffer[sz] | ) |
|