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

Container class to hold VL6180 time-of-flight sensor static information. More...

#include <laeVL6180.h>

Public Member Functions

 LaeVL6180SensorInfo ()
 Default constructor.
 
 LaeVL6180SensorInfo (int nIndex, int nChan, double fBeamDir, double fDeadzone, const std::string &strDesc)
 Initialization constructor. More...
 
 LaeVL6180SensorInfo (const LaeVL6180SensorInfo &src)
 Copy constructor. More...
 
 ~LaeVL6180SensorInfo ()
 Destructor.
 
LaeVL6180SensorInfo operator= (const LaeVL6180SensorInfo &rhs)
 Assignment operator. More...
 
void getProps (int &nIndex, int &nChan, std::string &strRadiationType, double &fFoV, double &fBeamDir, double &fDeadzone, double &fMin, double &fMax, std::string &strDesc)
 Get sensor properties. More...
 

Public Attributes

int m_nIndex
 sensor index
 
int m_nChan
 multiplexed channel number
 
double m_fBeamDir
 center of beam direction(radians)
 
double m_fDeadzone
 sensor deadzone (m)
 
std::string m_strDesc
 short description
 

Detailed Description

Container class to hold VL6180 time-of-flight sensor static information.

Definition at line 280 of file laeVL6180.h.

Constructor & Destructor Documentation

LaeVL6180SensorInfo::LaeVL6180SensorInfo ( int  nIndex,
int  nChan,
double  fBeamDir,
double  fDeadzone,
const std::string &  strDesc 
)

Initialization constructor.

Parameters
nIndexSensor index. May be remapped if order of wired sensors change.
nChanMulitplexed channel number.
fBeamDirCenter of IR beam direction (radians).
fDeadzoneSense deadzone range.
strDescShort description (e.g. location).

Definition at line 119 of file laeVL6180.cxx.

124 {
125  m_nIndex = nIndex;
126  m_nChan = nChan;
127  m_fBeamDir = fBeamDir;
128  m_fDeadzone = fDeadzone;
129  m_strDesc = strDesc;
130 }
double m_fDeadzone
sensor deadzone (m)
Definition: laeVL6180.h:286
int m_nChan
multiplexed channel number
Definition: laeVL6180.h:284
std::string m_strDesc
short description
Definition: laeVL6180.h:287
double m_fBeamDir
center of beam direction(radians)
Definition: laeVL6180.h:285
LaeVL6180SensorInfo::LaeVL6180SensorInfo ( const LaeVL6180SensorInfo src)

Copy constructor.

Parameters
srcSource object.

Definition at line 132 of file laeVL6180.cxx.

References m_fBeamDir, m_fDeadzone, m_nChan, m_nIndex, and m_strDesc.

133 {
134  m_nIndex = src.m_nIndex;
135  m_nChan = src.m_nChan;
136  m_fBeamDir = src.m_fBeamDir;
137  m_fDeadzone = src.m_fDeadzone;
138  m_strDesc = src.m_strDesc;
139 }
double m_fDeadzone
sensor deadzone (m)
Definition: laeVL6180.h:286
int m_nChan
multiplexed channel number
Definition: laeVL6180.h:284
std::string m_strDesc
short description
Definition: laeVL6180.h:287
double m_fBeamDir
center of beam direction(radians)
Definition: laeVL6180.h:285

Member Function Documentation

void LaeVL6180SensorInfo::getProps ( int &  nIndex,
int &  nChan,
std::string &  strRadiationType,
double &  fFoV,
double &  fBeamDir,
double &  fDeadzone,
double &  fMin,
double &  fMax,
std::string &  strDesc 
)

Get sensor properties.

Parameters
[out]nIndexSensor index.
[out]nChanMulitplexed channel number.
[out]strRadiationTypeRadiation type.
[out]fFoVField of View (radians).
[out]fBeamDirCenter of IR beam direction (radians).
[out]fDeadzoneSense deadzone range.
[out]fMinMinimum range (meters).
[out]fMaxMaximum range (meters).
[out]strDescShort description (e.g. location).

Definition at line 157 of file laeVL6180.cxx.

References laelaps::degToRad(), VL6180X_RANGE_FOV, VL6180X_RANGE_MAX, and VL6180X_RANGE_MIN.

166 {
167  nIndex = m_nIndex;
168  nChan = m_nChan;
169  strRadiationType = "infrared";
170  fFoV = degToRad(VL6180X_RANGE_FOV);
171  fBeamDir = m_fBeamDir;
172  fDeadzone = m_fDeadzone;
173  fMin = VL6180X_RANGE_MIN;
174  fMax = VL6180X_RANGE_MAX;
175  strDesc = m_strDesc;
176 }
#define VL6180X_RANGE_MAX
maximum range (m)
Definition: laeVL6180.h:131
double degToRad(double d)
Convert degrees to radians.
Definition: laeUtils.h:124
double m_fDeadzone
sensor deadzone (m)
Definition: laeVL6180.h:286
int m_nChan
multiplexed channel number
Definition: laeVL6180.h:284
std::string m_strDesc
short description
Definition: laeVL6180.h:287
double m_fBeamDir
center of beam direction(radians)
Definition: laeVL6180.h:285
#define VL6180X_RANGE_MIN
minimum range (m)
Definition: laeVL6180.h:130
#define VL6180X_RANGE_FOV
field of view (degrees)
Definition: laeVL6180.h:132
LaeVL6180SensorInfo LaeVL6180SensorInfo::operator= ( const LaeVL6180SensorInfo rhs)

Assignment operator.

Parameters
rhsRight hand side object.

*this

Definition at line 145 of file laeVL6180.cxx.

References m_fBeamDir, m_fDeadzone, m_nChan, m_nIndex, and m_strDesc.

147 {
148  m_nIndex = rhs.m_nIndex;
149  m_nChan = rhs.m_nChan;
150  m_fBeamDir = rhs.m_fBeamDir;
151  m_fDeadzone = rhs.m_fDeadzone;
152  m_strDesc = rhs.m_strDesc;
153 
154  return *this;
155 }
double m_fDeadzone
sensor deadzone (m)
Definition: laeVL6180.h:286
int m_nChan
multiplexed channel number
Definition: laeVL6180.h:284
std::string m_strDesc
short description
Definition: laeVL6180.h:287
double m_fBeamDir
center of beam direction(radians)
Definition: laeVL6180.h:285

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