]> sigrok.org Git - libsigrok.git/commitdiff
scpi_tcp: use common TCP support in SCPI transport (tcp-raw, tcp-rigol)
authorGerhard Sittig <redacted>
Sun, 24 Sep 2023 08:42:00 +0000 (10:42 +0200)
committerGerhard Sittig <redacted>
Mon, 25 Sep 2023 17:30:18 +0000 (19:30 +0200)
Use the recently added sr_tcp_dev_inst approach to TCP communication in
the tcp-raw and tcp-rigol SCPI transports. Eliminates redundancy in the
implementation.

Address style nits in the process: Use size types for length specs. Be
explicit about bytes and character conversions: Bytes are sent across
the TCP socket, while SCPI exchange typically involves text messages.
The previously used send(2) and recv(2) calls just passed void pointers.

Comment on the specific semantics of Rigol length specs that preceed the
response data. And how raw TCP attempts to determine the completion of a
reception while this length spec is absent. The previous implementation
would not reveal the motivation of this non-trivial logic.


No differences found