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

#include <GPSDriver.h>

Classes

struct  State
 

Public Member Functions

 GPSDriver (GPSType type, GPSTransport &transport, const GPSReceiverConfig &config, GPSDriverSinks sinks, GPSClock clock={})
 Deadlines, report times and satellite freshness run on clock; the default is the steady clock.
 
 ~GPSDriver ()
 
bool configure ()
 Create and configure the underlying driver.
 
GPSReceiveResult receiveOutcome (std::chrono::milliseconds timeout)
 
const std::vector< GPSConfigurationEvidence > & configurationEvidence () const
 Latest configure() attempt; remains available after failure. Caller-thread access only.
 
const QString & configurationError () const
 Diagnostic from the latest configure() failure; cleared when a new attempt starts.
 
bool configurationNeedsConsent () const
 Whether the latest configure() failed because the receiver needs persistent changes the request did not allow.
 
QString receiverIdentity () const
 Receiver model and firmware reported by the configured protocol; empty when unknown.
 

Detailed Description

Hosts a native receiver family and adapts its decoded events to public reports. GPSType::automatic detects the family (GPSReceiverDetector) on every configure(), then fits the request to it: consent to persistent changes lapses where the family has none, a compact-observation request lapses with a warning where the family has no compact option, and an unsupported base mode fails, naming the family.

Definition at line 69 of file GPSDriver.h.

Constructor & Destructor Documentation

◆ GPSDriver()

GPSDriver::GPSDriver ( GPSType  type,
GPSTransport &  transport,
const GPSReceiverConfig &  config,
GPSDriverSinks  sinks,
GPSClock  clock = {} 
)

Deadlines, report times and satellite freshness run on clock; the default is the steady clock.

Definition at line 64 of file GPSDriver.cc.

◆ ~GPSDriver()

GPSDriver::~GPSDriver ( )
default

Member Function Documentation

◆ configurationError()

const QString & GPSDriver::configurationError ( ) const

Diagnostic from the latest configure() failure; cleared when a new attempt starts.

Definition at line 81 of file GPSDriver.cc.

◆ configurationEvidence()

const std::vector< GPSConfigurationEvidence > & GPSDriver::configurationEvidence ( ) const

Latest configure() attempt; remains available after failure. Caller-thread access only.

Definition at line 76 of file GPSDriver.cc.

◆ configurationNeedsConsent()

bool GPSDriver::configurationNeedsConsent ( ) const

Whether the latest configure() failed because the receiver needs persistent changes the request did not allow.

Definition at line 86 of file GPSDriver.cc.

◆ configure()

◆ receiveOutcome()

GPSReceiveResult GPSDriver::receiveOutcome ( std::chrono::milliseconds  timeout)

Failures take precedence over reports in the same cycle; receiving before a successful configure() is InvalidArgument.

Definition at line 253 of file GPSDriver.cc.

References Activity, Cancelled, Data, GPSReadResult::detail, GPSTransport::fatalError(), Idle, InvalidArgument, GPSTransport::isCancelled(), None, GPSTransport::read(), and Transport.

◆ receiverIdentity()

QString GPSDriver::receiverIdentity ( ) const

Receiver model and firmware reported by the configured protocol; empty when unknown.

Definition at line 91 of file GPSDriver.cc.


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