Task 12 of 16 — these are sequential, do them in order.
Previous: #14 · Next: #16
Port target: cloudpark-toolkit (Go) → this repo (Rust). Reference paths below are relative to that repo.
Goal
The TCP105 totem-board emulator (server) and its TUI screen.
Scope
Server (src/tcp105.rs), on :8008 by default (--listen to bind a specific loopback so a real cloudpark-hw can share the machine):
- The HW dials a fresh connection per command — answer exactly one command per accepted connection.
- Handle: reset, version info, CPU unique code, config update, relay control (track relay state), voice broadcast (task 11), get IO status, RFID.
SerialTransfer reassembly: buffer the stream (cap at 4 MiB against a bogus length prefix) and hand Serial2 payloads to the ticket renderer (task 10).
- Digital input toggles: the TUI flips inputs 1–5, the server pushes
UploadIOStatus to the HW upload address — auto-learned from the incoming connection unless --hw-addr is set.
Screen:
- Menu: Get info / Inputs & relays.
- Get info: listen address, HW upload address, tickets saved, last command.
- Inputs & relays: cursor over inputs 1–5 (loop detector, pick-card, help), space toggles; relay state shown live.
Reference
cloudpark-toolkit/internal/tcp105/server.go (406) + server_test.go (253), internal/tui/tcp105.go
Done when
Task 12 of 16 — these are sequential, do them in order.
Previous: #14 · Next: #16
Goal
The TCP105 totem-board emulator (server) and its TUI screen.
Scope
Server (
src/tcp105.rs), on:8008by default (--listento bind a specific loopback so a realcloudpark-hwcan share the machine):SerialTransferreassembly: buffer the stream (cap at 4 MiB against a bogus length prefix) and handSerial2payloads to the ticket renderer (task 10).UploadIOStatusto the HW upload address — auto-learned from the incoming connection unless--hw-addris set.Screen:
Reference
cloudpark-toolkit/internal/tcp105/server.go(406) +server_test.go(253),internal/tui/tcp105.goDone when
UploadIOStatusframe with the right bit set.Serial2lands in the ticket dir as a PDF.