Public Member Functions | Private Attributes | List of all members
crl::multisense::lighting::Config Class Reference

#include <MultiSenseTypes.hh>

Public Member Functions

 Config ()
 
bool enableRollingShutterLedSynchronization (const bool enabled)
 
float getDutyCycle (uint32_t i) const
 
bool getFlash () const
 
bool getInvertPulse () const
 
uint32_t getNumberOfPulses () const
 
bool getRollingShutterLedSynchronizationStatus (void) const
 
uint32_t getStartupTime () const
 
bool setDutyCycle (float percent)
 
bool setDutyCycle (uint32_t i, float percent)
 
void setFlash (bool onOff)
 
bool setInvertPulse (const bool invert)
 
bool setNumberOfPulses (const uint32_t numPulses)
 
bool setStartupTime (uint32_t ledTransientResponse_us)
 

Private Attributes

std::vector< float > m_dutyCycle
 
bool m_flashEnabled
 
bool m_invertPulse
 
uint32_t m_lightStartupOffset_us
 
uint32_t m_numberPulses
 
bool m_rollingShutterLedEnabled
 

Detailed Description

Class used to store a specific lighting configuration. Member of this class are set and queried via set and get methods. This class is used as an input to a channel object to query and set lighting parameters.

Example code to query a lighting 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 lightingConfig instance to store our queried lighting configuration
//
// Query the lighting configuration from the Channel instance
crl::multisense::Status status = channel->getLightingConfig(lightingConfig);
//
// Check to see if the lighting configuration query was successful
throw std::runtime_error("Unable to query lighting configuration");
}
//
// Use the lighting configuration...
//
// Destroy the channel instance

Example code to set a lighting 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 lightingConfig instance to store our queried lighting configuration
//
// Query the lighting configuration from the Channel instance
status = channel->getLightingConfig(lightingConfig);
//
// Check to see if the lighting configuration query was successful
throw std::runtime_error("Unable to query lighting configuration");
}
//
// Change the duty cycle for all light to the max setting and enable
// light flashing
lightingConfig.setFlash(true);
//
// Set the new lighting configuration
status = channel->setLightingConfig(lightingConfig);
//
// Check to see if the new lighting configuration was successfully
// received
throw std::runtime_error("Unable to set lighting configuration");
}
//
// Destroy the channel instance

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

Constructor & Destructor Documentation

◆ Config()

crl::multisense::lighting::Config::Config ( )
inline

Default constructor. Flashing is disabled and all lights are off

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

Member Function Documentation

◆ enableRollingShutterLedSynchronization()

bool crl::multisense::lighting::Config::enableRollingShutterLedSynchronization ( const bool  enabled)
inline

◆ getDutyCycle()

float crl::multisense::lighting::Config::getDutyCycle ( uint32_t  i) const
inline

Get the current duty cycle in terms of percent for a specific light

Parameters
iThe index of the light to query
Returns
The current duty cycle setting for the light corresponding to index i

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

◆ getFlash()

bool crl::multisense::lighting::Config::getFlash ( ) const
inline

Get the current lighting flash setting.

Returns
A boolean flag corresponding to if flashing is enabled or disabled

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

◆ getInvertPulse()

bool crl::multisense::lighting::Config::getInvertPulse ( ) const
inline

Get whether or not the LED pulse is inverted. True means the output will be low during the exposure. False means the output will be high during the exposure.

Returns
True if the pulse is inverted

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

◆ getNumberOfPulses()

uint32_t crl::multisense::lighting::Config::getNumberOfPulses ( ) const
inline

Get the number of pulses of the light per a single exposure This is used to trigger the light or output signal multiple times after a single exposure. For values greater than 1, pulses will occur between the exposures, not during. This can be used to leverage human persistence of vision to make the light appear as though it is not flashing

Returns
The current number of pulses

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

◆ getRollingShutterLedSynchronizationStatus()

bool crl::multisense::lighting::Config::getRollingShutterLedSynchronizationStatus ( void  ) const
inline

Get the setting of the rollingShutterSynchronization. Note: This feature is only available for Next Gen Stereo Cameras, with a rolling shutter imager.

Returns
True if enabled, False if disabled

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

◆ getStartupTime()

uint32_t crl::multisense::lighting::Config::getStartupTime ( ) const
inline

Get the startup time offset of the led in microseconds The LED or output trigger is triggered this many microseconds before the start of the image exposure

Returns
The current led startup time

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

◆ setDutyCycle() [1/2]

bool crl::multisense::lighting::Config::setDutyCycle ( float  percent)
inline

Set a sensors duty cycle in terms of percent for all the on-board lights

Parameters
percentThe percent "on" to set all the on-board LED's [0.0, 100.0]
Returns
If the given percent setting is valid

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

◆ setDutyCycle() [2/2]

bool crl::multisense::lighting::Config::setDutyCycle ( uint32_t  i,
float  percent 
)
inline

Set a sensors duty cycle in terms of percent for a specific light based off its index

Parameters
iThe index of the light to configure
percentThe percent "on" to set all the on-board LED's [0.0, 100.0]
Returns
If the given percent setting is valid

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

◆ setFlash()

void crl::multisense::lighting::Config::setFlash ( bool  onOff)
inline

Turn on/off light flashing. During flashing lights are only on when the image sensor is exposing. This significantly reduces the sensor power consumption

Parameters
onOffA boolean flag to enable or disable flashing

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

◆ setInvertPulse()

bool crl::multisense::lighting::Config::setInvertPulse ( const bool  invert)
inline

Invert the output signal that drives lighting. True means the output will be low during the exposure. False means the output will be high during the exposure. (Only supported for firmware >=5.21)

Parameters
invertWhether or not to invert the pulse signal
Returns
True on success, False on failure

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

◆ setNumberOfPulses()

bool crl::multisense::lighting::Config::setNumberOfPulses ( const uint32_t  numPulses)
inline

Set the number of pulses of the light within a single exposure This is used to trigger the light or output signal multiple times after a single exposure. For values greater than 1, pulses will occur between the exposures, not during. This can be used to leverage human persistence of vision to make the light appear as though it is not flashing

Returns
True on success, False on failure

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

◆ setStartupTime()

bool crl::multisense::lighting::Config::setStartupTime ( uint32_t  ledTransientResponse_us)
inline

Set the transient startup time of the led, for better synchronization. The LED or output trigger is triggered this many microseconds before the start of the image exposure

Parameters
ledTransientResponse_usThe led transient time.
Returns
True on success, False on failure

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

Member Data Documentation

◆ m_dutyCycle

std::vector<float> crl::multisense::lighting::Config::m_dutyCycle
private

◆ m_flashEnabled

bool crl::multisense::lighting::Config::m_flashEnabled
private

◆ m_invertPulse

bool crl::multisense::lighting::Config::m_invertPulse
private

◆ m_lightStartupOffset_us

uint32_t crl::multisense::lighting::Config::m_lightStartupOffset_us
private

◆ m_numberPulses

uint32_t crl::multisense::lighting::Config::m_numberPulses
private

◆ m_rollingShutterLedEnabled

bool crl::multisense::lighting::Config::m_rollingShutterLedEnabled
private

The documentation for this class was generated from the following file:
crl::multisense::lighting::Config::setFlash
void setFlash(bool onOff)
Definition: Legacy/include/MultiSense/MultiSenseTypes.hh:2311
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::setLightingConfig
virtual Status setLightingConfig(const lighting::Config &c)=0
crl::multisense::Channel::setMtu
virtual Status setMtu(int32_t mtu)=0
crl::multisense::lighting::MAX_DUTY_CYCLE
static CRL_CONSTEXPR float MAX_DUTY_CYCLE
Definition: Legacy/include/MultiSense/MultiSenseTypes.hh:2213
crl::multisense::lighting::Config::setDutyCycle
bool setDutyCycle(float percent)
Definition: Legacy/include/MultiSense/MultiSenseTypes.hh:2329
crl::multisense::lighting::Config
Definition: Legacy/include/MultiSense/MultiSenseTypes.hh:2300
crl::multisense::Channel::Create
static Channel * Create(const std::string &sensorAddress)
Definition: Legacy/details/channel.cc:817
crl::multisense::Channel::getLightingConfig
virtual Status getLightingConfig(lighting::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


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