preserve transport outage validation evidence

This commit is contained in:
Jay
2026-08-17 14:30:56 -04:00
parent 291c6b54e6
commit 1cf0a9ac77
9 changed files with 176 additions and 26 deletions
+13 -6
View File
@@ -66,12 +66,19 @@ overruns. Hardware data-ready interrupts and FIFO acquisition are deferred to th
later sensor-side acquisition refinement.
Completed samples enter a 512-record RAM queue, providing 5.12 seconds of
blocked or disconnected transport tolerance at 100 Hz. A failed write retains
and retries its packet while this queue accumulates the backlog. A lower-priority
output task batches up to eight records into versioned `TRK1` frames, isolating
acquisition from brief USB or future BLE stalls. CRC, packet and sample sequences,
timestamps, and cumulative loss/overrun counters make any queue overflow
detectable.
transport-outage tolerance at 100 Hz when the transport reports backpressure or
failure accurately. A failed write retains and retries its packet while this
queue accumulates the backlog. A lower-priority output task batches up to eight
records into versioned `TRK1` frames, isolating acquisition from brief transport
stalls. CRC, packet and sample sequences, timestamps, and cumulative
loss/overrun counters make permanent loss detectable by the receiver.
The current ESP-IDF USB VFS path reports physical disconnects, but a connected
host that stops draining can time out below stdio and still appear successful to
firmware. The host can detect resulting loss from packet/sample sequences and
CRC framing, but the device cannot count that case. A direct USB driver with
bounded drain waits, and ultimately receiver acknowledgements with replay, are
deferred to the common USB/BLE transport layer.
Measured end-to-end framing overhead is about 2.47 kB/s at 100 Hz, or 8.47
MiB/hour before BLE link overhead.