LineStreamPacer
Abstract base for drip-feed pacers.
| Inherits | QObject |
| Inherited By | AckLineStreamPacer, DelayLineStreamPacer, FreeLineStreamPacer, and ManualLineStreamPacer |
Declared in src/libs/libserialsession/serialsession/LineStreamPacer.hpp.
Detailed description
A pacer decides the gate between "line N has been written" and "line N+1 may be written". Concrete pacers implement one of the strategies in content/doc/internal/specs/serial-console/dripfeed-model.md §"Pacing strategies": Ack, Delay, Free (P6 adds Manual).
The pacer is driven by LineStreamRun: - run calls onLineWritten() after each successful port->write(). - run forwards each completed RX line to onRxLine(). - run honours pause(), resume(), cancel() lifecycle calls.
The pacer signals back: - requestNextLine() — gate has opened; run should advance. - runError(msg) — unrecoverable; run should enter Errored. - runFinished() — pacer-side completion (rare; finishing is normally driven by the run reaching the end of its advance list).