MipResources::GroundSens Class Reference
[Ground sensor]

Abstract Ground-sensor. More...

#include <GroundSens.h>

Inheritance diagram for MipResources::GroundSens:

MipResources::Resource MIPObject MipResources::TCRT5000Ground

List of all members.

Public Member Functions

virtual ResourcePlate getPlate () const =0
 Gets the plate.
 GroundSens ()
 Default constructor.
 ~GroundSens ()
 Destructor.
GroundSensParpar ()
 Gets a pointer to the parameters.
bool updatedScan (vector< int > &s)
 Gets an ground 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

Protected Member Functions

virtual vector< int > _singleGroundScan ()=0
 Gets a single scan.
virtual void _startScan (unsigned int num)=0
 Starts a continuous scaninning.
virtual void _stopScan ()=0
 Stops a continuous scaninning.

Protected Attributes

GroundSensPar_par
Scan _scan
bool on


Detailed Description

Abstract Ground-sensor.

Author:
Antonio Franchi

Constructor & Destructor Documentation

MipResources::GroundSens::GroundSens (  ) 

Default constructor.

MipResources::GroundSens::~GroundSens (  ) 

Destructor.


Member Function Documentation

virtual vector<int> MipResources::GroundSens::_singleGroundScan (  )  [protected, pure virtual]

Gets a single scan.

Implemented in MipResources::TCRT5000Ground.

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

Starts a continuous scaninning.

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

Implemented in MipResources::TCRT5000Ground.

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

Stops a continuous scaninning.

Implemented in MipResources::TCRT5000Ground.

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

Gets the plate.

Note:
This is a pure virtual function.

Implements MipResources::Resource.

Implemented in MipResources::TCRT5000Ground.

GroundSensPar * MipResources::GroundSens::par (  ) 

Gets a pointer to the parameters.

Note:
Falls in exception if called not referring to an implemented object.

bool MipResources::GroundSens::updatedScan ( vector< int > &  s  ) 

Gets an ground 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.

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

Start a continuous scan.

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

void MipResources::GroundSens::stopScan (  ) 

Stop a continuous scan.

bool MipResources::GroundSens::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:
s a scan in which the current scan is copied, if return is true
timeout timeout


Member Data Documentation

parameters

current scan

bool MipResources::GroundSens::on [protected]

every inerithed class constructor must set this flag to true


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

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