OpenTAP 9.27
API Reference
|
Represents low-level IO primitives for a given SCPI instrument. More...
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. | |
Represents low-level IO primitives for a given SCPI instrument.
ScpiIOResult OpenTap.IScpiIO.Lock | ( | ScpiLockType | lockType, |
string | sharedKey = null |
||
) |
Try to acquire a lock on the instrument.
lockType | Indicates which kind of lock should be acquired. |
sharedKey | In case the type of lock is |
Implemented in OpenTap.ScpiIO.
ScpiIOResult OpenTap.IScpiIO.Read | ( | ArraySegment< byte > | buffer, |
int | count, | ||
ref bool | eoi, | ||
ref int | read | ||
) |
Reads a number of bytes from the instrument.
buffer | The target buffer to read to. |
count | The number of bytes to read. |
eoi | This will indicate whether an EOI indicator was received. |
read | The number of bytes that was actually read if succesful. |
Implemented in OpenTap.ScpiIO.
ScpiIOResult OpenTap.IScpiIO.ReadSTB | ( | ref byte | stb | ) |
Reads the status byte of the instrument.
stb | The current status byte. |
Implemented in OpenTap.ScpiIO.
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.
buffer | The buffer to write from. |
count | The number of bytes to read. |
written | The number of bytes that was actually written if succesful. |
Implemented in OpenTap.ScpiIO.
OpenTAP 9.27 API built Wed Nov 27 2024 13:14:45