There should be one instance of this class created for each BarrettHand. More...
#include <BHand.h>
Inherits BHandSupervisoryRealtime.
Public Member Functions | |
BHand () | |
Constructor for the BarrettHand object. | |
virtual | ~BHand () |
Deconstructor for the BarrettHand object. | |
int | setDeviceDriver (BHandDriver *driver) |
Sets the device driver for this instance of the BarrettHand. | |
BHandDriver * | getDeviceDriver () |
Gets the device driver for this instance of the BarrettHand. | |
int | setHardwareDesc (unsigned int hwIndex) |
Sets a Hardware Description for the BarrettHand. | |
BHandHardware * | getHardwareDesc () |
Gets a Hardware Description of the BarrettHand. | |
Static Public Member Functions | |
static unsigned int | getHardwareNumModels () |
Gets the number of available BarrettHand model numbers. | |
static BHandHardware * | getHardwareDesc (unsigned int hwIndex) |
Gets a Hardware Description of the given BarrettHand. | |
static void | SetDefaultBaud (unsigned int baud) |
Sets the default serial communication baud rate used by all new BHand instances. | |
static const char * | ErrorMessage (int err) |
Get an error message for a BHand error code. |
There should be one instance of this class created for each BarrettHand.
This class allows access to different BarrettHand Hardware Descriptions. It also contains the device driver for communication with the hand and inherits BHandSupervisoryRealtime. This inheritance means that all high-level supervisory and RealTime control/feedback methods will be callable.
Definition at line 92 of file BHand.h.
BHand::BHand | ( | ) |
Constructor for the BarrettHand object.
There should be one BHand instance created for each BarrettHand being controlled. This constructor initializes the BHand instance as required before any communication with the hardware takes place.
Definition at line 79 of file BHand.cpp.
BHand::~BHand | ( | ) | [virtual] |
BHandDriver * BHand::getDeviceDriver | ( | ) |
unsigned int BHand::getHardwareNumModels | ( | ) | [static] |
Gets the number of available BarrettHand model numbers.
unsigned int | Number of available BarrettHand model numbers |
Definition at line 180 of file BHand.cpp.
Referenced by setHardwareDesc().
BHandHardware * BHand::getHardwareDesc | ( | unsigned int | hwIndex | ) | [static] |
Gets a Hardware Description of the given BarrettHand.
hwIndex | Device driver used for communication with the BarrettHand |
BHandHardware | Pointer to the BarrettHand Hardware Description |
Definition at line 190 of file BHand.cpp.
Referenced by BHandSupervisoryRealtime::Command().
int BHand::setHardwareDesc | ( | unsigned int | hwIndex | ) |
Sets a Hardware Description for the BarrettHand.
hwIndex | Hardware Description for the BarrettHand |
int | Error code that is returned will be zero if successful |
Definition at line 200 of file BHand.cpp.
Referenced by BHand(), and BHandSupervisoryRealtime::InitSoftware().
BHandHardware * BHand::getHardwareDesc | ( | ) |
Gets a Hardware Description of the BarrettHand.
BHandHardware | Pointer to the BarrettHand Hardware Description |
Definition at line 214 of file BHand.cpp.
Referenced by setHardwareDesc().
void BHand::SetDefaultBaud | ( | unsigned int | baud | ) | [static] |
Sets the default serial communication baud rate used by all new BHand instances.
Although users may desire setting higher baud rates for better RealTime performance, most users will not need to do this. If the global BAUD property is permanently set to a value other than 96 (96 => 9600 bps) then SetDefaultBaud must be called to communicate with the hand at the correct baud rate.
Beware of permanently changing the BAUD property. The GUI is capable of being configured to connect to the hand with baud rates other than 9600 bps. The examples and demos will NOT work unless hand BAUD property is 9600 baud at startup. So it is better to connect to the hand and then increase the baud rate using the Baud method. Note that not all hands are capable of higher baud rates.
baud | Only pass in values of 9600, 19200, or 38400 |
const char * BHand::ErrorMessage | ( | int | err | ) | [static] |