]> sigrok.org Git - libsigrok.git/commit
serial: introduce support for raw TCP communication (send/recv bytes)
authorGerhard Sittig <redacted>
Sun, 24 Sep 2023 08:27:31 +0000 (10:27 +0200)
committerGerhard Sittig <redacted>
Mon, 25 Sep 2023 17:30:18 +0000 (19:30 +0200)
commitc4f0fdab273bcf4c06444a05be296e8d04c6d7a9
treef454115901766430de1ed09fab8f3b5d61714d50
parent4fd492230daa3be9be59cabe81ddcf8167a37654
serial: introduce support for raw TCP communication (send/recv bytes)

Add support for "conn=tcp-raw/<ip>/<port>" specs for serial transports.
This is consistent with previously existing SCPI transports, and is
compatible because there has not been TCP communication outside of SCPI
so far.

This implementation supports blocking mode and attempts to communicate
the very caller specified amount of data. Also suports non-blocking mode
and read timeouts, which can result in short reads.

Support for source add/remove exists, so that receive callbacks can
execute when receive data has become available. Other serial transport
methods are missing. There is no support for bitrate configuration,
flow control, flushing, UART frame formats, etc.
Makefile.am
src/libsigrok-internal.h
src/serial.c
src/serial_tcpraw.c [new file with mode: 0644]