Main Page | Namespace List | Class List | File List | Namespace Members | Class Members | Examples

INdepGpib100::GpibControl Class Reference

GPIB user base class (Controller). More...

#include <gu_c.hxx>

List of all members.

Public Member Functions

ErrE eErr () const
bool isErr (ErrE e) const
 GpibControl (Umi::Factory *puf)
 GpibControl (Umi::Umi *pum)
Interface Initialization Functions
GpibControlopen (bool fSc, const GpibAddress &ga)
 open the GPIB interface

GpibControlclose ()
 close the GPIB interface.

Low-Level GPIB Control Operations
Lightweight operations that provide complete capabilities at a low abstraction level.

GpibControlupdateStb (const GpibSta &gst)
 488.2 11.3.3.4.1 conformant stb generation

GpibControlifc (const Umi::Time &ti=Umi::Time(0, 100000))
 send Interface Clear.

GpibControlren (bool f)
 Set Remote Enable according to f.

GpibControlcac (bool fSync)
 Make the interface the active controller.

GpibControlgts ()
 Make the active controller go to standby.

GpibControlist (bool f)
 individual status set

GpibControliblinec (unsigned *pCap)
 capability to sense lines

GpibControliblines (unsigned *pStat)
 sense lines

GpibControlrtl ()
 return to local

GpibControlppc (int v)
 local pp config

GpibControlrpp (unsigned char *chPpr, const Umi::Time &ti=Umi::Time())
 request parallel ppoll

GpibControlwait (StatE fStat, const Umi::Time &ti, bool fIgnTmo=false)
 wait for any specified flag or event active, failes on timeout

StatE fStat ()
 Return the interface status flags.

Low-Level GPIB I/O Operations
Lightweight operations that provide complete capabilities at a low abstraction level.

All transfer functions return the count actually transfered, even on failure

int cmd (const char *pch, int c, const Umi::Time &ti)
 command byte transfer.

int cwr (const char *pch, int c, const Umi::Time &ti, const GpibTermOut &gto)
 data byte transfer

int cwr (const char *pch1, int c1, const char *pch2, int c2, const Umi::Time &ti, const GpibTermOut &)
 data byte transfer, like cwr() but with pch1 and pch2 concatenated

int crd (char *pch, int c, const Umi::Time &ti, const GpibTermIn &gti, DelE *peDel=0)
 conducted read transfer

Configuration and Status Queries
bool isSc ()
 system controller

int iPa ()
 primary GPIB address of this interface

int iSa ()
 secondary GPIB address of this interface (if fSa())

bool fSa ()
 secondary GPIB addressing enabled for this interface

const GpibAddressga () const
 GpibAddress of this interface.

int iPaLast ()
 most recent sent foreign primary address

void clrPaLast (int i)
 set iPaLast()

int isOpen ()
 true if the interface is currently opended

IEEE488.2 conformant functions and protocols.
These functions and protocols are specified in the IEEE488.2 standard to provide a vendor-independent set of operations.

GpibControlsendCmds (const char *, unsigned *pc, const Umi::Time &ti=Umi::Time(10))
 IEEE488.2 - 16.2.1 - SEND COMMAND.

GpibControlsendSetup (const GpibAddrList &al, const Umi::Time &ti=Umi::Time(10))
 IEEE488.2 - 16.2.2 - SEND SETUP.

GpibControlsendDataBytes (const char *, unsigned *pc, const char *szTerm="\n", const GpibTermOut &gto=GpibTermOut().fEnd(true), const Umi::Time &ti=Umi::Time(10))
 IEEE488.2 - 16.2.3 - SEND DATA BYTES.

GpibControlsend (const GpibAddress &, const char *, unsigned *pc, const char *szTerm="\n", const GpibTermOut &gto=GpibTermOut().fEnd(true), const Umi::Time &ti=Umi::Time(10))
 IEEE488.2 - 16.2.4 - SEND.

GpibControlsend (const GpibAddrList &, const char *, unsigned *pc, const char *szTerm="\n", const GpibTermOut &gto=GpibTermOut().fEnd(true), const Umi::Time &ti=Umi::Time(10))
 IEEE488.2 - 16.2.4 - SEND (list).

GpibControlsendsz (const GpibAddress &ga, const char *pch, const char *szTerm="\n", const GpibTermOut &gto=GpibTermOut().fEnd(true), const Umi::Time &ti=Umi::Time(10))
 IEEE488.2 - 16.2.4 - SEND (C string, '\0' terminated).

GpibControlreceiveSetup (const GpibAddress &ga, const Umi::Time &ti=Umi::Time(10))
 IEEE488.2 - 16.2.5 - RECEIVE SETUP.

GpibControlrcvRespMsg (char *, unsigned *pc, const GpibTermIn &gti=GpibTermIn(), const Umi::Time &ti=Umi::Time(10), DelE *peDel=0)
 IEEE488.2 - 16.2.6 - RECEIVE RESPONSE MESSAGE.

GpibControlreceive (char *, unsigned *pc, const GpibAddress &, const GpibTermIn &gti=GpibTermIn(), const Umi::Time &ti=Umi::Time(10), DelE *peDel=0)
 IEEE488.2 - 16.2.7 - RECEIVE.

GpibControlsendIfc ()
 IEEE488.2 - 16.2.8 - SEND IFC.

GpibControldevClear (const GpibAddrList &al, const Umi::Time &ti=Umi::Time(10))
 IEEE488.2 - 16.2.9.1 - DEVICE CLEAR SELECTED (list).

GpibControlclear (const GpibAddress &gad, const Umi::Time &ti=Umi::Time(10))
 IEEE488.2 - 16.2.9.1 - DEVICE CLEAR SELECTED.

GpibControldevClear (const Umi::Time &ti=Umi::Time(10))
 IEEE488.2 - 16.2.9.2 - DEVICE CLEAR ALL.

GpibControlenableLocal (const GpibAddrList &al, const Umi::Time &ti=Umi::Time(10))
 IEEE488.2 - 16.2.10 - ENABLE LOCAL CONTROLS (list).

GpibControlenableLocal ()
 IEEE488.2 - 16.2.10 - ENABLE LOCAL CONTROLS (all).

GpibControlenableRemote (const GpibAddrList &al, const Umi::Time &ti=Umi::Time(10))
 IEEE488.2 - 16.2.11 - ENABLE REMOTE.

GpibControlsetRWLS (const GpibAddrList &al, const Umi::Time &ti=Umi::Time(10))
 IEEE488.2 - 16.2.12 - SET RWLS.

GpibControlsendLLO (const Umi::Time &ti=Umi::Time(10))
 IEEE488.2 - 16.2.13 - SEND LLO.

GpibControlpassControl (const GpibAddress &al, const Umi::Time &ti=Umi::Time(10))
 IEEE488.2 - 16.2.14 - PASS CONTROL.

GpibControlppoll (unsigned *puRes, const Umi::Time &ti=Umi::Time(0))
 IEEE488.2 - 16.2.15 - PPOLL.

GpibControlppollConfig (const GpibAddress &ga, int iLine, int iSense, const Umi::Time &ti=Umi::Time(10))
 IEEE488.2 - 16.2.16 - PARALLEL POLL CONFIGURE.

GpibControlppollUnconfig (const GpibAddrList &ga, const Umi::Time &ti=Umi::Time(10))
 IEEE488.2 - 16.2.17 - PARALLEL POLL UNCONFIGURE (list).

GpibControlppollUnconfig (const Umi::Time &ti=Umi::Time(10))
 IEEE488.2 - 16.2.17 - PARALLEL POLL UNCONFIGURE.

GpibControlreadStatusByte (char *pch, const GpibAddress &gad, const Umi::Time &ti=Umi::Time(10))
 IEEE488.2 - 16.2.18 - READ STATUS BYTE.

GpibControltrigger (const GpibAddrList &ga, const Umi::Time &ti=Umi::Time(10))
 IEEE488.2 - 16.2.19 - TRIGGER.

GpibControlreset (const GpibAddrList &ga, const Umi::Time &ti=Umi::Time(10))
 IEEE488.2 - 17.1 - RESET.

GpibControlfindRqs (char *pch, GpibAddrList::const_iterator *pit, const GpibAddrList &ga, const Umi::Time &ti=Umi::Time(10))
 IEEE488.2 - 17.2 - FINDRQS.

GpibControlallSpoll (GpibStbList *pgs, const GpibAddrList &ga, const Umi::Time &ti=Umi::Time(10))
 IEEE488.2 - 17.3 - ALLSPOLL.

GpibControlfindLstn (GpibAddrList *pga, const GpibAddrList &ga, const Umi::Time &tiSettle=Umi::Time(0, 1000000), const Umi::Time &ti=Umi::Time(10))
 IEEE488.2 - 17.6 - FINDLSTN.

GpibControltestSys (GpibResList *prl, const GpibAddrList &ga, const Umi::Time &ti=Umi::Time(10))
 IEEE488.2 - 17.8 - TESTSYS.


Detailed Description

GPIB user base class (Controller).

provides imperative functions for conducting the bus activity.

Errors:

Any error in communicating with one of the UMI driver channels results in a BAD condition, i.e. this object is unusable (isBad()).

Errors returned by the UMI driver channel are related to the failed transaction only, i.e. another transaction may be started. (isFail()).

Examples:

k195a.cxx.


Member Function Documentation

GpibControl& INdepGpib100::GpibControl::cac bool  fSync  ) 
 

Make the interface the active controller.

Parameters:
fSync Take control synchronously if set. The interface must be the controller-in-charge (CIC) in order to execute this command.

GpibControl& INdepGpib100::GpibControl::close  ) 
 

close the GPIB interface.

The interface will be offline (i.e. not executing the GPIB protocol) after a successful return.

Examples:
k195a.cxx.

int INdepGpib100::GpibControl::cmd const char *  pch,
int  c,
const Umi::Time &  ti
 

command byte transfer.

Parameters:
pch command byte array
c count of bytes in pch
ti per byte timeout.
Returns:
count of bytes transfered
The interface must be the controller-in-charge (CIC) in order to execute this command. Commands are data bytes sent with the GPIB control line ATN true.
Examples:
k195a.cxx.

int INdepGpib100::GpibControl::crd char *  pch,
int  c,
const Umi::Time &  ti,
const GpibTermIn gti,
DelE *  peDel = 0
 

conducted read transfer

Parameters:
pch data byte array
c maximum count to be read (never more than the count of bytes in pch)
ti per byte timeout.
gti input termination mode
Returns:
count of bytes transfered
Return values:
peDel if nonzero, set to the input terminator: ' ' = not delimited, 'e' = eos (~EOI) delimited, 'E' = EOI delimited
crd() reads at most c bytes. If a device read has been interrupted by a E_CLR failure, E_DCAS is cleared and returned in the status word.

int INdepGpib100::GpibControl::cwr const char *  pch,
int  c,
const Umi::Time &  ti,
const GpibTermOut gto
 

data byte transfer

Parameters:
pch data byte array
c count of bytes in pch
ti per byte timeout.
gto output termination mode
Returns:
count of bytes transfered
The interface must be addressed as a talker in order to send data bytes.

StatE INdepGpib100::GpibControl::fStat  )  [inline]
 

Return the interface status flags.

Any successful operation updates the status flags.

GpibControl& INdepGpib100::GpibControl::gts  ) 
 

Make the active controller go to standby.

The interface must be the controller-in-charge (CIC) in order to execute this command.

GpibControl& INdepGpib100::GpibControl::ifc const Umi::Time &  ti = Umi::Time(0, 100000)  ) 
 

send Interface Clear.

The interface must be system controller to execute this command

Examples:
k195a.cxx.

GpibControl& INdepGpib100::GpibControl::open bool  fSc,
const GpibAddress ga
 

open the GPIB interface

Parameters:
ga GPIB address of the interface
fSc If true, the interface becomes the system controller After a successful return from open(), the interface is online (i.e. executing the GPIB protocol ).
Examples:
k195a.cxx.

GpibControl& INdepGpib100::GpibControl::ren bool  f  ) 
 

Set Remote Enable according to f.

The interface must be system controller to execute this command.

Examples:
k195a.cxx.

GpibControl& INdepGpib100::GpibControl::wait StatE  fStat,
const Umi::Time &  ti,
bool  fIgnTmo = false
 

wait for any specified flag or event active, failes on timeout

Parameters:
fStat status bits to wait for
ti time limit
fIgnTmo don't return error on timeout
For any unmasked flag in fWait, wait() returns when the flag is set.

For any unmasked event, wait() returns when at least one false-to-true transition has been detected since the most recent call to wait() with that event unmasked.

If no mask bit is set, wait() returns after ti has elapsed, updating the current status word.

if fIgnTmo is set, the E_TMO is not set on timeout.


The documentation for this class was generated from the following file:
Generated on Wed Jul 18 16:50:58 2007 for gpibapi by doxygen 1.3.6