Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

PSDs Class Reference

#include <PSDs.h>

List of all members.

Detailed Description

This class provides methods to access the infra-red sensors. The class is designed as a singleton class. This is to ensure that the initialization process is executed only once as multiple initializations will result in errors. So at any given time there is at most one instance of the class. The method PSDs::getPSDs() can be used to access that instance.
Jia L. Du

Public Member Functions

bool initialize ()
double readLeft ()
double readRight ()
double readFront ()

Static Public Member Functions

PSDs * getPSDs ()

Protected Member Functions

 PSDs ()
 ~PSDs ()
bool release ()

Private Attributes

PSDHandle leftPSDHandle
PSDHandle rightPSDHandle
PSDHandle frontPSDHandle

Static Private Attributes


Constructor & Destructor Documentation

PSDs::PSDs   [protected]

PSDs::~PSDs   [protected]

Member Function Documentation

PSDs * PSDs::getPSDs   [static]

This method is used to get the instance of this singleton class

A pointer to the instance

bool PSDs::initialize  

Initializes the sensors for usage. Should automatically be called by the constructor. But as the EyeSim simulator is not able to execute RoBIOS library functions in class constructors, we have declared this method as public and need to call this method manually in main

true if successful

double PSDs::readFront  

The distance to the next object as read by the front infra-red sensor (in meter)

double PSDs::readLeft  

The distance to the next object as read by the left infra-red sensor (in meter)

double PSDs::readRight  

The distance to the next object as read by the right infra-red sensor (in meter)

bool PSDs::release   [protected]

Releases the sensors after usage. Is automatically called by the destructor

true if successful

Member Data Documentation

PSDHandle PSDs::frontPSDHandle [private]

Used internally to access the front infra-red sensor

PSDHandle PSDs::leftPSDHandle [private]

Used internally to access the left infra-red sensor

PSDs PSDs::psds [static, private]

The single instance that exists of this class

See also:

PSDHandle PSDs::rightPSDHandle [private]

Used internally to access the right infra-red sensor

Generated on Mon Aug 26 18:34:09 2002 for Cube Clustering by doxygen1.3-rc3