#include <assert.h>
#include <errno.h>
#include <fcntl.h>
#include <math.h>
#include <stdio.h>
#include <string.h>
#include <sys/stat.h>
#include <termios.h>
#include <unistd.h>
#include <netinet/in.h>
#include <stdlib.h>
#include <sys/time.h>
#include "microstrain_3dmgx2_imu/3dmgx2.h"
#include "poll.h"
Go to the source code of this file.
Define Documentation
Value:{ \
char buf[1000]; \
snprintf(buf, 1000, msg" (in microstrain_3dmgx2_imu::IMU:%s)", ##__VA_ARGS__, __FUNCTION__); \
throw except(buf); \
}
Macro for throwing an exception with a message.
Definition at line 43 of file 3dmgx2.cc.
Function Documentation
static unsigned short bswap_16 |
( |
unsigned short |
x | ) |
[inline, static] |
Code to swap bytes since IMU is big endian.
Definition at line 57 of file 3dmgx2.cc.
static unsigned int bswap_32 |
( |
unsigned int |
x | ) |
[inline, static] |
Code to swap bytes since IMU is big endian.
Definition at line 62 of file 3dmgx2.cc.
Code to extract a floating point number from the IMU.
Definition at line 68 of file 3dmgx2.cc.
static int read_with_timeout |
( |
int |
fd, |
|
|
void * |
buff, |
|
|
size_t |
count, |
|
|
int |
timeout |
|
) |
| [static] |
Helper function to get system time in nanoseconds.
Definition at line 82 of file 3dmgx2.cc.