io library

dart:io-only additions for mcp_io_scpi.

Importing the main library keeps the package web-safe (ScpiAdapter

  • InMemoryScpiTransport only). Importing this io library opts in to TCP-based instrument transports — VXI-11 RPC today, raw TCP/Telnet additions land here in future phases.

Classes

AcceptStat
accept_stat values when the message was accepted.
AuthFlavor
Authentication flavours we recognise.
OncRpcRecord
Result of parseRecord on an incoming buffer.
OncRpcReply
Decoded ONC RPC reply.
ReplyStatus
Reply status (RFC 1057 §6.5.2).
Vxi11CreateLinkRequest
Vxi11CreateLinkResponse
Vxi11DestroyLinkRequest
Vxi11DestroyLinkResponse
Vxi11Flag
Operation flag bits (VPP-4.3 §B.4).
Vxi11Procedure
Vxi11ReadReason
Read termination reason bitfield (VPP-4.3 §B.6).
Vxi11ReadRequest
Vxi11ReadResponse
Vxi11ScpiTransport
Vxi11WriteRequest
Vxi11WriteResponse
XdrReader
XdrWriter

Constants

kVxi11ProgramCore → const int
Device Core program number.
kVxi11VersionCore → const int
Core channel version.

Functions

decodeReply(List<int> body) OncRpcReply
Decode an ONC RPC reply message body (without the record marker).
encodeCall({required int xid, required int program, required int version, required int procedure, required List<int> args}) Uint8List
Build a complete ONC RPC CALL message (no record marker — caller wraps via wrapRecord).
parseRecord(Uint8List bytes) OncRpcRecord?
Parse a single ONC RPC record from the head of bytes. Returns null when fewer than 4 header bytes have arrived, or when the declared payload length exceeds what's buffered.
wrapRecord(List<int> body) Uint8List
Wrap an RPC message body in an ONC RPC record marker (RFC 1057 §10) — last-fragment + length in a 4-byte big-endian header.

Exceptions / Errors

OncRpcError
XdrError