Public Attributes
crl::multisense::imu::Config Class Reference

#include <MultiSenseTypes.hh>

List of all members.

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:

 {.cpp}
     //
     // Instantiate a channel connecting to a sensor at the factory default
     // IP address
     crl::multisense::Channel* channel;
     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
     if(crl::multisense::Status_Ok != status) {
          throw std::runtime_error("Unable to query the imu configuration");
     }

     //
     // Use the IMU configuration...

     //
     // Destroy the channel instance
     crl::multisense::Channel::Destroy(channel);

Example code to set a IMU configuration:

 {.cpp}
     //
     // Instantiate a channel connecting to a sensor at the factory default
     // IP address
     crl::multisense::Channel* channel;
     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;

     crl::multisense::Status status;

     //
     // Query the IMU configuration from the Channel instance
     status = channel->getImuConfig(samplesPerMessage, imuConfigVect);

     //
     // Check to see if the IMU configuration query was successful
     if(crl::multisense::Status_Ok != status) {
          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.
     if(crl::multisense::Status_Ok != status) {
          throw std::runtime_error("Unable to set the imu configuration");
     }

     //
     // Destroy the channel instance
     crl::multisense::Channel::Destroy(channel);

Definition at line 1971 of file MultiSenseTypes.hh.


Member Data Documentation

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

Definition at line 1978 of file MultiSenseTypes.hh.

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

Definition at line 1976 of file MultiSenseTypes.hh.

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.

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 Mon Oct 9 2017 03:06:22