#include <CDriverSensoray626.h>
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) |
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::command | ( | int | a_command, | |
void * | a_data | |||
) | [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
Set command to the Sensoray626 board.
a_command | Selected command. | |
a_data | Pointer to the corresponding data structure. |
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::open | ( | ) | [virtual] |
Open connection to Sensoray626 board.
Open connection to Sensoray board
Reimplemented from cGenericDevice.