|
QGroundControl
Ground Control Station for MAVLink Drones
|
#include <NTRIPManager.h>
Inheritance diagram for NTRIPManager:
Collaboration diagram for NTRIPManager:Public Types | |
| enum class | ConnectionStatus { Disconnected = 0 , Connecting = 1 , Connected = 2 , Reconnecting = 3 , Error = 4 } |
| Public connection status. Numeric values are stable — QML binds against them. More... | |
| enum class | CasterStatus { CasterConnected , CasterNoLocation , CasterError } |
| enum class | Event { StartRequested , StopRequested , ConfigInvalid , TransportConnected , RTCMBeforeConnected , TransportError , TransportFatalError , ReconnectDue , ReconnectGaveUp , HotReconfigure } |
Signals | |
| void | connectionStatusChanged () |
| void | statusMessageChanged () |
| void | securityWarningChanged () |
| void | casterStatusChanged (CasterStatus status) |
| void | ggaSourceChanged () |
Public Member Functions | |
| NTRIPManager (QObject *parent=nullptr) | |
| ~NTRIPManager () override | |
| void | init () |
| ConnectionStatus | connectionStatus () const |
| QString | statusMessage () const |
| QString | securityWarning () const |
| CasterStatus | casterStatus () const |
| QString | ggaSource () const |
| NTRIPSourceTableController * | sourceTableController () |
| NTRIPConnectionStats * | connectionStats () |
| RTCMMavlink * | rtcmMavlink () const |
| Q_INVOKABLE void | fetchMountpoints () |
| Q_INVOKABLE void | selectMountpoint (const QString &mountpoint) |
| void | setTransportForTest (NTRIPTransport *transport) |
| void | setRtcmMavlink (RTCMMavlink *mavlink) |
| void | startNTRIP () |
| void | stopNTRIP () |
Static Public Member Functions | |
| static NTRIPManager * | instance () |
Friends | |
| class | NTRIPManagerTest |
Manages the NTRIP caster connection lifecycle as an explicit event-driven state machine. All connection state changes flow through _dispatch() and the transition table in NTRIPManager.cc — there is no second, internal state enum. Entry actions own per-state side effects (start/tear down transport, schedule reconnect, toggle GGA/stats).
Definition at line 28 of file NTRIPManager.h.
|
strong |
| Enumerator | |
|---|---|
| CasterConnected | |
| CasterNoLocation | |
| CasterError | |
Definition at line 60 of file NTRIPManager.h.
|
strong |
Public connection status. Numeric values are stable — QML binds against them.
| Enumerator | |
|---|---|
| Disconnected | |
| Connecting | |
| Connected | |
| Reconnecting | |
| Error | |
Definition at line 50 of file NTRIPManager.h.
|
strong |
State-machine events. Each represents an external stimulus; the transition table in NTRIPManager.cc maps (state, event) → next state. Public so test code can drive the machine directly — entry actions are internal, events are the observable API.
| Enumerator | |
|---|---|
| StartRequested | startNTRIP() called or settings enable went true. |
| StopRequested | stopNTRIP() called or settings enable went false. |
| ConfigInvalid | NTRIPTransportConfig::isValid() returned false. |
| TransportConnected | NTRIPTransport emitted connected(). |
| RTCMBeforeConnected | RTCM data arrived before the connected() signal was processed. |
| TransportError | NTRIPTransport emitted a retryable error. |
| TransportFatalError | NTRIPTransport emitted a non-retryable error. |
| ReconnectDue | NTRIPReconnectPolicy fired reconnectRequested(). |
| ReconnectGaveUp | NTRIPReconnectPolicy fired gaveUp(). |
| HotReconfigure | Transport-affecting setting changed while connected; reconnect in place. |
Definition at line 72 of file NTRIPManager.h.
|
explicit |
Definition at line 99 of file NTRIPManager.cc.
References ggaSourceChanged(), NTRIPSourceTableController::mountpointSelected(), qApp, ReconnectDue, NTRIPGgaProvider::sourceChanged(), and stopNTRIP().
|
override |
Definition at line 123 of file NTRIPManager.cc.
References stopNTRIP().
|
inline |
Definition at line 102 of file NTRIPManager.h.
|
signal |
|
inline |
Definition at line 108 of file NTRIPManager.h.
|
inline |
Definition at line 96 of file NTRIPManager.h.
|
signal |
| void NTRIPManager::fetchMountpoints | ( | ) |
Definition at line 229 of file NTRIPManager.cc.
References MultiVehicleManager::activeVehicle(), NTRIPSourceTableController::fetch(), NTRIPTransportConfig::fromSettings(), and MultiVehicleManager::instance().
|
inline |
Definition at line 104 of file NTRIPManager.h.
References NTRIPGgaProvider::currentSource().
|
signal |
Referenced by NTRIPManager().
| void NTRIPManager::init | ( | ) |
Explicit post-construction init. Must be called from QGCApplication after SettingsManager is ready — matches QGCPositionManager::init(). Do not rely on the singleton constructor for anything that touches other singletons.
Definition at line 139 of file NTRIPManager.cc.
References NTRIPGgaProvider::init(), SettingsManager::instance(), SettingsManager::ntripSettings(), qgcApp, and Fact::rawValueChanged().
|
static |
Definition at line 24 of file NTRIPManager.cc.
Referenced by GPSRtk::connectGPS().
| RTCMMavlink * NTRIPManager::rtcmMavlink | ( | ) | const |
Shared RTCM→MAVLink forwarder (created in init()). GPSRtk routes its serial-RTK corrections through this same instance for one GPS_RTCM_DATA sequence-id domain.
Definition at line 129 of file NTRIPManager.cc.
Referenced by GPSRtk::connectGPS().
|
inline |
Definition at line 100 of file NTRIPManager.h.
|
signal |
|
inline |
Definition at line 116 of file NTRIPManager.h.
References NTRIPSourceTableController::selectMountpoint().
| void NTRIPManager::setRtcmMavlink | ( | RTCMMavlink * | mavlink | ) |
Definition at line 134 of file NTRIPManager.cc.
|
inline |
Test seam: inject a transport (e.g. MockNTRIPTransport) consumed by the next Connecting entry. Production always constructs NTRIPHttpTransport.
Definition at line 123 of file NTRIPManager.h.
|
inline |
Definition at line 106 of file NTRIPManager.h.
| void NTRIPManager::startNTRIP | ( | ) |
Definition at line 219 of file NTRIPManager.cc.
References StartRequested.
|
inline |
Definition at line 98 of file NTRIPManager.h.
|
signal |
| void NTRIPManager::stopNTRIP | ( | ) |
Definition at line 224 of file NTRIPManager.cc.
References StopRequested.
Referenced by NTRIPManager(), and ~NTRIPManager().
|
friend |
Definition at line 31 of file NTRIPManager.h.