THM1176InstrumentDriver  1.0
C++ API for Metrolab THM1176
MTL::Instrument Namespace Reference

Namespaces

 THM1176Types
 

Classes

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

Typedefs

typedef ViUInt16 tInterfaceNumber
 Interface number. More...
 
typedef std::string tResourceName
 IEEE488 resource name. More...
 

Enumerations

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

Variables

static const I32 THM1176_NO_ANGLE_CORRECTION_CODE = 208
 Warning that angle correction was not applied. More...
 

Typedef Documentation

◆ 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

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 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

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

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

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

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

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

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

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

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

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

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]SessionVISA session.
[in]StatusStatus 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 83 of file THM1176.h.