OpenTAP 9.27
API Reference
Public Member Functions | Properties | Events | List of all members
OpenTap.IScpiIO2 Interface Reference

Represents low-level IO primitives for a given SCPI instrument. IScpiIO2 is the full interface needed to specify a VISA connection. More...

Inheritance diagram for OpenTap.IScpiIO2:
OpenTap.IScpiIO OpenTap.ScpiIO

Public Member Functions

ScpiIOResult Open (string visaAddress, bool @lock)
 Opens a connection to the instrument. More...
 
ScpiIOResult Close ()
 Close the connection to the instrument. More...
 
void OpenSRQ ()
 Open SRQ Callback handling.
 
void CloseSRQ ()
 Close SRQ Callback handling.
 
- Public Member Functions inherited from OpenTap.IScpiIO
ScpiIOResult DeviceClear ()
 Clears the SCPI state, including any errors in the error queue.
 
ScpiIOResult ReadSTB (ref byte stb)
 Reads the status byte of the instrument. More...
 
ScpiIOResult Read (ArraySegment< byte > buffer, int count, ref bool eoi, ref int read)
 Reads a number of bytes from the instrument. More...
 
ScpiIOResult Write (ArraySegment< byte > buffer, int count, ref int written)
 Writes a number of bytes to the instrument. More...
 
ScpiIOResult Lock (ScpiLockType lockType, string sharedKey=null)
 Try to acquire a lock on the instrument. More...
 
ScpiIOResult Unlock ()
 Unlock an instrument.
 

Properties

int ID [get]
 Resource ID attached to this instrument.
 
- Properties inherited from OpenTap.IScpiIO
bool SendEnd [getset]
 Indicates whether a Write(ArraySegment<byte>, int, ref int) should generate an end-of-message indicator when writing its last byte.
 
int IOTimeoutMS [getset]
 Indicates the timeout in milliseconds for any of the IO operations.
 
int LockTimeoutMS [getset]
 Indicates the timeout in milliseconds for acquiring a lock.
 
byte TerminationCharacter [getset]
 Sets the termination character, if any.
 
bool UseTerminationCharacter [getset]
 Controls whether the IO operations should use a termination character.
 
string ResourceClass [get]
 Returns the resource class of the connected instrument.
 

Events

ScpiIOSrqDelegate SRQ
 Callback from SRQ instrument events.
 

Detailed Description

Represents low-level IO primitives for a given SCPI instrument. IScpiIO2 is the full interface needed to specify a VISA connection.

Member Function Documentation

◆ Close()

ScpiIOResult OpenTap.IScpiIO2.Close ( )

Close the connection to the instrument.

Returns
Visa Error code.

Implemented in OpenTap.ScpiIO.

◆ Open()

ScpiIOResult OpenTap.IScpiIO2.Open ( string  visaAddress,
bool @  lock 
)

Opens a connection to the instrument.

Parameters
visaAddressVisa address of the instrument.
lockif the instrument should be locked when the connection is established.
Returns
Visa error code.

OpenTAP 9.27 API built Wed Nov 27 2024 13:14:45