|
ProtoCore v0.0.1
Deterministic, zero-heap network stack for embedded targets
|
Layer: L7 Application ยท Build flags: PC_ENABLE_VXI11
VXI-11 is the LAN eXtensions for Instrumentation transport that predates HiSLIP - still the fallback for a large installed base of LAN instruments. It rides on ONC RPC (Sun RPC) with XDR encoding over TCP. services/vxi11 is a pure codec: it builds the RPC calls and parses the replies; the sketch owns the sockets and runs the standard session.
The instrument channel is on a dynamic port, so you first ask the portmapper (TCP 111):
Then open a link, write a SCPI command, and read the reply - each call is XDR over an ONC-RPC record mark:
The reusable ONC-RPC framing (pc_rpc_record_mark, pc_rpc_parse_reply) and the XDR layout (big-endian, 4-byte aligned, length-prefixed opaque/string) are verified against the VXI-11 spec + RFC 5531 / 4506 / 1833, with a byte-exact create_link vector. Pair with PC_ENABLE_SCPI to build / parse the SCPI payloads themselves (see the Scpi example).
Point INSTRUMENT_IP at a real VXI-11 / LXI instrument, or run a python-vxi11 server for a dry run (it registers with the host's rpcbind/portmapper on 111).
Flash and watch Serial @ 115200:
The complete sketch is Vxi11.ino. The codec itself is in src/services/instrumentation/vxi11/vxi11.h; the XDR struct layouts, procedure numbers, and the ONC-RPC call/reply headers are verified against the VXI-11 specification and RFC 5531 / 4506 / 1833 (cross-checked with python-vxi11 and the Wireshark dissector).