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(1500);
//
// 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(1500);
//
// 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 2842 of file Legacy/include/MultiSense/MultiSenseTypes.hh.

Member Data Documentation

◆ enabled

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

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

Definition at line 2849 of file Legacy/include/MultiSense/MultiSenseTypes.hh.

◆ name

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

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

Definition at line 2847 of file Legacy/include/MultiSense/MultiSenseTypes.hh.

◆ rangeTableIndex

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 2855 of file Legacy/include/MultiSense/MultiSenseTypes.hh.

◆ rateTableIndex

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 2852 of file Legacy/include/MultiSense/MultiSenseTypes.hh.


The documentation for this class was generated from the following file:
crl::multisense::Status_Ok
static CRL_CONSTEXPR Status Status_Ok
Definition: Legacy/include/MultiSense/MultiSenseTypes.hh:99
crl::multisense::Channel::Destroy
static void Destroy(Channel *instanceP)
Definition: Legacy/details/channel.cc:863
crl::multisense::Channel::setMtu
virtual Status setMtu(int32_t mtu)=0
crl::multisense::Channel::Create
static Channel * Create(const std::string &sensorAddress)
Definition: Legacy/details/channel.cc:817
crl::multisense::Channel::getImuConfig
virtual Status getImuConfig(uint32_t &samplesPerMessage, std::vector< imu::Config > &c)=0
crl::multisense::Status
int32_t Status
Definition: Legacy/include/MultiSense/MultiSenseTypes.hh:94
crl::multisense::Channel
Definition: Legacy/include/MultiSense/MultiSenseChannel.hh:69
crl::multisense::Channel::setImuConfig
virtual Status setImuConfig(bool storeSettingsInFlash, uint32_t samplesPerMessage, const std::vector< imu::Config > &c)=0


multisense_lib
Author(s):
autogenerated on Thu Apr 17 2025 02:49:10