Classes | Namespaces | Macros | Functions | Variables
imu.hpp File Reference
#include <stdexcept>
#include <memory>
#include <string>
#include <deque>
#include <queue>
#include <vector>
#include <bitset>
#include <map>
#include <boost/bind.hpp>
Include dependency graph for imu.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  imu_3dm_gx4::Imu::command_error
 command_error Generated when device replies with NACK. More...
 
struct  imu_3dm_gx4::Imu::DiagnosticFields
 DiagnosticFields struct (See 3DM documentation for these fields) More...
 
struct  imu_3dm_gx4::Imu::FilterData
 FilterData Estimator readings produced by the sensor. More...
 
class  imu_3dm_gx4::Imu
 Imu Interface to the Microstrain 3DM-GX4-25 IMU. More...
 
struct  imu_3dm_gx4::Imu::IMUData
 IMUData IMU readings produced by the sensor. More...
 
struct  imu_3dm_gx4::Imu::Info
 Info Structure generated by the getDeviceInfo command. More...
 
struct  imu_3dm_gx4::Imu::io_error
 io_error Generated when a low-level IO command fails. More...
 
struct  imu_3dm_gx4::Imu::Packet
 
struct  imu_3dm_gx4::Imu::timeout_error
 timeout_error Generated when read or write times out, usually indicates device hang up. More...
 

Namespaces

 imu_3dm_gx4
 

Macros

#define HOST_LITTLE_ENDIAN
 

Functions

int ackErrorCodeFor (const Packet &command) const
 Extract the ACK code from this packet. More...
 
void calcChecksum ()
 Calculate the packet checksum. Sets the checksum variable. More...
 
bool isFilterData () const
 True if this packet corresponds to a filter data message. More...
 
bool isIMUData () const
 True if this packet corresponds to an imu data message. More...
 
 Packet (uint8_t desc=0)
 Constructor. More...
 
std::map< std::string, unsigned int > toMap () const
 Convert to map of human readable strings and integers. More...
 
std::string toString () const
 Make a 'human-readable' version of the packet. More...
 

Variables

union {
   struct {
      uint8_t   syncLSB
 
      uint8_t   syncMSB
 
   } 
 
   uint16_t   sync
 
}; 
 
union {
   struct {
      uint8_t   checkLSB
 
      uint8_t   checkMSB
 
   } 
 
   uint16_t   checksum
 
}; 
 
uint32_t comBytesRead
 
uint32_t comBytesWritten
 
uint32_t comNumReadOverruns
 
uint32_t comNumWriteOverruns
 
uint8_t descriptor
 
uint32_t filterPacketsDropped
 
uint8_t filterStreamEnabled
 
uint32_t imuPacketsDropped
 
uint8_t imuStreamEnabled
 
static constexpr uint8_t kHeaderLength = 4
 
static constexpr uint8_t kSyncLSB = 0x65
 
static constexpr uint8_t kSyncMSB = 0x75
 
uint32_t last1PPSPulse
 
uint32_t lastIMUMessage
 
uint8_t length
 
uint16_t modelNumber
 
uint32_t num1PPSPulses
 
uint32_t numIMUParseErrors
 
uint8_t payload [255]
 
uint8_t selector
 
uint32_t statusFlags
 
uint32_t systemTimer
 
uint32_t totalIMUMessages
 
uint32_t usbBytesRead
 
uint32_t usbBytesWritten
 
uint32_t usbNumReadOverruns
 
uint32_t usbNumWriteOverruns
 

Macro Definition Documentation

#define HOST_LITTLE_ENDIAN

Definition at line 26 of file imu.hpp.

Function Documentation

int __attribute__::ackErrorCodeFor ( const Packet command) const

Extract the ACK code from this packet.

Parameters
commmandCommand packet to which this ACK should correspond.
Returns
-1 if the packets do not correspond or this is not an ACK. The error code is returned otherwise.
void __attribute__::calcChecksum ( )

Calculate the packet checksum. Sets the checksum variable.

bool __attribute__::isFilterData ( ) const

True if this packet corresponds to a filter data message.

bool __attribute__::isIMUData ( ) const

True if this packet corresponds to an imu data message.

__attribute__::Packet ( uint8_t  desc = 0)

Constructor.

Parameters
descMajor descriptor of this command.
lenLength of the packet payload.
std::map<std::string, unsigned int> __attribute__::toMap ( ) const

Convert to map of human readable strings and integers.

std::string __attribute__::toString ( ) const

Make a 'human-readable' version of the packet.

Returns
std::string

Variable Documentation

union { ... }
union { ... }
uint8_t checkLSB

Definition at line 22 of file imu.hpp.

uint8_t checkMSB

Definition at line 21 of file imu.hpp.

uint16_t checksum

Packet checksum

Definition at line 24 of file imu.hpp.

uint32_t comBytesRead

Definition at line 13 of file imu.hpp.

uint32_t comBytesWritten

Definition at line 12 of file imu.hpp.

uint32_t comNumReadOverruns

Definition at line 15 of file imu.hpp.

uint32_t comNumWriteOverruns

Definition at line 14 of file imu.hpp.

uint8_t descriptor

Type of packet

Definition at line 14 of file imu.hpp.

uint32_t filterPacketsDropped

Definition at line 11 of file imu.hpp.

uint8_t filterStreamEnabled

Definition at line 9 of file imu.hpp.

uint32_t imuPacketsDropped

Definition at line 10 of file imu.hpp.

uint8_t imuStreamEnabled

Definition at line 8 of file imu.hpp.

constexpr uint8_t kHeaderLength = 4
static

Definition at line 2 of file imu.hpp.

constexpr uint8_t kSyncLSB = 0x65
static

Definition at line 4 of file imu.hpp.

constexpr uint8_t kSyncMSB = 0x75
static

Definition at line 3 of file imu.hpp.

uint32_t last1PPSPulse

Definition at line 7 of file imu.hpp.

uint32_t lastIMUMessage

Definition at line 22 of file imu.hpp.

uint8_t length

Length of the packet in bytes

Definition at line 15 of file imu.hpp.

uint16_t modelNumber

Definition at line 2 of file imu.hpp.

uint32_t num1PPSPulses

Definition at line 6 of file imu.hpp.

uint32_t numIMUParseErrors

Definition at line 20 of file imu.hpp.

uint8_t payload[255]

Payload of packet

Definition at line 17 of file imu.hpp.

uint8_t selector

Definition at line 3 of file imu.hpp.

uint32_t statusFlags

Definition at line 4 of file imu.hpp.

uint16_t sync

Identifer of packet

Definition at line 11 of file imu.hpp.

uint8_t syncLSB

Definition at line 9 of file imu.hpp.

uint8_t syncMSB

Definition at line 8 of file imu.hpp.

uint32_t systemTimer

Definition at line 5 of file imu.hpp.

uint32_t totalIMUMessages

Definition at line 21 of file imu.hpp.

uint32_t usbBytesRead

Definition at line 17 of file imu.hpp.

uint32_t usbBytesWritten

Definition at line 16 of file imu.hpp.

uint32_t usbNumReadOverruns

Definition at line 19 of file imu.hpp.

uint32_t usbNumWriteOverruns

Definition at line 18 of file imu.hpp.



thormang3_imu_3dm_gx4
Author(s): Gareth Cross, SCH
autogenerated on Mon Jun 10 2019 15:26:53