9#include <QtCore/QString>
69 [[nodiscard]]
bool probe(std::chrono::milliseconds budget);
73 GPSReceiveUpdates
receive(std::chrono::milliseconds timeout);
88 GPSReceiveUpdates
consume(std::span<const uint8_t> bytes);
96 [[nodiscard]] QString
identity()
const;
114 void frame(
const GPSFrame& frame)
override;
116 [[nodiscard]] uint64_t nowUs()
const {
return _io.
clock.
nowUs(); }
126 std::unique_ptr<GPSFamilyProtocol> _protocol;
GPSBaudStatus
How the link answered a baud rate change.
GPSProtocolError
Sticky failure of the current receiver session; I/O and control stop until the next configure().
const QLoggingCategory &(*)() GPSLogCategory
A family's logging category function, as declared by Q_DECLARE_LOGGING_CATEGORY; usable as qCWarning(...
const QString & errorDetail() const
GPSProtocolError error() const
GPSProtocolError error() const
GPSEventBatch decode(std::span< const uint8_t > bytes)
Decodes bytes without I/O or observer callbacks.
GPSFamilyProtocol & protocol()
const GPSReceiverFamily & family() const
bool armDecodeOnly(const GPSConfig &config)
GPSReceiveUpdates consume(std::span< const uint8_t > bytes)
Decodes bytes and delivers their batch to the observer. An empty span flushes.
bool receiverReady() const
GPSReceiveUpdates receive(std::chrono::milliseconds timeout)
bool armNavigationDecode(GPSNavigationDecode decode={})
GPSReceiveUpdates consumeFrame(const GPSFrame &frame)
Decodes one frame another stream framed and delivers its batch to the observer, without flushing.
QString identity() const
Model and firmware reported during configuration, trimmed; empty when unknown.
bool probe(std::chrono::milliseconds budget)
GPSStreamDemux & stream()
GPSLogCategory logCategory() const
The family's logging category, or the runtime's when the family has none.
const QString & errorDetail() const
bool configure(const GPSConfig &config, unsigned &baud)
The monotonic clock receiver sessions run on: the steady clock unless tests inject a virtual one.
std::function< uint64_t()> nowUs
The receiver configuration requested for one configure() attempt.
Evidence from one configuration command, not a claim of physical receiver operation.
Events decoded from one span of received bytes, in publication order.
What a decode-only runtime decodes from a receiver configured elsewhere (GPSFamilyProtocol::armNaviga...
std::function< GPSReadResult(std::span< uint8_t >, GPSDeadline)> read
GPSCancelToken cancelToken
Checked before each write and baud change; reads observe it in the transport.
std::function< GPSWriteResult(std::span< const uint8_t >, GPSDeadline)> write
GPSClock clock
Without a wait, the runtime sleeps in short slices until the duration elapses or cancelToken is cance...
std::function< GPSBaudStatus(unsigned)> setBaudrate
Observers of runtime output, invoked synchronously on the runtime thread.
std::function< void(const GPSConfigurationEvidence &)> commandFinished
Every completed command, during configuration and streaming alike.
std::function< void(const GPSEventBatch &)> decoded
Borrowed for the callback; it may decode nested input through GPSProtocolRuntime::consume().