Defines | Functions
3dmgx2.cc File Reference
#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"
Include dependency graph for 3dmgx2.cc:

Go to the source code of this file.

Defines

#define CMD_ACCEL_ANGRATE_MAG_ORIENT_REP_LEN   79
#define CMD_RAW_ACCEL_ANGRATE_LEN   31
#define IMU_EXCEPT(except, msg,...)
 Macro for throwing an exception with a message.

Functions

static unsigned short bswap_16 (unsigned short x)
 Code to swap bytes since IMU is big endian.
static unsigned int bswap_32 (unsigned int x)
 Code to swap bytes since IMU is big endian.
static float extract_float (uint8_t *addr)
 Code to extract a floating point number from the IMU.
static int read_with_timeout (int fd, void *buff, size_t count, int timeout)
static unsigned long long time_helper ()
 Helper function to get system time in nanoseconds.

Define Documentation

Definition at line 500 of file 3dmgx2.cc.

#define CMD_RAW_ACCEL_ANGRATE_LEN   31

Definition at line 501 of file 3dmgx2.cc.

#define IMU_EXCEPT (   except,
  msg,
  ... 
)
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.

static float extract_float ( uint8_t *  addr) [static]

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]

Definition at line 641 of file 3dmgx2.cc.

static unsigned long long time_helper ( ) [static]

Helper function to get system time in nanoseconds.

Definition at line 82 of file 3dmgx2.cc.



microstrain_3dmgx2_imu
Author(s): Jeremy Leibs, Blaise Gassend
autogenerated on Thu Apr 24 2014 15:26:55