| THM1176InstrumentDriver 1.2 C++ API for Metrolab THM1176

Loading...
Searching...
No Matches
MTL::Instrument Namespace Reference

## Namespaces
namespace | THM1176Types

## Classes
class | CTHM1176Instrument
| THM1176 instrument class. More...
class | CSCPIBuffer
| Instrument Buffer. More...
class | CSCPIBufferParser
| SCPI buffer parser. More...
class | CVISAResourceManager
| VISA Resource Manager class. More...
class | CVISAInstrument
| VISA instrument class. More...
struct | sSerialPortSettings
| Serial port settings. More...
class | VISAResourceInfo
| Information about a VISA resource. More...
struct | sParsedResource
| Parsed information about a VISA resource. More...
class | CParsedResourceList
| Parsed resource information for a list of instruments. More...
class | CUSBTMCResourceManager
| USBTMC Resource Manager class. More...
class | CUSBTMCInstrument
| USBTMC instrument class. More...
class | CIEEE488ResourceManager
| IEEE488 Instrument Resource Manager class. More...
class | CIEEE488Instrument
| IEEE488 instrument class. More...
class | CResourceList
| List of VISA resource names. More...

## Typedefs
typedef ViUInt16 | tInterfaceNumber
| Interface number.
typedef std::string | tResourceName
| IEEE488 resource name.

## Enumerations
enum class | eInterfaceType { GPIB = VI_INTF_GPIB , VXI = VI_INTF_VXI , GPIB_VXI = VI_INTF_GPIB_VXI , ASRL = VI_INTF_ASRL , PXI = VI_INTF_PXI , TCPIP = VI_INTF_TCPIP , USB = VI_INTF_USB }
| VISA interface types. More...
enum class | eResourceClass { INSTR = 0 , MEMACC , INTFC , BACKPLANE , SERVANT , SOCKET , RAW }
| Classes of VISA resource. More...
enum class | eOpenAccessMode { NoLock = VI_NO_LOCK , ExclusiveLock = VI_EXCLUSIVE_LOCK , LoadConfig = VI_LOAD_CONFIG }
| Access modes for VISA resources. More...
enum class | eEventMechanism { Queue = VI_QUEUE , Handle = VI_HNDLR , Suspendedhandler = VI_SUSPEND_HNDLR , All = VI_ALL_MECH }
| Event mechanisms. More...
enum class | eEventType : unsigned long { ServiceRequest = VI_EVENT_SERVICE_REQ , Trig = VI_EVENT_TRIG , Clear = VI_EVENT_CLEAR , IOCompletion = VI_EVENT_IO_COMPLETION , Exception = VI_EVENT_EXCEPTION , GPIB_CIC = VI_EVENT_GPIB_CIC , GPIB_TALK = VI_EVENT_GPIB_TALK , GPIB_LISTEN = VI_EVENT_GPIB_LISTEN , VXI_VME_SYSFAIL = VI_EVENT_VXI_VME_SYSFAIL , VXI_VME_SYSRESET = VI_EVENT_VXI_VME_SYSRESET , VXI_SIGP = VI_EVENT_VXI_SIGP , VXI_VME_INTR = VI_EVENT_VXI_VME_INTR , PXI_INTR = VI_EVENT_PXI_INTR , TCPIP_CONNECT = VI_EVENT_TCPIP_CONNECT , USB_INTR = VI_EVENT_USB_INTR , ALL = VI_ALL_ENABLED_EVENTS }
| Event types. More...
enum class | eTriggerProtocol { Default = VI_TRIG_PROT_DEFAULT , VXI_Default = VI_TRIG_PROT_DEFAULT , VXI_On = VI_TRIG_PROT_ON , VXI_Off = VI_TRIG_PROT_OFF , VXI_Sync = VI_TRIG_PROT_SYNC , PXI_Reserve = VI_TRIG_PROT_RESERVE , PXI_Unreserve = VI_TRIG_PROT_UNRESERVE }
| Trigger protocols. More...
enum class | eSerialBaudrate { k110 = 110 , k300 = 300 , k600 = 600 , k1200 = 1200 , k2400 = 2400 , k4800 = 4800 , k9600 = 9600 , k14400 = 14400 , k19200 = 19200 , k28800 = 28800 , k38400 = 38400 , k57600 = 57600 , k115200 = 115200 , k230400 = 230400 , k460800 = 460800 , k921600 = 921600 }
| Serial baudrate. More...
enum class | eSerialDataBits { k7 = 7 , k8 = 8 }
| Number of data bits for the serial communication. More...
enum class | eSerialParity { kNone = VI_ASRL_PAR_NONE , kOdd = VI_ASRL_PAR_ODD , kEven = VI_ASRL_PAR_EVEN , kMark = VI_ASRL_PAR_MARK , kSpace = VI_ASRL_PAR_SPACE }
| Parity configuration for the serial communication. More...
enum class | eSerialStopBits { k1 = VI_ASRL_STOP_ONE , k1_5 = VI_ASRL_STOP_ONE5 , k2 = VI_ASRL_STOP_TWO }
| Stop bit configuration for the serial communication. More...
enum class | eSerialHandshake { kNone = VI_ASRL_FLOW_NONE , kXonXoff = VI_ASRL_FLOW_XON_XOFF , kHardware = VI_ASRL_FLOW_RTS_CTS , kHardAndSoft = (VI_ASRL_FLOW_XON_XOFF | VI_ASRL_FLOW_RTS_CTS) }
| Handshake configuration for the serial communication. More...
enum class | eSerialTermMode { kEndNone = VI_ASRL_END_NONE , kEndLast = VI_ASRL_END_LAST_BIT , kEndTermChar = VI_ASRL_END_TERMCHAR , kEndBreak = VI_ASRL_END_BREAK }
| Serial termination mode. More...

## Functions
std::string | StatusDescription (ViSession Session, ViStatus Status)
| Return user-readable description of the given status code.

## Variables
static const I32 | THM1176_NO_ANGLE_CORRECTION_CODE = 208
| Warning that angle correction was not applied.

## Typedef Documentation

## ◆ tInterfaceNumber

typedef ViUInt16 MTL::Instrument::tInterfaceNumber

Interface number.

Definition at line 35 of file VISAInstrumentTypes.h.

## ◆ tResourceName

typedef std::string MTL::Instrument::tResourceName

IEEE488 resource name.

Definition at line 22 of file IEEE488InstrumentTypes.h.

## Enumeration Type Documentation

## ◆ eEventMechanism

enum class MTL::Instrument::eEventMechanism
| strong

Event mechanisms.

Enumerator
Queue | Enable the session to queue events.
Handle | Enable the session to invoke a callback function.
Suspendedhandler | Enable the session to execute the handler.
All | Enable the session to all events.

Definition at line 56 of file VISAInstrumentTypes.h.

## ◆ eEventType

enum class MTL::Instrument::eEventType : unsigned long
| strong

Event types.

Enumerator
ServiceRequest | Service request was received from device or interface.
Trig | Trigger interrupt was received from the device.
Clear | Device clear message was sent to the local controller.
IOCompletion | Asynchronous operation has completed.
Exception | Error condition has occured during an operation.
GPIB_CIC | GPIB controller has gained or lost CIC (controller-in-charge) status.
GPIB_TALK | GPIB controller was addressed to talk.
GPIB_LISTEN | GPIB controller has been addressed to listen.
VXI_VME_SYSFAIL | VXI/VME SYSFAIL* line was asserted.
VXI_VME_SYSRESET | VXI/VME SYSRESET* line was asserted.
VXI_SIGP | VXIbus signal or VXIbus interrupt was received from the device.
VXI_VME_INTR | VXIbus interrupt was received from the device.
PXI_INTR | PXI interrupt occurred.
TCPIP_CONNECT | TCP/IP connection has been made.
USB_INTR | USB interrupt has occurred.
ALL | All enabled events.

Definition at line 64 of file VISAInstrumentTypes.h.

## ◆ eInterfaceType

enum class MTL::Instrument::eInterfaceType
| strong

VISA interface types.

Enumerator
GPIB | GPIB (a.k.a. HPIB or IEEE 488.1).
VXI | VXI (IEEE 488.2 over Ethernet).
GPIB_VXI | Ethernet GPIB adapter. (?).
ASRL | Serial.
PXI | PXI (PCI eXtensions for Instrumentation).
TCPIP | TCP/IP.
USB | USB.

Definition at line 25 of file VISAInstrumentTypes.h.

## ◆ eOpenAccessMode

enum class MTL::Instrument::eOpenAccessMode
| strong

Access modes for VISA resources.

Enumerator
NoLock | Open session without using an exclusive lock or loading configuration information.
ExclusiveLock | Acquire an exclusive lock immediately upon opening a session. If a lock cannot be acquired, the session is closed and an error is returned.
LoadConfig | Configure attributes to values specified by an external configuration utility.

Definition at line 49 of file VISAInstrumentTypes.h.

## ◆ eResourceClass

enum class MTL::Instrument::eResourceClass
| strong

Classes of VISA resource.

Enumerator
INSTR | Instrument.
MEMACC | Memory access.
INTFC | GPIB Bus Interface.
BACKPLANE | VXIbus Mainframe Backplane.
SERVANT | Device-side functionality.
SOCKET | Ethernet Socket.
RAW | USB Raw.

Definition at line 38 of file VISAInstrumentTypes.h.

## ◆ eSerialBaudrate

enum class MTL::Instrument::eSerialBaudrate
| strong

Serial baudrate.

Enumerator
k110 | 110 baud
k300 | 300 baud
k600 | 600 baud
k1200 | 1200 baud
k2400 | 2400 baud
k4800 | 4800 baud
k9600 | 9600 baud
k14400 | 14400 baud
k19200 | 19200 baud
k28800 | 28800 baud
k38400 | 38400 baud
k57600 | 57600 baud
k115200 | 115200 baud
k230400 | 230400 baud
k460800 | 460800 baud
k921600 | 921600 baud

Definition at line 114 of file VISAInstrumentTypes.h.

## ◆ eSerialDataBits

enum class MTL::Instrument::eSerialDataBits
| strong

Number of data bits for the serial communication.

Enumerator
k7 | 7 data bits
k8 | 8 data bits

Definition at line 133 of file VISAInstrumentTypes.h.

## ◆ eSerialHandshake

enum class MTL::Instrument::eSerialHandshake
| strong

Handshake configuration for the serial communication.

Enumerator
kNone | Set None.
kXonXoff | Set Software Handshake Xon/Xoff.
kHardware | Set Hardware Handshake RTS/CTS.
kHardAndSoft | Set Hardware & Software Handshake (Xon/Xoff & RTS/CTS).

Definition at line 153 of file VISAInstrumentTypes.h.

## ◆ eSerialParity

enum class MTL::Instrument::eSerialParity
| strong

Parity configuration for the serial communication.

Enumerator
kNone | Set Parity to None.
kOdd | Set Parity to Odd.
kEven | Set Parity to Even.
kMark | Set Parity to Mark.
kSpace | Set Parity to Space.

Definition at line 138 of file VISAInstrumentTypes.h.

## ◆ eSerialStopBits

enum class MTL::Instrument::eSerialStopBits
| strong

Stop bit configuration for the serial communication.

Enumerator
k1 | Set Stop bit to 1.
k1_5 | Set Stop bit to 1.5.
k2 | Set Stop bit to 2.

Definition at line 147 of file VISAInstrumentTypes.h.

## ◆ eSerialTermMode

enum class MTL::Instrument::eSerialTermMode
| strong

Serial termination mode.

Enumerator
kEndNone | Set termination character to None.
kEndLast | Set termination character to Last bit.
kEndTermChar | Set termination character to the one specified by VI_ATTR_TERMCHAR().
kEndBreak | Set termination character to Break (Only available in Write termination).

Definition at line 160 of file VISAInstrumentTypes.h.

## ◆ eTriggerProtocol

enum class MTL::Instrument::eTriggerProtocol
| strong

Trigger protocols.

- Software Triggers for 488.2 Instruments (GPIB, VXI, TCPIP, and USB)
  For software triggers, VI_TRIG_PROT_DEFAULT is the only valid protocol.
- For a GPIB device, VISA addresses the device to listen and then sends the GPIB GET command.
- For a VXI device, VISA sends the Word Serial Trigger command.
- For a USB device, VISA sends the TRIGGER message ID on the Bulk-OUT pipe.
- Software Triggers for Non-488.2 Instruments (Serial INSTR, TCPIP SOCKET, and USB RAW)
  If VI_ATTR_IO_PROT is VI_PROT_4882_STRS, this operations sends "*TRG\n" to the device; otherwise, this operation is not valid. For software triggers, VI_TRIG_PROT_DEFAULT is the only valid protocol.
- Hardware Triggering for VXI
  For hardware triggers to VXI instruments, VI_ATTR_TRIG_ID must first be set to the desired trigger line to use; this operation performs the specified trigger operation on the previously selected trigger line. For VXI hardware triggers, VI_TRIG_PROT_DEFAULT is equivalent to VI_TRIG_PROT_SYNC.
- Trigger Reservation for PXI
  For PXI instruments, this operation reserves or releases (unreserves) a trigger line for use in external triggering. For PXI triggers, VI_TRIG_PROT_RESERVE and VI_TRIG_PROT_UNRESERVE are the only valid protocols.

Reference: online documentation of viAssertTrigger (http://zone.ni.com/reference/en-XX/help/370131S-01/ni-visa/viasserttrigger/)

Enumerator
Default | Default protocol.
VXI_Default | Default protocol for VXI.
VXI_On | Asserts the trigger.
VXI_Off | Deasserts the trigger.
VXI_Sync | Pulses the trigger (assert followed by deassert).
PXI_Reserve | Reserve a trigger line.
PXI_Unreserve | Release a trigger line.

Definition at line 103 of file VISAInstrumentTypes.h.

## Function Documentation

## ◆ StatusDescription()

std::string MTL::Instrument::StatusDescription | ( | ViSession | Session,
|  | ViStatus | Status )

Return user-readable description of the given status code.

Parameters

  [in] | Session | VISA session.
  [in] | Status | Status code to be described.

Returns
  String with description of given status code.

Definition at line 42 of file VISAInstrument.cpp.

## Variable Documentation

## ◆ THM1176_NO_ANGLE_CORRECTION_CODE

const I32 MTL::Instrument::THM1176_NO_ANGLE_CORRECTION_CODE = 208
| static

Warning that angle correction was not applied.

This error code is in addition to those returned by the instrument itself (see Section 9-3, "Execution Errors," of the User Manual).

Definition at line 82 of file THM1176.h.