Public Member Functions | |
GPIBUSBniInterface (int board_idx, int primary_add, int secondary_add) | |
ctor | |
virtual | ~GPIBUSBniInterface () |
dtor | |
virtual bool | DoCommand (const std::string &cmd) |
Built GPIB command to send to the device. No answer from the device is expected. | |
virtual bool | DoCommand (const std::string &cmd, std::string &answer) |
Built GPIB command to send to the device. An answer from the device is expected. | |
virtual bool | IsError () |
return true if an error is occured | |
bool | IsListener () |
Check the presence of the device. | |
virtual size_t | GetErrorCode () |
Getter for the error code. | |
virtual std::string | GetErrorMsg () |
Getter for the error message. | |
virtual size_t | GetStatusCode () |
Getter for the current status code. | |
virtual std::string | GetStatusMsg () |
Getter for the status message. | |
const int | GetUnitDescriptor () const |
Getter for the device unit descriptor. | |
Protected Member Functions | |
virtual bool | Open () |
Open GPIB device. | |
virtual bool | Close () |
Close GPIB device. | |
virtual bool | Clear () |
clean GPIB device | |
Private Attributes | |
int | f_ud |
GPIBUSBniInterface::GPIBUSBniInterface | ( | int | board_idx, | |
int | primary_add, | |||
int | secondary_add | |||
) |
ctor
board_idx | GPIB interface Board Index (GPIB0 = 0, GPIB1 = 1, ...) | |
primary_add | Device primary address | |
secondary_add | Device secondary address | |
name | Device name | |
vendor | Device vendor |
References Open().
bool GPIBUSBniInterface::DoCommand | ( | const std::string & | cmd | ) | [virtual] |
Built GPIB command to send to the device. No answer from the device is expected.
cmd | commad to send |
Implements GPIBBaseInterface.
References GetUnitDescriptor().
bool GPIBUSBniInterface::DoCommand | ( | const std::string & | cmd, | |
std::string & | answer | |||
) | [virtual] |
Built GPIB command to send to the device. An answer from the device is expected.
cmd | commad to send | |
answer | response from the device. |
Implements GPIBBaseInterface.
References GetUnitDescriptor().
bool GPIBUSBniInterface::IsListener | ( | ) |
Check the presence of the device.
References GPIBBaseInterface::GetPrimaryAddress(), GPIBBaseInterface::GetSecondaryAddress(), and GetUnitDescriptor().
Referenced by Open().
size_t GPIBUSBniInterface::GetErrorCode | ( | ) | [virtual] |
Getter for the error code.
Implements GPIBBaseInterface.
std::string GPIBUSBniInterface::GetErrorMsg | ( | ) | [virtual] |
Getter for the error message.
Implements GPIBBaseInterface.
std::string GPIBUSBniInterface::GetStatusMsg | ( | ) | [virtual] |
Getter for the status message.
Implements GPIBBaseInterface.
bool GPIBUSBniInterface::Open | ( | ) | [protected, virtual] |
Open GPIB device.
Implements GPIBBaseInterface.
References f_ud, GPIBBaseInterface::GetBoardIndex(), GPIBBaseInterface::GetPrimaryAddress(), GPIBBaseInterface::GetSecondaryAddress(), GetUnitDescriptor(), and IsListener().
Referenced by GPIBUSBniInterface().
bool GPIBUSBniInterface::Close | ( | ) | [protected, virtual] |
Close GPIB device.
Implements GPIBBaseInterface.
References f_ud.
Referenced by ~GPIBUSBniInterface().
bool GPIBUSBniInterface::Clear | ( | ) | [protected, virtual] |
clean GPIB device
Implements GPIBBaseInterface.
References f_ud.
int GPIBUSBniInterface::f_ud [private] |
Device unit descriptor.
Referenced by Clear(), Close(), GetUnitDescriptor(), and Open().