Expand description
ZMODEM file transfer protocol library. Sender and Receiver are
caller-driven state machines for sending and receiving files with the
ZMODEM protocol. The crate is no_std compatible and heapless.
The caller owns all I/O. The loop is the same for both roles:
- Create a
SenderorReceiver. - Call
poll()to get the nextAction:Action::WriteWire— write the bytes to the transport, then callwire_written(n).Action::ReadFile(sender) — read the requested file bytes and provide them withSender::submit_file.Action::WriteFile(receiver) — persist the bytes, then callReceiver::file_written.Action::Event— handle a protocolEvent.Action::Idle— feed incoming transport bytes withsubmit_wire(), or calltimeout()if none arrive.
- The sender offers files with
Sender::start_fileand ends the session withSender::finish.
Structs§
- File
Info - File metadata advertised by the sender.
- Position
- Byte offset in a ZMODEM file transfer.
- Receiver
- ZMODEM receiver state machine.
- Sender
- ZMODEM sender state machine.
Enums§
- Action
- The next action the caller must perform, returned by
Sender::pollandReceiver::poll. - Error
- Top-level error type.
- Event
- Protocol-level event surfaced through
Action::Event.