OpenTAP 9.24
API Reference
Public Member Functions | Properties | List of all members
OpenTap.IScpiIO Interface Reference

Represents low-level IO primitives for a given SCPI instrument. More...

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

Public Member Functions

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

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.
 

Detailed Description

Represents low-level IO primitives for a given SCPI instrument.

Member Function Documentation

◆ Lock()

ScpiIOResult OpenTap.IScpiIO.Lock ( ScpiLockType  lockType,
string  sharedKey = null 
)

Try to acquire a lock on the instrument.

Parameters
lockTypeIndicates which kind of lock should be acquired.
sharedKeyIn case the type of lock is

Implemented in OpenTap.ScpiIO.

◆ Read()

ScpiIOResult OpenTap.IScpiIO.Read ( ArraySegment< byte >  buffer,
int  count,
ref bool  eoi,
ref int  read 
)

Reads a number of bytes from the instrument.

Parameters
bufferThe target buffer to read to.
countThe number of bytes to read.
eoiThis will indicate whether an EOI indicator was received.
readThe number of bytes that was actually read if succesful.

Implemented in OpenTap.ScpiIO.

◆ ReadSTB()

ScpiIOResult OpenTap.IScpiIO.ReadSTB ( ref byte  stb)

Reads the status byte of the instrument.

Parameters
stbThe current status byte.

Implemented in OpenTap.ScpiIO.

◆ Write()

ScpiIOResult OpenTap.IScpiIO.Write ( ArraySegment< byte >  buffer,
int  count,
ref int  written 
)

Writes a number of bytes to the instrument.

The returned error code will indicate whether the EOI was sent.

Parameters
bufferThe buffer to write from.
countThe number of bytes to read.
writtenThe number of bytes that was actually written if succesful.

Implemented in OpenTap.ScpiIO.

OpenTAP 9.24 API built Tue Apr 30 2024 13:44:42