cGenericDevice Class Reference

cGenericDevice describes a virtual class from which all devices and hardware interfaces are derived. More...

#include <CGenericDevice.h>

Inheritance diagram for cGenericDevice:

cDeltaDevice cDriverSensoray626 cDriverServotogo cFreedom6SDevice cPhantomDevice cVirtualDevice List of all members.

Public Member Functions

 cGenericDevice ()
 Constructor of cGenericDevice.
virtual ~cGenericDevice ()
 Destructor of cGenericDevice.
virtual int open ()
 Open connection to device (0 indicates success).
virtual int close ()
 Close connection to device (0 indicates success).
virtual int initialize (const bool a_resetEncoders=false)
 Initialize or calibrate device (0 indicates success).
virtual int command (int a_command, void *a_data)
 Send a command to the device (0 indicates success).
bool isSystemAvailable ()
 Returns true if the device is available for communication.
bool isSystemReady ()
 Returns true if the device is ready for us.
virtual bool setCallback (cCallback *m_callback)
 Ask the device to call me back periodically.

Protected Attributes

bool m_systemAvailable
 Flag that indicates is hardware device is available.
bool m_systemReady
 Flag that indicates if connection to system was opened successfully.
cCallbackm_callback
 A callback method for this device (or zero if none has been registered).

Detailed Description

cGenericDevice describes a virtual class from which all devices and hardware interfaces are derived.


Member Function Documentation

bool cGenericDevice::setCallback ( cCallback m_callback  )  [virtual]

Ask the device to call me back periodically.

Ask the device to call me back periodically. If this device supports timed callbacks, this function will return 'true' and will call the supplied m_callback method at haptic rates. If not, this function will return 'false', and you should create your own haptic thread.

Parameters:
m_callback The callback to trigger periodically, or 0 to cancel an existing callback.
Returns:
true if this device supports callbacks, false otherwise


The documentation for this class was generated from the following files:
Generated on Mon Jun 11 09:41:47 2007 for CHAI 3D by  doxygen 1.5.2