Public Attributes | List of all members
crl::multisense::imu::Config Class Reference

#include <MultiSenseTypes.hh>

Public Attributes

bool enabled
 
std::string name
 
uint32_t rangeTableIndex
 
uint32_t rateTableIndex
 

Detailed Description

Class used to store a specific IMU configuration.

Example code to query a IMU configuration:

//
// Instantiate a channel connecting to a sensor at the factory default
// IP address
channel = crl::multisense::Channel::Create("10.66.171.21");
channel->setMtu(7200);
//
// Create local variables to store the information returned by
// reference from getImuConfig().
std::vector<crl::multisense::imu::Config> imuConfigVect;
uint32_t samplesPerMessage;
//
// Query the IMU configuration from the Channel instance
crl::multisense::Status status = channel->getImuConfig(samplesPerMessage, imuConfigVect);
//
// Check to see if the IMU configuration query was successful
throw std::runtime_error("Unable to query the imu configuration");
}
//
// Use the IMU configuration...
//
// Destroy the channel instance

Example code to set a IMU configuration:

//
// Instantiate a channel connecting to a sensor at the factory default
// IP address
channel = crl::multisense::Channel::Create("10.66.171.21");
channel->setMtu(7200);
//
// Create a vector of IMU configurations to store the queried IMU configuration
std::vector<crl::multisense::imu::Config> imuConfigVect;
//
// Create a uint32_t to store the samplesPerMessage quantity returned
// by reference from getImuConfig
uint32_t samplesPerMessage;
//
// Query the IMU configuration from the Channel instance
status = channel->getImuConfig(samplesPerMessage, imuConfigVect);
//
// Check to see if the IMU configuration query was successful
throw std::runtime_error("Unable to query the imu configuration");
}
//
// Enable streaming for the IMU device at index 0 and select the
// rate corresponding to index 0 in crl::multisense::imu::Info::rates for
// the corresponding IMU device
imuConfigVect[0].enabled = true;
imuConfigVect[0].rateTableIndex = 0;
//
// Do not store these new settings in flash
bool storeSettings = false;
//
// Set the new IMU configuration. Keep the same samplesPerMessage setting
// indicated by the 0 value
crl::multisense::Status status = channel->setImuConfig(storeSettings, 0, imuConfigVect);
//
// Check to see if the new IMU configuration was successfully received.
throw std::runtime_error("Unable to set the imu configuration");
}
//
// Destroy the channel instance

Definition at line 1971 of file MultiSenseTypes.hh.

Member Data Documentation

bool crl::multisense::imu::Config::enabled

A boolean flag indicating whether the given IMU source is currently enabled

Definition at line 1978 of file MultiSenseTypes.hh.

std::string crl::multisense::imu::Config::name

The name of a specific IMU source corresponding to crl::multisense::imu::Info::name

Definition at line 1976 of file MultiSenseTypes.hh.

uint32_t crl::multisense::imu::Config::rangeTableIndex

The index into the range table for a given IMU source specified in crl::multisense::imu::Info::ranges

Definition at line 1984 of file MultiSenseTypes.hh.

uint32_t crl::multisense::imu::Config::rateTableIndex

The index into the rate table for a given IMU source specified in crl::multisense::imu::Info::rates

Definition at line 1981 of file MultiSenseTypes.hh.


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


multisense_lib
Author(s):
autogenerated on Sat Apr 6 2019 02:16:47