2.7 KiB
2.7 KiB
TCPStreamer source kind
A new source kind tcps ("TCPStreamer") that receives a MARTe2 TCPStreamer DataSource, either
standalone or through a shared TCPStreamService.
Wire and scope
- Both transports are plain UDPS framing over TCP. A standalone
TCPStreamer(TCPSServer) sends CONFIG then DATA on connect. ATCPStreamServiceadditionally requires a first client frame,SUBSCRIBE(type 5, payload = stream name, 1..255 bytes). - A plain server ignores
SUBSCRIBE, so the client sends it only when a stream name is set. - One connection carries one stream. Multiplexed lists (
"a,b,c", stream index infragmentIdx) are out of scope: a udpscope source is single-timebase. Several streams are merged server-side withTCPStreamJoin, which publishes an ordinary named stream.
deps/udpsclient: a TCP transport mode
udps_client_config_tgainsuse_tcpandstream_name.- New
connect_tcp(): open the TCP socket, sendSUBSCRIBEif a stream name is set, send noCONNECT. No UDP socket, no keepalive ACK. udps_client_pollreusesread_tcp_frame/handle_packet.reorder_window_sis forced to 0 in TCP mode: TCP is ordered, so a counter gap is a server-side drop and is reported at once.- Silence timeout and reconnect delay behave as in UDP (dead server, or a stalled client the server evicted, reconnects).
- The datagram tap does not fire; the packet capture stays UDP-only (
has_datagrams()false). - Additive. Recorded in
docs/claude/build-and-run.mdas a sixth intentional upstream change.
Source adapter and kind
UdpsSourcetakes a transport argument (UdpsSource(cfg, Transport::Tcp)) instead of being copied: its callbacks are identical. The TCP variant readsserver,port(default 44500) andstream.src/source/tcps_kind.cpp: kindtcps, display name "TCPStreamer". Form rows: Server, Port, Stream name (optional). Description: "Leave empty for a standalone TCPStreamer; name the stream for a TCPStreamService".- Identity:
host:portorhost:port/stream. Session naming follows the existing non-UDPS rule (tcps-<identity>, port 1,source_kind=tcps,source_opt_*). - Registered in
register_builtin_sources()andCMakeLists.txt.
Verification
No unit suite. Extend the self-check in src/ui_probe.cpp with an in-process fake TCP server that
sends CONFIG then DATA, and requires SUBSCRIBE in one mode. Probe lines assert the signals, the
frame count, and the reconnect after the server closes. Baselines: exactly one build warning, no
Gtk-CRITICAL. A smoke test against a real MARTe TCPStreamer if one is runnable.
Docs
README and docs/claude/architecture.md (Sources) describe the kind; docs/claude/probe-readings.md
gets the new probe lines.