#include <CDriverSensoray626.h>
Inheritance diagram for cDriverSensoray626:
Public Member Functions | |
cDriverSensoray626 () | |
Constructor of cDriverSensoray626. | |
~cDriverSensoray626 () | |
Destructor of cDriverSensoray626. | |
int | open () |
Open connection to Sensoray626 board. | |
int | close () |
Close connection to Sensoray626 board. | |
int | initialize (const bool a_resetEncoders=false) |
Initialize Sensoray626 board. | |
int | command (int iCommand, void *iData) |
Private Member Functions | |
void | encoderInit () |
Set encoders to the right operation mode. | |
Private Attributes | |
int | m_boardHandle |
Handle to current board. | |
unsigned short | m_wBaseAddress |
Board base address. | |
long | homeposition [6] |
Initial values of the encoders to reset them. | |
Static Private Attributes | |
static int | m_BOARD_NUM = 0 |
Number of handles that have been initialized. |
cDriverSensoray626::cDriverSensoray626 | ( | ) |
Constructor of cDriverSensoray626.
Constructor of cDriverSensoray626.
cDriverSensoray626::~cDriverSensoray626 | ( | ) |
Destructor of cDriverSensoray626.
Destructor of cDriverSensoray626.
int cDriverSensoray626::open | ( | ) | [virtual] |
Open connection to Sensoray626 board.
Open connection to Sensoray board
Reimplemented from cGenericDevice.
int cDriverSensoray626::close | ( | ) | [virtual] |
Close connection to Sensoray626 board.
Close connection to the board, write a zero value to all DACs.
Reimplemented from cGenericDevice.
int cDriverSensoray626::initialize | ( | const bool | a_resetEncoders = false |
) | [virtual] |
Initialize Sensoray626 board.
Initializes board. In this implementation there's really nothing to do that hasn't been done in the opening phase.
a_resetEncoders | Ignored; reserved for forward compatibility |
Reimplemented from cGenericDevice.
int cDriverSensoray626::command | ( | int | iCommand, | |
void * | iData | |||
) | [virtual] |
Send a command to the Sensoray626 board possible commands are: CHAI_CMD_GET_DEVICE_STATE: returns an int (1 board is ready, 0 board is NOT ready) CHAI_CMD_GET_ENCODER_0: reads encoder 0, returns counts value in a long CHAI_CMD_GET_ENCODER_1: reads encoder 1, returns counts value in a long CHAI_CMD_GET_ENCODER_2: reads encoder 2, returns counts value in a long CHAI_CMD_GET_ENCODER_3: reads encoder 3, returns counts value in a long CHAI_CMD_GET_ENCODER_4: reads encoder 4, returns counts value in a long CHAI_CMD_GET_ENCODER_5: reads encoder 5, returns counts value in a long CHAI_CMD_SET_DAC_0: writes a voltage to DAC 0 a value between +10 and -10 volts, which is a double CHAI_CMD_SET_DAC_1: writes a voltage to DAC 1 a value between +10 and -10 volts, which is a double CHAI_CMD_SET_DAC_2: writes a voltage to DAC 2 a value between +10 and -10 volts, which is a double CHAI_CMD_SET_DAC_3: writes a voltage to DAC 3 a value between +10 and -10 volts, which is a double
Reimplemented from cGenericDevice.
void cDriverSensoray626::encoderInit | ( | ) | [private] |
Set encoders to the right operation mode.
Sets all counters on the board to be used as encoders.