Expand description
Layer 3: file-transfer state machine.
Drives the protocol-1 sub-protocol (QUERY / OPEN / WRITE / CLOSE / ABORT)
on top of a Session. Translates the session’s raw Events into
file-level FileEvents so the caller doesn’t have to parse the
PFT:* tokens themselves.
§Lifecycle
Idle ── query() ──► AwaitingQueryReply ──► Negotiated
│
Negotiated ── open() ──► AwaitingOpenReply ──┴──► Opened ── close() ──► Closed
│ ── abort() ──► Aborted
└── (busy/fail) ──► Failed
Opened ── write() ──► AwaitingWriteAck ──► OpenedCompression is negotiated inside FileTransfer::query: if the caller
passed Compression::Auto and the device advertises heatshrink, the
negotiated parameters are exposed via
FileTransfer::negotiated_compression. The adapter modules are
responsible for actually compressing chunk bytes before calling
FileTransfer::write.
Structs§
- File
Transfer - File-transfer state machine driving a
Session.
Enums§
- Compression
- Caller-visible compression preference.
- File
Error - Reasons a transfer failed.
- File
Event - Things
FileTransfer::pollemits as the protocol progresses.