Expand description
The command protocol: send a command and interpret its acknowledgement.
A ground station sends a CommandLong (or
CommandInt) and waits for a
CommandAck carrying the same command id. The
acknowledgement’s result may be
IN_PROGRESS, which means a long-running
command is still executing and the sender should keep waiting rather than time out. If no
acknowledgement arrives, the command is resent with an incremented confirmation count,
up to a retry limit, exactly as the protocol prescribes.
CommandProtocol holds that logic: it matches acknowledgements to the command in flight,
classifies each into an AckOutcome, and tracks the confirmation count and remaining
retries. It performs no IO; the caller sends the messages and applies the timeout.
Structs§
- Command
Protocol - Tracks one command awaiting its acknowledgement: which command, the retransmission
confirmationcount, and the retries left.
Enums§
- AckOutcome
- What an incoming
CommandAckmeans for the command in flight.