Task 13 of 16 — these are sequential, do them in order.
Previous: #15 · Next: #17
Port target: cloudpark-toolkit (Go) → this repo (Rust). Reference paths below are relative to that repo.
Goal
The VKP80III / K80 thermal-printer emulator on a serial line, plus its screen.
Scope
- Open the port:
ttyS1, ttyS2, or pty (allocate a pty and print the slave path). Baud from --baud (ignored for pty). Crate: serialport or raw nix termios.
- Answer the host's probes so it believes a real printer is attached:
GS I FF = 1D 49 FF (model query) → 02 05 (VKP80)
DLE EOT 0x14 = 10 04 14 (status query) → 10 04 00 00 00 00 (paper present, ticket removed)
- Ticket framing: serial has no end-of-ticket marker — flush after 300 ms of line silence and treat the buffer as one ticket, rendered to PDF via task 10. Keep the window a named constant.
- Ticket counter exposed to the TUI.
Screen: menu Get info — port, baud, pty path, tickets saved, last ticket filename + log pane.
Reference
cloudpark-toolkit/internal/serialprinter/serialprinter.go, device_linux.go, serialprinter_test.go, internal/tui/printer.go
Done when
Task 13 of 16 — these are sequential, do them in order.
Previous: #15 · Next: #17
Goal
The VKP80III / K80 thermal-printer emulator on a serial line, plus its screen.
Scope
ttyS1,ttyS2, orpty(allocate a pty and print the slave path). Baud from--baud(ignored for pty). Crate:serialportor rawnixtermios.GS I FF=1D 49 FF(model query) →02 05(VKP80)DLE EOT 0x14=10 04 14(status query) →10 04 00 00 00 00(paper present, ticket removed)Screen: menu Get info — port, baud, pty path, tickets saved, last ticket filename + log pane.
Reference
cloudpark-toolkit/internal/serialprinter/serialprinter.go,device_linux.go,serialprinter_test.go,internal/tui/printer.goDone when