chai3d::cGenericDevice Class Reference

This class implements an abstract class for hardware devices. More...

#include <CGenericDevice.h>

Inheritance diagram for chai3d::cGenericDevice:

Public Member Functions

 cGenericDevice (unsigned int a_deviceNumber=0)
 Constructor of cGenericDevice. More...
 
virtual ~cGenericDevice ()
 Destructor of cGenericDevice. More...
 
virtual bool open ()
 This method opens a connection to this device. More...
 
virtual bool close ()
 This method closes the connection to this device. More...
 
bool isDeviceAvailable ()
 This method returns true if the device is available for communication, false otherwise. More...
 
bool isDeviceReady ()
 This method returns true if the connection to the device has been established by calling method open(), false otherwise. More...
 

Static Public Member Functions

static unsigned int getNumDevices ()
 This method returns the number of haptic devices available for this class of devices. More...
 

Static Protected Member Functions

static bool openLibraries ()
 This method opens libraries for this class of devices. More...
 
static bool closeLibraries ()
 This method closes libraries for this class of devices. More...
 

Protected Attributes

bool m_deviceAvailable
 Flag that indicates if the device is available to the computer. More...
 
bool m_deviceReady
 Flag that indicates if connection to device was opened successfully by calling method open(). More...
 
int m_deviceNumber
 Device number ID for this category of devices. Value must be equal or bigger than 0. A value of __-1__ means that the ID has not yet been defined. More...
 

Detailed Description

This class implements an general interface to communicate with hardware devices. The device can be opened or closed by calling methods open() and close() respectively. A static method getNumDevices() is used to query the number of available devices for its class of devices.

Constructor & Destructor Documentation

chai3d::cGenericDevice::cGenericDevice ( unsigned int  a_deviceNumber = 0)

Constructor of cGenericDevice.

virtual chai3d::cGenericDevice::~cGenericDevice ( )
inlinevirtual

Member Function Documentation

virtual bool chai3d::cGenericDevice::open ( )
inlinevirtual
virtual bool chai3d::cGenericDevice::close ( )
inlinevirtual
bool chai3d::cGenericDevice::isDeviceAvailable ( )
inline
bool chai3d::cGenericDevice::isDeviceReady ( )
inline
static unsigned int chai3d::cGenericDevice::getNumDevices ( )
inlinestatic
static bool chai3d::cGenericDevice::openLibraries ( )
inlinestaticprotected
static bool chai3d::cGenericDevice::closeLibraries ( )
inlinestaticprotected

Member Data Documentation

bool chai3d::cGenericDevice::m_deviceAvailable
protected
bool chai3d::cGenericDevice::m_deviceReady
protected
int chai3d::cGenericDevice::m_deviceNumber
protected

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