QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
GPSDecodeContext Class Reference

#include <GPSFamilyProtocol.h>

Public Member Functions

uint64_t nowUs () const
 
GPSStreamDemux & stream ()
 
void publishPosition (const GPSDecodedPosition &report)
 
void publishSatellites (const GPSDecodedSatellites &report)
 
void publishSatelliteUsage (std::optional< int > count)
 
void publishIntegrity (GPSIntegrityReport &report)
 Stamps the family's working report with the receipt time and publishes a copy.
 
void publishSurvey (GPSSurveyReport &status)
 Stamps status with the receipt time and publishes a copy. Survey progress is not an update flag.
 
void publishSurvey (bool active, bool valid, std::chrono::seconds duration, const GPSEllipsoidPosition &position={})
 Publishes survey-in progress; unknown coordinates remain NaN.
 
void publishRTCM (std::span< const uint8_t > frame)
 
void publishAsReceived (GPSProtocolEvent event)
 
void markUpdates (GPSReceiveUpdates updates)
 Adds updates a decoder reports for a frame without publishing an event, such as protocol activity.
 
bool replyPending () const
 True while a transact() reply is outstanding and unresolved.
 
void resolveReply (GPSCommandOutcome outcome)
 Resolves the outstanding reply; Pending and later resolutions are ignored.
 
void offerReply (std::string_view reply)
 Passes one decoded text reply to the outstanding text matcher, if any.
 
bool failed () const
 
void failControl (const QString &detail)
 Records a protocol failure described by detail unless a failure is already recorded, whose detail stays.
 

Friends

class GPSProtocolRuntime
 

Detailed Description

What a decoder may touch while it handles a frame or flushes: it publishes the decoded events, resolves the pending command reply, adjusts the stream framers and reads the sticky failure. It never performs I/O.

Definition at line 73 of file GPSFamilyProtocol.h.

Member Function Documentation

◆ failControl()

void GPSDecodeContext::failControl ( const QString &  detail)

Records a protocol failure described by detail unless a failure is already recorded, whose detail stays.

Definition at line 204 of file GPSProtocolRuntime.cc.

References GPSCommandChannel::failControl().

◆ failed()

bool GPSDecodeContext::failed ( ) const

Definition at line 199 of file GPSProtocolRuntime.cc.

References GPSCommandChannel::failed().

Referenced by GPSProtocolRuntime::receiverReady().

◆ markUpdates()

void GPSDecodeContext::markUpdates ( GPSReceiveUpdates  updates)
inline

Adds updates a decoder reports for a frame without publishing an event, such as protocol activity.

Definition at line 142 of file GPSFamilyProtocol.h.

References GPSEventBatch::updates.

◆ nowUs()

◆ offerReply()

void GPSDecodeContext::offerReply ( std::string_view  reply)

Passes one decoded text reply to the outstanding text matcher, if any.

Definition at line 194 of file GPSProtocolRuntime.cc.

◆ publishAsReceived()

void GPSDecodeContext::publishAsReceived ( GPSProtocolEvent  event)
inline

Publishes event exactly as given: its timestamps are kept and no update flag is set. For reports a family buffered with their original receipt, such as a Quectel survey status held during boot verification, or decoded elsewhere, as by the protocol decoders of a passive input.

Definition at line 139 of file GPSFamilyProtocol.h.

References GPSEventBatch::events.

◆ publishIntegrity()

void GPSDecodeContext::publishIntegrity ( GPSIntegrityReport &  report)
inline

Stamps the family's working report with the receipt time and publishes a copy.

Definition at line 104 of file GPSFamilyProtocol.h.

References Activity, GPSEventBatch::events, nowUs(), GPSIntegrityReport::timestampUs, and GPSEventBatch::updates.

◆ publishPosition()

void GPSDecodeContext::publishPosition ( const GPSDecodedPosition &  report)
inline

Definition at line 85 of file GPSFamilyProtocol.h.

References GPSEventBatch::events, Position, and GPSEventBatch::updates.

◆ publishRTCM()

void GPSDecodeContext::publishRTCM ( std::span< const uint8_t >  frame)
inline

Definition at line 130 of file GPSFamilyProtocol.h.

References Activity, GPSEventBatch::events, and GPSEventBatch::updates.

Referenced by UBX::Protocol::onFrame().

◆ publishSatellites()

void GPSDecodeContext::publishSatellites ( const GPSDecodedSatellites &  report)
inline

Definition at line 91 of file GPSFamilyProtocol.h.

References GPSEventBatch::events, Satellites, and GPSEventBatch::updates.

◆ publishSatelliteUsage()

void GPSDecodeContext::publishSatelliteUsage ( std::optional< int >  count)
inline

Definition at line 97 of file GPSFamilyProtocol.h.

References GPSEventBatch::events, nowUs(), Satellites, and GPSEventBatch::updates.

◆ publishSurvey() [1/2]

void GPSDecodeContext::publishSurvey ( bool  active,
bool  valid,
std::chrono::seconds  duration,
const GPSEllipsoidPosition &  position = {} 
)
inline

Publishes survey-in progress; unknown coordinates remain NaN.

Definition at line 119 of file GPSFamilyProtocol.h.

◆ publishSurvey() [2/2]

void GPSDecodeContext::publishSurvey ( GPSSurveyReport &  status)
inline

Stamps status with the receipt time and publishes a copy. Survey progress is not an update flag.

Definition at line 112 of file GPSFamilyProtocol.h.

References GPSEventBatch::events, nowUs(), and GPSSurveyReport::timestampUs.

Referenced by GPSSurveyClock::publishProgress(), and GPSSurveyClock::start().

◆ replyPending()

bool GPSDecodeContext::replyPending ( ) const

True while a transact() reply is outstanding and unresolved.

Definition at line 184 of file GPSProtocolRuntime.cc.

◆ resolveReply()

void GPSDecodeContext::resolveReply ( GPSCommandOutcome  outcome)

Resolves the outstanding reply; Pending and later resolutions are ignored.

Definition at line 189 of file GPSProtocolRuntime.cc.

◆ stream()

GPSStreamDemux & GPSDecodeContext::stream ( )

Friends And Related Symbol Documentation

◆ GPSProtocolRuntime

friend class GPSProtocolRuntime
friend

Definition at line 159 of file GPSFamilyProtocol.h.


The documentation for this class was generated from the following files: