|
QGroundControl
Ground Control Station for MAVLink Drones
|
#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. | |
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.
| 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.
|
default |
| 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.
| 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.
| 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.
| bool GPSDriver::configure | ( | ) |
Create and configure the underlying driver.
Definition at line 96 of file GPSDriver.cc.
References GPSReceiverConfig::allowPersistentChanges, GPSReceiverFamily::autoBaudRate, GPSReceiverConfig::base, GPSReceiverConfig::baudRate, GPSRuntimeIO::cancelToken, GPSTransport::cancelToken(), GPSRuntimeIO::clock, GPSRuntimeObserver::commandFinished, Configured, Data, GPSRuntimeObserver::decoded, Error, error, GPSTransport::fatalError(), GPSTransport::fixedBaudrate(), gpsReceiverConfigError(), gpsReceiverFamilies(), gpsReceiverFamily(), GPSBaseStationConfig::mode, GPSClock::nowUs, GPSRuntimeIO::read, GPSTransport::read(), GPSRuntimeIO::setBaudrate, GPSTransport::setBaudrate(), GPSReadResult::status, TimedOut, Unsupported, GPSRuntimeIO::write, and GPSTransport::write().
| 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.
| QString GPSDriver::receiverIdentity | ( | ) | const |
Receiver model and firmware reported by the configured protocol; empty when unknown.
Definition at line 91 of file GPSDriver.cc.