19 [
this, &context](std::string_view line) {
return _decodeLine(line, context); });
34 const GPSReceiveUpdates updates =
_nmea.
receive(channel, timeout);
35 if (channel.failed()) {
36 (void) channel.flush();
GPSReceiveUpdates receive(GPSCommandChannel &channel, std::chrono::milliseconds timeout) final
After a failure, flushes at once so the expiry it causes is published with it.
virtual GPSReceiveUpdates _decodeLine(std::string_view line, GPSDecodeContext &context)=0
Decodes one line after standard NMEA did.
static constexpr std::chrono::seconds STATUS_MAX_AGE
How long a periodic receiver report, such as base status or time metadata, stays current.
virtual void _expire(GPSDecodeContext &context)
Drops state that is stale or that a recorded failure invalidated; runs before each decode.
bool _ready
Whether the receiver runs as the latest configure() set it up.
static constexpr std::chrono::milliseconds STATUS_POLL
The longest read of a family that expires its status, so expiry runs on a silent link too.
GPSReceiveUpdates onFrame(const GPSFrame &frame, GPSDecodeContext &context) final
void flush(GPSDecodeContext &context) final
Expires the family's stale state, then flushes the NMEA stream.
bool receiverReady() const final
GPSNMEAFamilyProtocol(GPSNMEAStream::Navigation navigation=GPSNMEAStream::Navigation::StandardNMEA)
GPSReceiveUpdates receive(GPSCommandChannel &channel, std::chrono::milliseconds timeout) const
void flush(GPSDecodeContext &context)
Expires untimed metadata and publishes satellite epochs that became due.
GPSReceiveUpdates onFrame(const GPSFrame &frame, GPSDecodeContext &context, Vendor &&vendor)
Navigation
Who turns sentences into positions: this stream from standard NMEA, or the family's own sentences.
void setRTCMEnabled(bool enabled)