Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

LibGPIB::GPIB_232_CT_A Class Reference

#include <GPIB_232_CT_A.h>

Inheritance diagram for LibGPIB::GPIB_232_CT_A:

LibGPIB::GPIBController LibGPIB::iostream List of all members.

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.


Constructor & Destructor Documentation

LibGPIB::GPIB_232_CT_A::GPIB_232_CT_A ( string serial_port ) [inline]

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.

LibGPIB::GPIB_232_CT_A::~GPIB_232_CT_A ( ) [inline, virtual]

The destructor.

Definition at line 114 of file GPIB_232_CT_A.h.


Member Function Documentation

virtual void LibGPIB::GPIB_232_CT_A::BecomeActiveController ( bool synchronously = true ) [virtual]

Become the active controller of the bus.

Parameters:
synchronously   If true then the controller becomes the active controller synchronously. Otherwise, the controller takes over the bus immediately.

Reimplemented from LibGPIB::GPIBController.

virtual void LibGPIB::GPIB_232_CT_A::ClearDevice ( GPIBEquipment & device ) [virtual]

Send a clear signal to a specific device.

Parameters:
device   The GPIB instrument to which the clear signal is to be sent.

Reimplemented from LibGPIB::GPIBController.

virtual void LibGPIB::GPIB_232_CT_A::Close ( ) [virtual]

Close the specified GPIBController stream.

No communications can occur once the GPIBController stream is closed.

Reimplemented from LibGPIB::GPIBController.

void LibGPIB::GPIB_232_CT_A::DiscardCRLF ( ) [inline, private]

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.

const string LibGPIB::GPIB_232_CT_A::Identify ( )

Identify the system.

virtual void LibGPIB::GPIB_232_CT_A::Open ( ) [virtual]

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.

virtual ostream& LibGPIB::GPIB_232_CT_A::ReadCharPostfix ( int primary_address,
int secondary_address = 0 ) [protected, virtual]

A manipulator called after reading a character from a GPIBEquipment.

Reimplemented from LibGPIB::GPIBController.

virtual ostream& LibGPIB::GPIB_232_CT_A::ReadCharPrefix ( int primary_address,
int secondary_address = 0 ) [protected, virtual]

A manipulator called before reading a character from a GPIBEquipment.

Reimplemented from LibGPIB::GPIBController.

virtual const string LibGPIB::GPIB_232_CT_A::ReadData ( GPIBEquipment & device,
int read_bytes ) [virtual]

Read data from the specified device.

Parameters:
device   The instrument from which data is to be read.

Returns:
The data read from the device as a string.

Reimplemented from LibGPIB::GPIBController.

virtual ostream& LibGPIB::GPIB_232_CT_A::SendCharPostfix ( int primary_address,
int secondary_address = 0 ) [protected, virtual]

A manipulator called after sending a character to a GPIBEquipment.

Reimplemented from LibGPIB::GPIBController.

virtual ostream& LibGPIB::GPIB_232_CT_A::SendCharPrefix ( int primary_address,
int secondary_address = 0 ) [protected, virtual]

A manipulator called before sending a character to a GPIBEquipment.

Reimplemented from LibGPIB::GPIBController.

virtual void LibGPIB::GPIB_232_CT_A::SendCommand ( GPIBEquipment & device,
string command ) [virtual]

Send the specified string to a given device.

Parameters:
device   The device to which the command will be sent.
command   The command to be sent to the device.

Reimplemented from LibGPIB::GPIBController.

virtual void LibGPIB::GPIB_232_CT_A::SetEOSModeAndChar ( EOSModeVal mode,
char eos ) [virtual]

Set the EOS mode and character for the specified controller.

Parameters:
mode   The EOS mode will be set to this value.
eos   The EOS character.

Reimplemented from LibGPIB::GPIBController.

void LibGPIB::GPIB_232_CT_A::SetIOTimeout ( float timeout )

Set the IO timeout.

0 => no timeout.

virtual void LibGPIB::GPIB_232_CT_A::SetLocal ( GPIBEquipment & device ) [virtual]

Set the device in local mode.

Parameters:
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.


Member Data Documentation

string LibGPIB::GPIB_232_CT_A::mEOSSetting [private]

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.

int LibGPIB::GPIB_232_CT_A::mEOT [private]

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.

LibSerial::SerialStream LibGPIB::GPIB_232_CT_A::mSerialPort [private]

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.

string LibGPIB::GPIB_232_CT_A::mSerialPortFile [private]

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.


The documentation for this class was generated from the following file:
Generated at Tue Aug 8 01:37:56 2000 for libgpib by doxygen1.1.4 written by Dimitri van Heesch, © 1997-2000