THM1176InstrumentManager  1.0
Qt Object abstraction for Metrolab THM1176
MTL::Instrument::CIEEE488Instrument Class Referenceabstract

IEEE488 instrument class. More...

#include <IEEE488Instrument.h>

Inheritance diagram for MTL::Instrument::CIEEE488Instrument:
Collaboration diagram for MTL::Instrument::CIEEE488Instrument:

Public Member Functions

 CIEEE488Instrument (CIEEE488ResourceManager &rRM, tResourceName Rsrc)
 Constructor. More...
 
virtual ~CIEEE488Instrument ()
 
virtual bool Open (void)=0
 Open a session to this IEEE488 instrument. More...
 
virtual void Close ()=0
 Close session to this instrument. More...
 
virtual bool IsOpen ()=0
 Check whether a session to this instrument is open. More...
 
I32 Status (void)
 
virtual std::string StatusDescription (I32 Status)=0
 Return description of status word. More...
 
virtual bool Timeout (void)=0
 Last operation timed out. More...
 
virtual bool Write (const char *Str)=0
 Write to a IEEE488 instrument: C string variant. More...
 
virtual bool Write (const std::string &rStr)=0
 Write to a IEEE488 instrument: C++ string variant. More...
 
virtual bool Write (const CSCPIBuffer &rBuf)=0
 Write to a IEEE488 instrument: SCPI buffer class variant. More...
 
virtual bool Read (CSCPIBuffer &rBuf, bool Append=false)=0
 Read from a IEEE488 instrument: SCPI buffer class variant. More...
 
bool SetTimeout (U32 Timeout)
 Set the timeout for this instrument. More...
 
U32 GetTimeout (void)
 Return the timeout for this instrument. More...
 
virtual bool Clear ()=0
 Clear the instrument. More...
 
virtual bool ReadSTB (U16 &rSTB)=0
 Read status byte. More...
 
virtual bool AssertTrigger (void)=0
 Assert a trigger. More...
 
virtual bool LockExclusive (U32 Timeout)=0
 Obtain an exclusive lock for this session. More...
 
virtual bool Unlock ()=0
 Unlock the session. More...
 
virtual bool LockedExclusive ()=0
 Check whether session is locked exclusively. More...
 

Protected Attributes

CRecursiveMutex m_Lock
 Lock onto the class interface. More...
 
CIEEE488ResourceManagerm_rRrsrcMan
 Reference to the associated resource manager. More...
 
tResourceName m_Rsrc
 Resource name of the instrument. More...
 
I32 m_Status
 Status of last operation. More...
 
U32 m_Timeout
 Timeout for operations. More...
 

Detailed Description

IEEE488 instrument class.

Definition at line 62 of file IEEE488Instrument.h.

Constructor & Destructor Documentation

◆ CIEEE488Instrument()

MTL::Instrument::CIEEE488Instrument::CIEEE488Instrument ( CIEEE488ResourceManager rRM,
tResourceName  Rsrc 
)
inline

Constructor.

Parameters
[in]rRMIEEE488 Instrument Resource Manager.
[out]RsrcIEEE488 resource name.

Definition at line 79 of file IEEE488Instrument.h.

◆ ~CIEEE488Instrument()

virtual MTL::Instrument::CIEEE488Instrument::~CIEEE488Instrument ( )
inlinevirtual

Definition at line 82 of file IEEE488Instrument.h.

Member Function Documentation

◆ AssertTrigger()

virtual bool MTL::Instrument::CIEEE488Instrument::AssertTrigger ( void  )
pure virtual

Assert a trigger.

Returns
True if successful.

Implemented in MTL::Instrument::CVISAInstrument, and MTL::Instrument::CUSBTMCInstrument.

◆ Clear()

virtual bool MTL::Instrument::CIEEE488Instrument::Clear ( )
pure virtual

Clear the instrument.

Implemented in MTL::Instrument::CUSBTMCInstrument, and MTL::Instrument::CVISAInstrument.

◆ Close()

virtual void MTL::Instrument::CIEEE488Instrument::Close ( )
pure virtual

Close session to this instrument.

Implemented in MTL::Instrument::CUSBTMCInstrument, and MTL::Instrument::CVISAInstrument.

◆ GetTimeout()

U32 MTL::Instrument::CIEEE488Instrument::GetTimeout ( void  )
inline

Return the timeout for this instrument.

Returns
Timeout value.

Definition at line 141 of file IEEE488Instrument.h.

◆ IsOpen()

virtual bool MTL::Instrument::CIEEE488Instrument::IsOpen ( )
pure virtual

Check whether a session to this instrument is open.

Implemented in MTL::Instrument::CUSBTMCInstrument, and MTL::Instrument::CVISAInstrument.

◆ LockedExclusive()

virtual bool MTL::Instrument::CIEEE488Instrument::LockedExclusive ( )
pure virtual

Check whether session is locked exclusively.

Implemented in MTL::Instrument::CUSBTMCInstrument, and MTL::Instrument::CVISAInstrument.

◆ LockExclusive()

virtual bool MTL::Instrument::CIEEE488Instrument::LockExclusive ( U32  Timeout)
pure virtual

Obtain an exclusive lock for this session.

Parameters
[in]TimeoutTimeout value, in ms.
Returns
True if successful.

Implemented in MTL::Instrument::CVISAInstrument, and MTL::Instrument::CUSBTMCInstrument.

◆ Open()

virtual bool MTL::Instrument::CIEEE488Instrument::Open ( void  )
pure virtual

Open a session to this IEEE488 instrument.

Returns
True if successful.

Implemented in MTL::Instrument::CVISAInstrument, and MTL::Instrument::CUSBTMCInstrument.

◆ Read()

virtual bool MTL::Instrument::CIEEE488Instrument::Read ( CSCPIBuffer rBuf,
bool  Append = false 
)
pure virtual

Read from a IEEE488 instrument: SCPI buffer class variant.

Parameters
[in]rBufBuffer to receive the data.
[in]AppendWhether to append to the existing data.
Returns
True if successful.

Implemented in MTL::Instrument::CVISAInstrument, and MTL::Instrument::CUSBTMCInstrument.

◆ ReadSTB()

virtual bool MTL::Instrument::CIEEE488Instrument::ReadSTB ( U16 rSTB)
pure virtual

Read status byte.

Parameters
[out]rSTBStatus byte.
Returns
True if successful.

Implemented in MTL::Instrument::CVISAInstrument, and MTL::Instrument::CUSBTMCInstrument.

◆ SetTimeout()

bool MTL::Instrument::CIEEE488Instrument::SetTimeout ( U32  Timeout)
inline

Set the timeout for this instrument.

Parameters
[in]TimeoutTimeout for operations during this session, in ms.
Returns
True if successful.

Definition at line 132 of file IEEE488Instrument.h.

◆ Status()

I32 MTL::Instrument::CIEEE488Instrument::Status ( void  )
inline

Definition at line 93 of file IEEE488Instrument.h.

◆ StatusDescription()

virtual std::string MTL::Instrument::CIEEE488Instrument::StatusDescription ( I32  Status)
pure virtual

Return description of status word.

Parameters
[in]StatusStatus word.
Returns
Status description.

Implemented in MTL::Instrument::CVISAInstrument, and MTL::Instrument::CUSBTMCInstrument.

◆ Timeout()

virtual bool MTL::Instrument::CIEEE488Instrument::Timeout ( void  )
pure virtual

Last operation timed out.

Implemented in MTL::Instrument::CUSBTMCInstrument, and MTL::Instrument::CVISAInstrument.

◆ Unlock()

virtual bool MTL::Instrument::CIEEE488Instrument::Unlock ( )
pure virtual

Unlock the session.

Implemented in MTL::Instrument::CUSBTMCInstrument, and MTL::Instrument::CVISAInstrument.

◆ Write() [1/3]

virtual bool MTL::Instrument::CIEEE488Instrument::Write ( const char *  Str)
pure virtual

Write to a IEEE488 instrument: C string variant.

Parameters
[in]StrData to write.
Returns
True if successful.

Implemented in MTL::Instrument::CVISAInstrument, and MTL::Instrument::CUSBTMCInstrument.

◆ Write() [2/3]

virtual bool MTL::Instrument::CIEEE488Instrument::Write ( const CSCPIBuffer rBuf)
pure virtual

Write to a IEEE488 instrument: SCPI buffer class variant.

Parameters
[in]rBufData to write.
Returns
True if successful.

Implemented in MTL::Instrument::CVISAInstrument, and MTL::Instrument::CUSBTMCInstrument.

◆ Write() [3/3]

virtual bool MTL::Instrument::CIEEE488Instrument::Write ( const std::string &  rStr)
pure virtual

Write to a IEEE488 instrument: C++ string variant.

Parameters
[in]rStrData to write.
Returns
True if successful.

Implemented in MTL::Instrument::CVISAInstrument, and MTL::Instrument::CUSBTMCInstrument.

Member Data Documentation

◆ m_Lock

CRecursiveMutex MTL::Instrument::CIEEE488Instrument::m_Lock
mutableprotected

Lock onto the class interface.

Definition at line 68 of file IEEE488Instrument.h.

◆ m_rRrsrcMan

CIEEE488ResourceManager& MTL::Instrument::CIEEE488Instrument::m_rRrsrcMan
protected

Reference to the associated resource manager.

Definition at line 69 of file IEEE488Instrument.h.

◆ m_Rsrc

tResourceName MTL::Instrument::CIEEE488Instrument::m_Rsrc
protected

Resource name of the instrument.

Definition at line 70 of file IEEE488Instrument.h.

◆ m_Status

I32 MTL::Instrument::CIEEE488Instrument::m_Status
protected

Status of last operation.

Definition at line 71 of file IEEE488Instrument.h.

◆ m_Timeout

U32 MTL::Instrument::CIEEE488Instrument::m_Timeout
protected

Timeout for operations.

Definition at line 72 of file IEEE488Instrument.h.


The documentation for this class was generated from the following file: