Skip to main content

Module session

Module session 

Source
Expand description

Ecr17Session — drives one ECR17 request/response exchange over a Transport.

It frames the request, runs the physical ACK/NAK handshake with retransmission, waits for the application response while forwarding progress (SOH) and receipt (S) messages, and ACK/NAKs incoming frames per their LRC validity. One exchange runs at a time (ECR17 is one transaction per terminal). Port of the reference C++ Ecr17Session.

💰 The session errors on a mid-exchange drop (propagating the transport’s error, e.g. Ecr17Error::Disconnected or Ecr17Error::Transport) and resets its per-transaction state at the start of every exchange, so it is reusable across reconnects. It never blindly re-sends: the money-safe retry decision lives in crate::retry and is applied by the client, and a lost response is recovered via send_last_result (G), never by retransmitting a financial request.

Structs§

Ecr17Session
Drives ECR17 exchanges over a Transport T.
SessionConfig
Session timing/retry configuration.