docs: the TCPStreamer source kind, the client's TCP mode, and its probes

This commit is contained in:
Martino Ferrari committed 2026-11-06 13:58:48 +01:00
1 parent 3dad65c487
commit a65f953f17
5 files changed
+110 -7

No files matched your search

+37 -3
View File
@@ -2117,8 +2117,9 @@ and `regained` reads 400 ms later.
## `[source-kinds]`
```
[source-kinds] kinds=udps,e1608,flatudp,probe
[source-kinds] kinds=udps,tcps,e1608,flatudp,probe
[source-kinds] form udps: round_trip=1 valid=1
[source-kinds] form tcps: round_trip=1 valid=1
[source-kinds] form e1608: round_trip=1 valid=1
[source-kinds] form flatudp: round_trip=1 valid=1
[source-kinds] form probe: round_trip=1 valid=1
@@ -2132,10 +2133,10 @@ and `regained` reads 400 ms later.
source-plugin path from the registry to the producer thread. The variable also registers the test-only `probe`
kind, so a run without it never shows that kind. The `form` line appears once per registered kind.
- `kinds=udps,e1608,flatudp,probe`: a missing kind means `register_builtin_sources()` was not called before `parse_args()`,
- `kinds=udps,tcps,e1608,flatudp,probe`: a missing kind means `register_builtin_sources()` was not called before `parse_args()`,
or the env var gate is wrong.
- `round_trip=0`: a form's `write` and `read` disagree about a key -- a renamed `SourceConfig` key, or an
absent key that was not defaulted. `valid=0` is a default configuration the form refuses. The e1608 form's sample sets address, port, scan_rate, mode, ai1, trigger, dir1, plot0 and gen_rate; a mismatch names one of those. The flatudp sample sets port, bind, multicast, iface, rate, endian and signals.
absent key that was not defaulted. `valid=0` is a default configuration the form refuses. The e1608 form's sample sets address, port, scan_rate, mode, ai1, trigger, dir1, plot0 and gen_rate; a mismatch names one of those. The flatudp sample sets port, bind, multicast, iface, rate, endian and signals. The tcps sample sets server, port and stream.
- `panel disconnected: sensitive=0 present=1`: **disable, don't hide.** `present=0` is a panel that was hidden
or never added; `sensitive=1` is a panel that stays live with no source behind it.
- `panel connected: sensitive=1`: anything else means `apply_source_panels` acted on the wrong widget (it must
@@ -2302,6 +2303,39 @@ same reason.
- `resumed: ok=1`: `Connected` was raised again and frames resumed. `connected=0` here means the source never
recovered after the sender came back.
## `[tcps]`
```
[tcps] stream: connected=1 signals=5 names=time,sine,square,ramp,noise frames=373 ok=1
[tcps] capture button: present=1 sensitive=0
[tcps] reconnect: connected=1 frames_before=211 after=301 reconnects_before=0 after=1 ok=1
```
`UDPSCOPE_PROBE_TCPS=1500` (the first two lines; counts vary) and `UDPSCOPE_PROBE_TCPS_RECONNECT=2000` (the last)
run as `--source tcps --source-opt port=44500` against `tools/mock_tcpstreamer.py` with the options in
`verification.md`. A service run (`--stream fast` on both sides) reads the same two lines; the mock logs
`SUBSCRIBE 'fast'`. With no mock the stream line reads `connected=0 signals=0 names= frames=0 ok=0`: a reading,
not a failure (the retries are quiet on stderr).
- `stream: ok=1`: connected, the five names the mock sends (its `time` master channel is a signal of its own, so
the list is `time,sine,square,ramp,noise`, not four), and frames counted. `connected=0` with a mock running is
the connect or the `SUBSCRIBE` failing -- a mock started with `--stream` and an app without `stream=` (or a
different name) is closed by the mock (at once on a wrong name, after 5 s on none) and the app reconnects
forever; the mock's log says `no valid SUBSCRIBE`. `names` wrong or `signals=0` with `connected=1` is a CONFIG that was not decoded.
- `capture button: present=1 sensitive=0`: the capture is of the UDP socket and a TCP source reports no
datagrams (`has_datagrams()` false), so it is disabled, not hidden. `sensitive=1` is the button enabled for a
kind that has nothing to capture.
- `reconnect: ok=1`: after the mock closed the connection (`--close-after 3`) the client came back
(`connected=1`), frames advanced past `frames_before` and the `reconnects` stat advanced past
`reconnects_before`. The probe polls every 100 ms for up to 6 s, so it reads the first moment all three hold.
`ok=0` is a client that did not come back after the close, or `Acquisition` not mapping `reconnects`;
`reconnects_before=1` is the probe's baseline falling **after** the close (`UDPSCOPE_PROBE_TCPS_RECONNECT` must
be earlier than the mock's `--close-after`).
- **Not a defect:** after the reconnect the mock restarts its time base at 0 and the app prints repeating
`warning: the clock stalled at ... samples stamped [...] are all behind it`. That is `Acquisition`'s behaviour
for any stream whose clock goes backwards, identical to restarting the UDPS mock; the line is a reading, not a
failure of this probe.
## `[prefs-probe]`
```