#include <CPhantomDevices.h>
Inheritance diagram for cPhantomDevice:
Public Member Functions | |
cPhantomDevice (int a_num=0, bool a_dio_access=false) | |
Constructor of cPhantomDevice. | |
~cPhantomDevice () | |
Destructor of cPhantomDevices. | |
virtual int | open () |
Open connection to phantom device. | |
virtual int | close () |
Close connection to phantom device. | |
virtual int | initialize (const bool a_resetEncoders=false) |
Calibrate phantom device. | |
virtual int | command (int a_command, void *a_data) |
Send a command to the phantom device. | |
Static Private Member Functions | |
static void | callbackFunc (void *a_data) |
Callback function passed to phantom dll. | |
Private Attributes | |
int | m_phantomHandle |
handle for specific phantom use. | |
Static Private Attributes | |
static int | m_num_phantoms = 0 |
Number of Phantoms that have been started. |
cPhantomDevice::cPhantomDevice | ( | int | a_num = 0 , |
|
bool | a_dio_access = false | |||
) |
Constructor of cPhantomDevice.
Constructor of cPhantomDevice. No servo loop is yet created, encoders are NOT reset.
a_num | 0-based index of the Phantom that this tool should talk to. | |
a_dio_access | If this is 'true', the tool will use the Ghost API's direct-i/o model, if it's available. Otherwise the gstEffect i/o model will be used. |
cPhantomDevice::~cPhantomDevice | ( | ) |
Destructor of cPhantomDevices.
Destructor of cPhantomDevice.
int cPhantomDevice::open | ( | ) | [virtual] |
Open connection to phantom device.
Open connection to phantom device.
Reimplemented from cGenericDevice.
int cPhantomDevice::close | ( | ) | [virtual] |
Close connection to phantom device.
Close connection to phantom device.
Reimplemented from cGenericDevice.
int cPhantomDevice::initialize | ( | const bool | a_resetEncoders = false |
) | [virtual] |
Calibrate phantom device.
Initialize the phantom device.
For desktops and omnis, the a_resetEncoders parameter is ignored. For premiums, if you specify a_resetEncoders as true, you should be holding the Phantom in its rest position when this is called.
a_resetEncoders | Should I re-zero the encoders? (affects premiums only...) |
Reimplemented from cGenericDevice.
int cPhantomDevice::command | ( | int | iCommand, | |
void * | iData | |||
) | [virtual] |
Send a command to the phantom device.
Set command for the phantom device
iCommand | Selected command. | |
iData | Pointer to the corresponding data structure. |
Reimplemented from cGenericDevice.
void cPhantomDevice::callbackFunc | ( | void * | a_data | ) | [static, private] |
Callback function passed to phantom dll.
Function passed to SetCallbackPhantom Calls m_callback->callback()
a_data | Pointer to instance of cPhantomDevice |