Task 09 of 16 — these are sequential, do them in order.
Previous: #11 · Next: #13
Port target: cloudpark-toolkit (Go) → this repo (Rust). Reference paths below are relative to that repo.
Goal
Port the TCP105 totem-board wire protocol (framing + opcodes + IO word). Task 12 builds the server on top.
Scope
STX = 0x7F framing, encode/decode with length + checksum exactly as the Go package.
- Opcodes:
ResetBoard 0x01, VersionInfo 0x02, UpdateConfig 0x03, CPUUniqueCode 0x09, RFIDReader 0x11, SerialTransfer 0x19, GetIOStatus 0x42, UploadIOStatus 0x43, RelayControl 0x46, VoiceBroadcast 0x51.
- Serial ids:
Serial1 = 0x01, Serial2 = 0x02 (printer path).
- 32-bit IO-status word with the exact bit positions:
Input1 = 22, Input2 = 21, Input3 = 19 (loop detector), Input4 = 18 (pick-card button), Input5 = 17 (help button).
- Helpers to parse relay-control and config payloads.
Reference
cloudpark-toolkit/internal/tcp105proto/protocol.go (192 lines) + protocol_test.go
Done when
Task 09 of 16 — these are sequential, do them in order.
Previous: #11 · Next: #13
Goal
Port the TCP105 totem-board wire protocol (framing + opcodes + IO word). Task 12 builds the server on top.
Scope
STX = 0x7Fframing, encode/decode with length + checksum exactly as the Go package.ResetBoard 0x01,VersionInfo 0x02,UpdateConfig 0x03,CPUUniqueCode 0x09,RFIDReader 0x11,SerialTransfer 0x19,GetIOStatus 0x42,UploadIOStatus 0x43,RelayControl 0x46,VoiceBroadcast 0x51.Serial1 = 0x01,Serial2 = 0x02(printer path).Input1 = 22,Input2 = 21,Input3 = 19(loop detector),Input4 = 18(pick-card button),Input5 = 17(help button).Reference
cloudpark-toolkit/internal/tcp105proto/protocol.go(192 lines) +protocol_test.goDone when