MipResources::RangeSens Class Reference
[Range sensor]

Abstract Range-sensor. More...

#include <RangeSens.h>

Inheritance diagram for MipResources::RangeSens:

MipResources::Resource MIPObject MipResources::RemoteRangeSens MipResources::TCRT5000 MipResources::URG04LX MipResources::URG04LXmm

List of all members.

Public Member Functions

virtual ResourcePlate getPlate () const =0
 Get the plate.
 RangeSens (int argc, const char *argv[])
 Default constructor.
 ~RangeSens ()
 Destructor.
RangeSensParpar ()
 Get parameter pointer.
RangeSensmmParparmm ()
 Get parameter in mm pointer.
bool getScanType (ScanTypes &type)
 Get Scan type. A wrapper of the getScanType function of the scan.
bool updatedScan (Scan &s)
 Get an updated scan.
void startScan (unsigned int num)
 Start a continuous scan.
void stopScan ()
 Stop a continuous scan.
bool storedScan (Scan &s, Time timeout)
 Get the last stored scan, if a continuous scanning is in act the scan is updated.
void getFixedBearings ()
 Gets the fixed bearings of the RangeSens.

Protected Member Functions

virtual Scan _singleScan ()=0
 Get a single Scan.
virtual void _startScan (unsigned int num)=0
 Start a continuous scaninning.
virtual void _stopScan ()=0
 Stop a continuous scaninning.

Protected Attributes

RangeSensPar_par
 Parameters.
RangeSensmmPar_parmm
 Parameters in mm.
Scan _scan
 Current scan.
bool on
 Every inerithed class constructor must set this flag to true.
vector< Angle > * _fixedBearings
 If useFixedBearings and scan in meters, this vector contains the bearings.
vector< Anglem > * _fixedBearingsmm
 If useFixedBearings and scan in millimeters, this vector contains the bearings.
bool useFixedBearings
 Says if use fixed bearings or bearings can change in different scans.
RangeSensOptions _rangeSensOptions
 Options for the generic range sensor.


Detailed Description

Abstract Range-sensor.

Author:
Antonio Franchi

Constructor & Destructor Documentation

MipResources::RangeSens::RangeSens ( int  argc,
const char *  argv[] 
)

Default constructor.

Default constructor.

MipResources::RangeSens::~RangeSens (  ) 

Destructor.


Member Function Documentation

virtual Scan MipResources::RangeSens::_singleScan (  )  [protected, pure virtual]

virtual void MipResources::RangeSens::_startScan ( unsigned int  num  )  [protected, pure virtual]

Start a continuous scaninning.

Parameters:
num number of scan to perform, (0 means unbounded)

Implemented in MipResources::RemoteRangeSens, MipResources::TCRT5000, MipResources::URG04LX, and MipResources::URG04LXmm.

virtual void MipResources::RangeSens::_stopScan (  )  [protected, pure virtual]

virtual ResourcePlate MipResources::RangeSens::getPlate (  )  const [pure virtual]

RangeSensPar * MipResources::RangeSens::par ( void   ) 

Get parameter pointer.

Returns:
Pointer to _par if retrivable and SCAN_SENS, NULL otherwise.
Note:
Falls in exception if called not referring to an implemented object.

RangeSensmmPar * MipResources::RangeSens::parmm (  ) 

Get parameter in mm pointer.

Returns:
Pointer to _parmm if retrivable and SCAN_SENSMM, NULL otherwise.
Note:
Falls in exception if called not referring to an implemented object.

bool MipResources::RangeSens::getScanType ( ScanTypes type  ) 

Get Scan type. A wrapper of the getScanType function of the scan.

Returns:
true if succesfully got, false otherwise.
Parameters:
[out] &type Returned type.

bool MipResources::RangeSens::updatedScan ( Scan s  ) 

Get an updated scan.

Returns:
true if the get if all is ok (remeber that scan is a MutExed Resource), false otherwise.
Parameters:
[out] s A scan in which the current scan is copied, if return is true.

Reimplemented in MipResources::URG04LX, and MipResources::URG04LXmm.

void MipResources::RangeSens::startScan ( unsigned int  num  ) 

Start a continuous scan.

Parameters:
[in] num Number of scan to perform, (0 means unbounded).

void MipResources::RangeSens::stopScan (  ) 

Stop a continuous scan.

bool MipResources::RangeSens::storedScan ( Scan s,
Time  timeout 
)

Get the last stored scan, if a continuous scanning is in act the scan is updated.

Note:
Differs from newScan(), it has strictly sense only if startScan was invoked before.
Returns:
true if the get if all is ok (remeber that scan is a MutExed Resource), false otherwise.
Parameters:
[out] &s A scan in which the current scan is copied, if return is true.
[in] timeout Timeout.

Reimplemented in MipResources::URG04LX.

void MipResources::RangeSens::getFixedBearings (  ) 

Gets the fixed bearings of the RangeSens.


Member Data Documentation

Parameters.

Parameters in mm.

Current scan.

bool MipResources::RangeSens::on [protected]

Every inerithed class constructor must set this flag to true.

If useFixedBearings and scan in meters, this vector contains the bearings.

If useFixedBearings and scan in millimeters, this vector contains the bearings.

Says if use fixed bearings or bearings can change in different scans.

Options for the generic range sensor.


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

Generated on Mon Feb 20 07:01:13 2017 for MIP by  doxygen 1.5.6