Laelaps  2.3.5
RoadNarrows Robotics Small Outdoor Mobile Robot Project
sensor::vl6180::LaeRangeInterface Class Reference

Range sensors interface base class. More...

#include <laeVL6180.h>

Inheritance diagram for sensor::vl6180::LaeRangeInterface:
sensor::vl6180::LaeRangeMuxSubproc sensor::vl6180::LaeVL6180MuxArray

Public Member Functions

 LaeRangeInterface (laelaps::LaeI2C &i2cBus)
 Initialization constructor. More...
 
virtual ~LaeRangeInterface ()
 Destructor.
 
virtual int getInterfaceVersion (uint_t &uVerMajor, uint_t &uVerMinor, uint_t &uFwVer)
 Get interface version. More...
 
virtual void clearSensedData ()
 Clear sensed data.
 
virtual int configure (const laelaps::LaeDesc &desc)
 Configure sensor array from product description. More...
 
virtual int configure (const laelaps::LaeTunes &tunes)
 Configure sensor array from tuning parameters. More...
 
virtual int reload (const laelaps::LaeTunes &tunes)
 Reload configuration tuning parameters. More...
 
virtual void exec ()
 Execute task in one cycle to take measurements. More...
 
virtual int getRange (const std::string &strKey, double &fRange)
 Get a range measurement. More...
 
virtual int getRange (std::vector< std::string > &vecNames, std::vector< double > &vecRanges)
 Get all sensor range measurements. More...
 
virtual int getAmbientLight (const std::string &strKey, double &fAmbient)
 Get an ambient light illuminance measurement. More...
 
virtual int getAmbientLight (std::vector< std::string > &vecNames, std::vector< double > &vecAmbient)
 Get all sensor ambient light illuminance measurements. More...
 
virtual int getSensorProps (const std::string &strKey, std::string &strRadiationType, double &fFoV, double &fBeamDir, double &fMin, double &fMax)
 Get range sensor properties. More...
 
virtual int readSensorIdentity (const std::string &strKey, VL6180xIdentification &ident)
 Read sensor's identification. More...
 
virtual int readSensorTunes (const std::string &strKey, uint_t &uRangeOffset, uint_t &uRangeCrossTalk, double &fAlsGain, uint_t &uAlsIntPeriod)
 Read sensor's current tuning parameters. More...
 

Protected Attributes

laelaps::LaeI2Cm_i2cBus
 bound I2C bus instance
 

Detailed Description

Range sensors interface base class.

Definition at line 779 of file laeVL6180.h.

Constructor & Destructor Documentation

sensor::vl6180::LaeRangeInterface::LaeRangeInterface ( laelaps::LaeI2C i2cBus)
inline

Initialization constructor.

Note
The constructor should be kept light weight.
Parameters
i2cbusBound open I2C bus instance.

Definition at line 789 of file laeVL6180.h.

789  : m_i2cBus(i2cBus)
790  {
791  }
laelaps::LaeI2C & m_i2cBus
bound I2C bus instance
Definition: laeVL6180.h:988

Member Function Documentation

virtual int sensor::vl6180::LaeRangeInterface::configure ( const laelaps::LaeDesc desc)
inlinevirtual

Configure sensor array from product description.

Parameters
descProduct description.
Returns
On success, OK(0) is returned.
On error, RC_ERROR(-1) is returned.

Reimplemented in sensor::vl6180::LaeRangeMuxSubproc, and sensor::vl6180::LaeVL6180MuxArray.

Definition at line 834 of file laeVL6180.h.

References laelaps::LAE_ECODE_NO_RSRC.

Referenced by sensor::vl6180::LaeRangeSensorGroup::configure().

835  {
837  }
static const int LAE_ECODE_NO_RSRC
no resource available error
Definition: laelaps.h:83
virtual int sensor::vl6180::LaeRangeInterface::configure ( const laelaps::LaeTunes tunes)
inlinevirtual

Configure sensor array from tuning parameters.

Parameters
tunesTuning parameters.
Returns
On success, OK(0) is returned.
On error, RC_ERROR(-1) is returned.

Reimplemented in sensor::vl6180::LaeRangeMuxSubproc, and sensor::vl6180::LaeVL6180MuxArray.

Definition at line 846 of file laeVL6180.h.

References laelaps::LAE_ECODE_NO_RSRC.

847  {
849  }
static const int LAE_ECODE_NO_RSRC
no resource available error
Definition: laelaps.h:83
virtual void sensor::vl6180::LaeRangeInterface::exec ( )
inlinevirtual

Execute task in one cycle to take measurements.

Context:
LaeThreadRange thread instance.

Reimplemented in sensor::vl6180::LaeRangeMuxSubproc, and sensor::vl6180::LaeVL6180MuxArray.

Definition at line 869 of file laeVL6180.h.

Referenced by sensor::vl6180::LaeRangeSensorGroup::exec().

870  {
871  }
virtual int sensor::vl6180::LaeRangeInterface::getAmbientLight ( const std::string &  strKey,
double &  fAmbient 
)
inlinevirtual

Get an ambient light illuminance measurement.

Parameters
strKeySensor's unique name (key).
[out]fAmbientSensed ambient light (lux).
Returns
On success, OK(0) is returned.
On error, RC_ERROR(-1) is returned.

Reimplemented in sensor::vl6180::LaeRangeMuxSubproc, and sensor::vl6180::LaeVL6180MuxArray.

Definition at line 909 of file laeVL6180.h.

References laelaps::LAE_ECODE_NO_RSRC.

Referenced by sensor::vl6180::LaeRangeSensorGroup::readSensorTunes().

911  {
913  }
static const int LAE_ECODE_NO_RSRC
no resource available error
Definition: laelaps.h:83
virtual int sensor::vl6180::LaeRangeInterface::getAmbientLight ( std::vector< std::string > &  vecNames,
std::vector< double > &  vecAmbient 
)
inlinevirtual

Get all sensor ambient light illuminance measurements.

Parameters
strKeySensor's unique name (key).
[out]vecAmbientVector of associated sensor measured ambients (lux).
Returns
On success, OK(0) is returned.
On error, RC_ERROR(-1) is returned.

Reimplemented in sensor::vl6180::LaeRangeMuxSubproc, and sensor::vl6180::LaeVL6180MuxArray.

Definition at line 924 of file laeVL6180.h.

References laelaps::LAE_ECODE_NO_RSRC.

926  {
928  }
static const int LAE_ECODE_NO_RSRC
no resource available error
Definition: laelaps.h:83
virtual int sensor::vl6180::LaeRangeInterface::getInterfaceVersion ( uint_t &  uVerMajor,
uint_t &  uVerMinor,
uint_t &  uFwVer 
)
inlinevirtual

Get interface version.

Parameters
[out]uVerMajorInterface version major number.
[out]uVerMinorInterface version minor number.
[out]uFwVerFirmware version.
Returns
On success, OK(0) is returned.
On error, RC_ERROR(-1) is returned.

Reimplemented in sensor::vl6180::LaeRangeMuxSubproc, and sensor::vl6180::LaeVL6180MuxArray.

Definition at line 809 of file laeVL6180.h.

References laelaps::LAE_ECODE_NO_RSRC.

Referenced by sensor::vl6180::LaeRangeSensorGroup::getInterfaceVersion().

812  {
813  uVerMajor = 0;
814  uVerMinor = 0;
815  uFwVer = 0;
816 
818  }
static const int LAE_ECODE_NO_RSRC
no resource available error
Definition: laelaps.h:83
virtual int sensor::vl6180::LaeRangeInterface::getRange ( const std::string &  strKey,
double &  fRange 
)
inlinevirtual

Get a range measurement.

Parameters
strKeySensor's unique name (key).
[out]fRangeSensed object range (meters).
Returns
On success, OK(0) is returned.
On error, RC_ERROR(-1) is returned.

Reimplemented in sensor::vl6180::LaeRangeMuxSubproc, and sensor::vl6180::LaeVL6180MuxArray.

Definition at line 881 of file laeVL6180.h.

References laelaps::LAE_ECODE_NO_RSRC.

Referenced by sensor::vl6180::LaeRangeSensorGroup::readSensorTunes().

882  {
884  }
static const int LAE_ECODE_NO_RSRC
no resource available error
Definition: laelaps.h:83
virtual int sensor::vl6180::LaeRangeInterface::getRange ( std::vector< std::string > &  vecNames,
std::vector< double > &  vecRanges 
)
inlinevirtual

Get all sensor range measurements.

Parameters
[out]vecNamesVector of sensor unique names.
[out]vecRangesVector of associated sensor measured ranges (meters).
Returns
On success, OK(0) is returned.
On error, RC_ERROR(-1) is returned.

Reimplemented in sensor::vl6180::LaeRangeMuxSubproc, and sensor::vl6180::LaeVL6180MuxArray.

Definition at line 895 of file laeVL6180.h.

References laelaps::LAE_ECODE_NO_RSRC.

897  {
899  }
static const int LAE_ECODE_NO_RSRC
no resource available error
Definition: laelaps.h:83
virtual int sensor::vl6180::LaeRangeInterface::getSensorProps ( const std::string &  strKey,
std::string &  strRadiationType,
double &  fFoV,
double &  fBeamDir,
double &  fMin,
double &  fMax 
)
inlinevirtual

Get range sensor properties.

Parameters
strKeySensor's unique name id (key).
[out]strRadiationTypeRadiation type.
[out]fFoVField of View (radians).
[out]fBeamdirCenter of beam direction (radians).
[out]fMinMinimum range (meters).
[out]fMaxMaximum range (meters).
Returns
On success, OK(0) is returned.
On error, RC_ERROR(-1) is returned.

Reimplemented in sensor::vl6180::LaeRangeMuxSubproc, and sensor::vl6180::LaeVL6180MuxArray.

Definition at line 942 of file laeVL6180.h.

References laelaps::LAE_ECODE_NO_RSRC.

Referenced by sensor::vl6180::LaeRangeSensorGroup::getSensorProps().

948  {
950  }
static const int LAE_ECODE_NO_RSRC
no resource available error
Definition: laelaps.h:83
virtual int sensor::vl6180::LaeRangeInterface::readSensorIdentity ( const std::string &  strKey,
VL6180xIdentification ident 
)
inlinevirtual

Read sensor's identification.

Parameters
strKeySensor's unique name id (key).
[out]identIdentification structure.
Returns
On success, OK(0) is returned.
On error, RC_ERROR(-1) is returned.

Reimplemented in sensor::vl6180::LaeRangeMuxSubproc, and sensor::vl6180::LaeVL6180MuxArray.

Definition at line 960 of file laeVL6180.h.

References laelaps::LAE_ECODE_NO_RSRC.

Referenced by sensor::vl6180::LaeRangeSensorGroup::readSensorIdentity().

962  {
964  }
static const int LAE_ECODE_NO_RSRC
no resource available error
Definition: laelaps.h:83
virtual int sensor::vl6180::LaeRangeInterface::readSensorTunes ( const std::string &  strKey,
uint_t &  uRangeOffset,
uint_t &  uRangeCrossTalk,
double &  fAlsGain,
uint_t &  uAlsIntPeriod 
)
inlinevirtual

Read sensor's current tuning parameters.

Parameters
strKeySensor's unique name id (key).
[out]uRangeOffsetToF sensor part-to-part offset.
[out]uRangeCrossTalkToF sensor cross-talk compensation.
[out]fAlsGainAmbient light sensor analog gain.
[out]uAlsIntPeriodAmbient light sensor integration period (msec).
Returns
On success, OK(0) is returned.
On error, RC_ERROR(-1) is returned.

Reimplemented in sensor::vl6180::LaeRangeMuxSubproc, and sensor::vl6180::LaeVL6180MuxArray.

Definition at line 978 of file laeVL6180.h.

References laelaps::LAE_ECODE_NO_RSRC.

Referenced by sensor::vl6180::LaeRangeSensorGroup::readSensorTunes().

983  {
985  }
static const int LAE_ECODE_NO_RSRC
no resource available error
Definition: laelaps.h:83
virtual int sensor::vl6180::LaeRangeInterface::reload ( const laelaps::LaeTunes tunes)
inlinevirtual

Reload configuration tuning parameters.

Parameters
tunesTuning parameters.
Returns
On success, OK(0) is returned.
On error, RC_ERROR(-1) is returned.

Reimplemented in sensor::vl6180::LaeRangeMuxSubproc, and sensor::vl6180::LaeVL6180MuxArray.

Definition at line 858 of file laeVL6180.h.

References laelaps::LAE_ECODE_NO_RSRC.

Referenced by sensor::vl6180::LaeRangeSensorGroup::reload().

859  {
861  }
static const int LAE_ECODE_NO_RSRC
no resource available error
Definition: laelaps.h:83

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