#include <GPIB_232_CT_A.h>
Inheritance diagram for LibGPIB::GPIB_232_CT_A:
Public Methods | |
GPIB_232_CT_A (const string serial_port) | |
The constructor must specify a serial port to use. More... | |
virtual | ~GPIB_232_CT_A () |
The destructor. | |
const string | Identify () |
Identify the system. | |
void | SetIOTimeout (float timeout) |
Set the IO timeout. More... | |
virtual void | Open () |
Open the specified GPIBController as a stream. More... | |
virtual void | Close () |
Close the specified GPIBController stream. More... | |
virtual void | BecomeActiveController (bool synchronously=true) |
Become the active controller of the bus. More... | |
virtual void | ClearDevice (GPIBEquipment &device) |
Send a clear signal to a specific device. More... | |
virtual void | SendCommand (GPIBEquipment &device, const string command) |
Send the specified string to a given device. More... | |
virtual const string | ReadData (GPIBEquipment &device, const int read_bytes) |
Read data from the specified device. More... | |
virtual void | SetLocal (GPIBEquipment &device) |
Set the device in local mode. More... | |
virtual void | SetEOSModeAndChar (const EOSModeVal mode, const char eos) |
Set the EOS mode and character for the specified controller. More... | |
Protected Methods | |
virtual ostream& | SendCharPrefix ( const int primary_address, const int secondary_address=0 ) |
A manipulator called before sending a character to a GPIBEquipment. | |
virtual ostream& | SendCharPostfix ( const int primary_address, const int secondary_address=0 ) |
A manipulator called after sending a character to a GPIBEquipment. | |
virtual ostream& | ReadCharPrefix ( const int primary_address, const int secondary_address=0 ) |
A manipulator called before reading a character from a GPIBEquipment. | |
virtual ostream& | ReadCharPostfix ( const int primary_address, const int secondary_address=0 ) |
A manipulator called after reading a character from a GPIBEquipment. | |
Private Methods | |
void | DiscardCRLF () |
This routine is used to get and discard the two character sequence <CR><LF> that is expected at the end of most queries associated with the GPIB_232_CT_A. | |
Private Attributes | |
string | mSerialPortFile |
The name of the file that represents the serial port to be used. More... | |
LibSerial::SerialStream | mSerialPort |
The serial port which will be used for communicating with GPIB_232_CT_A box. | |
int | mEOT |
Variable used to store a backup copy of the EOT settings between SendCharPrefix and SendCharPostfix commands. | |
string | mEOSSetting |
Variable used to store a backup copy of the EOS settings between SendCharPrefix and SendCharPostfix commands. |
|
The constructor must specify a serial port to use.
The Open() method must be called before we can communicate with the controller.
Definition at line 103 of file GPIB_232_CT_A.h.
|
|
Become the active controller of the bus.
synchronously | If true then the controller becomes the active controller synchronously. Otherwise, the controller takes over the bus immediately. |
Reimplemented from LibGPIB::GPIBController.
|
Send a clear signal to a specific device.
device | The GPIB instrument to which the clear signal is to be sent. |
Reimplemented from LibGPIB::GPIBController.
|
Close the specified GPIBController stream.
No communications can occur once the GPIBController stream is closed.
Reimplemented from LibGPIB::GPIBController.
|
This routine is used to get and discard the two character sequence <CR><LF> that is expected at the end of most queries associated with the GPIB_232_CT_A.
Definition at line 120 of file GPIB_232_CT_A.h.
|
Identify the system.
|
Open the specified GPIBController as a stream.
This should be called after setting all the parameters of the GPIBController subclass which are essential to communicate with the controller. For example, in the case of the GPIB-232-CT-A box, the parameters of the serial port associated with the box should be set before calling this method.
Reimplemented from LibGPIB::GPIBController.
|
A manipulator called after reading a character from a GPIBEquipment.
Reimplemented from LibGPIB::GPIBController.
|
A manipulator called before reading a character from a GPIBEquipment.
Reimplemented from LibGPIB::GPIBController.
|
Read data from the specified device.
device |
The instrument from which data is to be read.
|
Reimplemented from LibGPIB::GPIBController.
|
A manipulator called after sending a character to a GPIBEquipment.
Reimplemented from LibGPIB::GPIBController.
|
A manipulator called before sending a character to a GPIBEquipment.
Reimplemented from LibGPIB::GPIBController.
|
Send the specified string to a given device.
device | The device to which the command will be sent. |
command | The command to be sent to the device. |
Reimplemented from LibGPIB::GPIBController.
|
Set the EOS mode and character for the specified controller.
mode | The EOS mode will be set to this value. |
eos | The EOS character. |
Reimplemented from LibGPIB::GPIBController.
|
Set the IO timeout.
0 => no timeout.
|
Set the device in local mode.
device | The instrument to be set in local mode. |
read_bytes | The number of bytes to be read from the rd command |
Reimplemented from LibGPIB::GPIBController.
|
Variable used to store a backup copy of the EOS settings between SendCharPrefix and SendCharPostfix commands.
Definition at line 92 of file GPIB_232_CT_A.h.
|
Variable used to store a backup copy of the EOT settings between SendCharPrefix and SendCharPostfix commands.
Definition at line 86 of file GPIB_232_CT_A.h.
|
The serial port which will be used for communicating with GPIB_232_CT_A box.
Definition at line 80 of file GPIB_232_CT_A.h.
|
The name of the file that represents the serial port to be used.
For example, "/dev/ttyS0" on Linux.
Definition at line 74 of file GPIB_232_CT_A.h.