imu_stim300
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
imu_stim300::Stim300Base Class Referenceabstract

#include <Stim300Base.hpp>

Inheritance diagram for imu_stim300::Stim300Base:
imu_stim300::Stim300RevB imu_stim300::Stim300RevD

Classes

struct  sensor_value
 
struct  sensor_values
 
struct  temp_value
 

Public Member Functions

 Stim300Base (int max_packet_size)
 
 ~Stim300Base ()
 
void welcome ()
 
bool open (std::string const &filename)
 
bool setBaudrate (int brate)
 
bool fullReset ()
 
bool enterServiceMode ()
 Enter in Service mode (not transferring data, configuration only) More...
 
virtual int extractPacket (uint8_t const *buffer, size_t buffer_size) const =0
 
virtual int processPacket ()=0
 read the package and puts the data into the corresponding structures. * More...
 
bool setAcctoIncrementalVelocity ()
 Set Accelerometers output to Incremental velocity Internally enters in SERVICEMODE and It always returns to a NORMAL mode after changing the Accelerometers output. More...
 
void setPackageTimeout (double timeoutSeconds)
 Ste the package Timeout. More...
 
void setFrequency (int sampling_frequency)
 Ste the driver sampling frequency. More...
 
bool getStatus ()
 Return the STIM300 internal status Return the negation value of the internal_error variable. More...
 
int getFileDescriptor ()
 It gets the file descriptor (fd) More...
 
imu_stim300::ACC_OUTPUT getAccOutputType ()
 Get Accelerometer Output Mode. More...
 
int getPacketCounter ()
 Return the Incremental counter Return the value of the value of the counter in inertial_values. More...
 
Eigen::Vector3d getAccData ()
 Return the Accelerometers values. More...
 
Eigen::Vector3d getGyroData ()
 Return the Gyroscopes values. More...
 
Eigen::Vector3d getInclData ()
 Return the Inclinometers values. More...
 
std::vector< double > getTempData ()
 Return the Temperature values from Gyros. More...
 
uint64_t getPacketLatency ()
 Return the datagram latency in microseconds (us) Return the latency calculated by the device. Latency is the time between the moment at which the sample has been digitized + low pass-filtered and the transmitted time. More...
 
bool getChecksumStatus ()
 Return Checksum verification from the last computation. More...
 
virtual void printInfo ()=0
 Get sensors information. More...
 

Protected Member Functions

struct imu_stim300::Stim300Base::sensor_value __attribute__ ((__packed__))
 
struct imu_stim300::Stim300Base::temp_value __attribute__ ((__packed__))
 
double convertGyro2AngularRate (uint8_t const *buffer)
 
virtual double convertAcc2Acceleration (uint8_t const *buffer)=0
 
double convertIncl2Acceleration (uint8_t const *buffer)
 
double convertAcc2IncreVel (uint8_t const *buffer)
 
double convertTemp2Celsius (uint8_t const *buffer)
 
double convertLatency2Microseconds (uint8_t const *buffer)
 

Protected Attributes

typedef __attribute__
 
int baudrate
 
int sampling_frequency
 
int counter_ratio
 
base::Time pckgTimeout
 
uint8_t prev_counter
 
sensor_values inertial_values
 
STIM300_MODES modes
 
bool internal_error
 
imu_stim300::DATAGRAM_CONTENT content
 
ACC_OUTPUT acc_output
 
boost::uint32_t expectedCRC
 
boost::uint32_t calculatedCRC
 

Constructor & Destructor Documentation

◆ Stim300Base()

Stim300Base::Stim300Base ( int  max_packet_size)

Constructors

◆ ~Stim300Base()

Stim300Base::~Stim300Base ( )

Member Function Documentation

◆ __attribute__() [1/2]

struct imu_stim300::Stim300Base::sensor_value imu_stim300::Stim300Base::__attribute__ ( (__packed__)  )
protected

◆ __attribute__() [2/2]

struct imu_stim300::Stim300Base::temp_value imu_stim300::Stim300Base::__attribute__ ( (__packed__)  )
protected

◆ convertAcc2Acceleration()

virtual double imu_stim300::Stim300Base::convertAcc2Acceleration ( uint8_t const *  buffer)
protectedpure virtual

◆ convertAcc2IncreVel()

double Stim300Base::convertAcc2IncreVel ( uint8_t const *  buffer)
protected

◆ convertGyro2AngularRate()

double Stim300Base::convertGyro2AngularRate ( uint8_t const *  buffer)
protected

◆ convertIncl2Acceleration()

double Stim300Base::convertIncl2Acceleration ( uint8_t const *  buffer)
protected

◆ convertLatency2Microseconds()

double Stim300Base::convertLatency2Microseconds ( uint8_t const *  buffer)
protected

◆ convertTemp2Celsius()

double Stim300Base::convertTemp2Celsius ( uint8_t const *  buffer)
protected

◆ enterServiceMode()

bool Stim300Base::enterServiceMode ( )

Enter in Service mode (not transferring data, configuration only)

◆ extractPacket()

virtual int imu_stim300::Stim300Base::extractPacket ( uint8_t const *  buffer,
size_t  buffer_size 
) const
pure virtual

Find a packet into the currently accumulated data.

Implemented in imu_stim300::Stim300RevD, and imu_stim300::Stim300RevB.

◆ fullReset()

bool Stim300Base::fullReset ( )

Performs a full reset of the device. Sending a RESET command

◆ getAccData()

Eigen::Vector3d Stim300Base::getAccData ( )

Return the Accelerometers values.

◆ getAccOutputType()

ACC_OUTPUT Stim300Base::getAccOutputType ( )

Get Accelerometer Output Mode.

◆ getChecksumStatus()

bool Stim300Base::getChecksumStatus ( )

Return Checksum verification from the last computation.

◆ getFileDescriptor()

int Stim300Base::getFileDescriptor ( )

It gets the file descriptor (fd)

Returns
int fd

◆ getGyroData()

Eigen::Vector3d Stim300Base::getGyroData ( )

Return the Gyroscopes values.

◆ getInclData()

Eigen::Vector3d Stim300Base::getInclData ( )

Return the Inclinometers values.

◆ getPacketCounter()

int Stim300Base::getPacketCounter ( )

Return the Incremental counter Return the value of the value of the counter in inertial_values.

◆ getPacketLatency()

uint64_t Stim300Base::getPacketLatency ( )

Return the datagram latency in microseconds (us) Return the latency calculated by the device. Latency is the time between the moment at which the sample has been digitized + low pass-filtered and the transmitted time.

◆ getStatus()

bool Stim300Base::getStatus ( )

Return the STIM300 internal status Return the negation value of the internal_error variable.

◆ getTempData()

std::vector< double > Stim300Base::getTempData ( )

Return the Temperature values from Gyros.

◆ open()

bool Stim300Base::open ( std::string const &  filename)

Open the device, reset it and read device information. the baud rate is 921600

◆ printInfo()

virtual void imu_stim300::Stim300Base::printInfo ( )
pure virtual

Get sensors information.

Implemented in imu_stim300::Stim300RevD, and imu_stim300::Stim300RevB.

◆ processPacket()

virtual int imu_stim300::Stim300Base::processPacket ( )
pure virtual

read the package and puts the data into the corresponding structures. *

Implemented in imu_stim300::Stim300RevD, and imu_stim300::Stim300RevB.

◆ setAcctoIncrementalVelocity()

bool Stim300Base::setAcctoIncrementalVelocity ( )

Set Accelerometers output to Incremental velocity Internally enters in SERVICEMODE and It always returns to a NORMAL mode after changing the Accelerometers output.

◆ setBaudrate()

bool Stim300Base::setBaudrate ( int  brate)

Sets the device baudrate (only possible for serial devices). +brate+ is the baud rate in bps, can be one of 19200, 57600 and 115200

If the device is not open yet, this baud rate will be set on startup (i.e. in open())

◆ setFrequency()

void Stim300Base::setFrequency ( int  sampling_frequency)

Ste the driver sampling frequency.

Expected frequency (normally connected to timeout)

◆ setPackageTimeout()

void Stim300Base::setPackageTimeout ( double  timeoutSeconds)

Ste the package Timeout.

Expected time to have a whole package

◆ welcome()

void Stim300Base::welcome ( )

Print a welcome to stdout

Returns
nothing

Member Data Documentation

◆ __attribute__

typedef imu_stim300::Stim300Base::__attribute__
protected

◆ acc_output

ACC_OUTPUT imu_stim300::Stim300Base::acc_output
protected

Content of the datagram (package) configuration NOTE: So far only RATE_ACC_INCLI_TEMP is implemented

◆ baudrate

int imu_stim300::Stim300Base::baudrate
protected

◆ calculatedCRC

boost::uint32_t imu_stim300::Stim300Base::calculatedCRC
protected

◆ content

imu_stim300::DATAGRAM_CONTENT imu_stim300::Stim300Base::content
protected

If Acc, Gyros or Incl report error it would be true (false by default)

◆ counter_ratio

int imu_stim300::Stim300Base::counter_ratio
protected

Sampling Frequency

◆ expectedCRC

boost::uint32_t imu_stim300::Stim300Base::expectedCRC
protected

Type of values returned by the STIM300. By defaults it is Acceleration in m/s^2

◆ inertial_values

sensor_values imu_stim300::Stim300Base::inertial_values
protected

Counter is incremented by 9 units; Here the previous to the current packge is saved

◆ internal_error

bool imu_stim300::Stim300Base::internal_error
protected

The three states of the automata of the STIM300

◆ modes

STIM300_MODES imu_stim300::Stim300Base::modes
protected

Struct with the processes STIM300 values

◆ pckgTimeout

base::Time imu_stim300::Stim300Base::pckgTimeout
protected

Packet counter ratio

◆ prev_counter

uint8_t imu_stim300::Stim300Base::prev_counter
protected

Estimate time to have a whole package

◆ sampling_frequency

int imu_stim300::Stim300Base::sampling_frequency
protected

Package baud rate


The documentation for this class was generated from the following files: