A device's timeout_ms bounds no I/O. The only code that reads device.Timeout is the pool, which uses it to bound the wait for a device another session has leased (PoolingBackendFactory). No backend reads it.
- Local backend (VISA runtime).
LocalBackend.OpenAsync opens every session with _openTimeout, 5 seconds by default (L31), and VisaSessionFactory.Open sets the session's I/O timeout, TimeoutMilliseconds, to that same value. Every read and write through a VISA runtime therefore times out after 5 seconds, whatever timeout_ms says: a longer measurement always fails, and a shorter timeout meant to fail fast waits 5 seconds.
- HiSLIP, VXI-11 and SOCKET backends. None of them references the device's timeout, and a search of
src/ finds no CancelAfter on their query or read paths. How long a read waits for an instrument that never answers is then up to the transport and the caller's cancellation token; that needs measuring per backend.
Expected: timeout_ms bounds each read and write on every backend. visa add --timeout-ms and the Device record both describe it as the "per-device default operation timeout". Whether opening a session uses the same value or a bound of its own is worth deciding while fixing this.
A device's
timeout_msbounds no I/O. The only code that readsdevice.Timeoutis the pool, which uses it to bound the wait for a device another session has leased (PoolingBackendFactory). No backend reads it.LocalBackend.OpenAsyncopens every session with_openTimeout, 5 seconds by default (L31), andVisaSessionFactory.Opensets the session's I/O timeout,TimeoutMilliseconds, to that same value. Every read and write through a VISA runtime therefore times out after 5 seconds, whatevertimeout_mssays: a longer measurement always fails, and a shorter timeout meant to fail fast waits 5 seconds.src/finds noCancelAfteron their query or read paths. How long a read waits for an instrument that never answers is then up to the transport and the caller's cancellation token; that needs measuring per backend.Expected:
timeout_msbounds each read and write on every backend.visa add --timeout-msand theDevicerecord both describe it as the "per-device default operation timeout". Whether opening a session uses the same value or a bound of its own is worth deciding while fixing this.