| THM1176InstrumentManager 1.2 Qt Object abstraction for Metrolab THM1176

Loading...
Searching...
No Matches
MTL::Instrument::CIEEE488Instrument Class Referenceabstract

IEEE488 instrument class. More...

`#include <IEEE488Instrument.h>`

Inheritance diagram for MTL::Instrument::CIEEE488Instrument:
[legend]
Collaboration diagram for MTL::Instrument::CIEEE488Instrument:
[legend]

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

## Protected Attributes
CRecursiveMutex | m_Lock
| Lock onto the class interface.
CIEEE488ResourceManager & | m_rRrsrcMan
| Reference to the associated resource manager.
tResourceName | m_Rsrc
| Resource name of the instrument.
I32 | m_Status
| Status of last operation.
U32 | m_Timeout
| Timeout for operations.

## Static Protected Attributes
static const I32 | IEEE488_DEFAULT_TIMEOUT = 100
| Default timeout (ms).

## 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] | rRM | IEEE488 Instrument Resource Manager.
  [out] | Rsrc | IEEE488 resource name.

Definition at line 79 of file IEEE488Instrument.h.

## ◆ ~CIEEE488Instrument()

virtual MTL::Instrument::CIEEE488Instrument::~CIEEE488Instrument | ( |  | ) |
| inline virtual

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::CUSBTMCInstrument, and MTL::Instrument::CVISAInstrument.

## ◆ 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.

## ◆ DisableEvent()

virtual bool MTL::Instrument::CIEEE488Instrument::DisableEvent | ( | void |  | ) |
| pure virtual

Disable service requests.

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

## ◆ DiscardEvents()

virtual bool MTL::Instrument::CIEEE488Instrument::DiscardEvents | ( | void |  | ) |
| pure virtual

Discard service requests.

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

## ◆ EnableEvent()

virtual bool MTL::Instrument::CIEEE488Instrument::EnableEvent | ( | void |  | ) |
| pure virtual

Enable service requests.

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] | Timeout | Timeout value, in ms.

Returns
  True if successful.

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

## ◆ 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::CUSBTMCInstrument, and MTL::Instrument::CVISAInstrument.

## ◆ 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] | rBuf | Buffer to receive the data.
  [in] | Append | Whether to append to the existing data.

Returns
  True if successful.

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

## ◆ ReadSTB()

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

Read status byte.

Parameters

  [out] | rSTB | Status byte.

Returns
  True if successful.

Implemented in MTL::Instrument::CUSBTMCInstrument.

## ◆ SetTimeout()

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

Set the timeout for this instrument.

Parameters

  [in] | Timeout | Timeout 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] | Status | Status word.

Returns
  Status description.

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

## ◆ 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.

## ◆ WaitOnEvent()

virtual bool MTL::Instrument::CIEEE488Instrument::WaitOnEvent | ( | U32 | Timeout | ) |
| pure virtual

Wait for a service request.

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] | Str | Data to write.

Returns
  True if successful.

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

## ◆ 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] | rBuf | Data to write.

Returns
  True if successful.

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

## ◆ 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] | rStr | Data to write.

Returns
  True if successful.

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

## Member Data Documentation

## ◆ IEEE488_DEFAULT_TIMEOUT

const I32 MTL::Instrument::CIEEE488Instrument::IEEE488_DEFAULT_TIMEOUT = 100
| static protected

Default timeout (ms).

Definition at line 65 of file IEEE488Instrument.h.

## ◆ m_Lock

CRecursiveMutex MTL::Instrument::CIEEE488Instrument::m_Lock
| mutable protected

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:

- Common/IEEE488Instrument/include/IEEE488Instrument.h