6#include <QtCore/QObject>
7#include <QtCore/QPointer>
8#include <QtQmlIntegration/QtQmlIntegration>
30 void submit(
const QByteArray& data, qint64 receivedAtMs,
const QString& instance = {})
const;
35 const QString& instance);
37 const QPointer<GPSCorrectionManager> _manager;
39 const QString _instance;
49 QML_UNCREATABLE(
"Provided by the GPS manager")
112 const QString& instance);
133 Q_INVOKABLE
static QString
sourceName(
int source);
148 qint64 receivedAtMs);
151 [[nodiscard]]
bool _applyUdpInput();
152 [[nodiscard]]
bool _applyUdpOutput();
153 bool _udpInputEnabled()
const;
154 void _startUdpInput();
155 void _retryUdpInput();
157 void _scheduleRefresh();
168 std::unique_ptr<GPSCorrectionSourceHandle> _udpSource;
170 std::optional<Configuration> _configuration;
173 quint64 _selectedBytesPerSecond = 0;
174 QString _udpInputError;
175 QString _udpOutputError;
176 bool _shutdown =
false;
QString udpOutputError() const
Why the enabled UDP output does not forward; empty while it forwards or is disabled.
static Q_INVOKABLE QString sourceName(int source)
void vehicleBytesSubmittedChanged()
QString udpInputError() const
Why the enabled UDP input is not listening; empty while it listens or is disabled.
quint64 vehicleBytesSubmitted() const
Bytes of the selected streams that vehicle links admitted, from every source since startup.
quint64 selectedBytesPerSecond() const
Rate of the corrections sent from the selected stream.
void selectedBytesPerSecondChanged()
~GPSCorrectionManager() override
GPSCorrectionStream selectedStream() const
State
Whether vehicles receive RTK corrections, across NTRIP, UDP input, and the local receiver.
@ Inactive
No correction source is enabled.
@ Waiting
A source is enabled, but no fresh stream is selected for vehicles.
@ Fresh
A fresh stream is selected for vehicles.
RTCMMAVLink * rtcmMavlink()
The vehicle output, whose links tests replace with RTCMMAVLink::setOutputProvider().
std::unique_ptr< GPSCorrectionSourceHandle > openSource(GPSCorrectionSettings::CorrectionSource source, const QString &instance)
State state() const
As last published with stateChanged().
void setConfiguration(const Configuration &configuration)
Applies the parts that changed; ignored after shutdown().
CorrectionSource
Persisted values of correctionSource. The storage type keeps any saved value a valid enum value.
A begun correction source and the stream it delivers; destroying it ends the source.
void submit(const QByteArray &data, qint64 receivedAtMs, const QString &instance={}) const
~GPSCorrectionSourceHandle()
quint64 totalBytesSubmitted() const
The correction settings as values; the application's settings binding supplies them.
bool operator==(const Configuration &) const =default
GPSCorrectionSettings::CorrectionSource source
The only source routed to vehicles, or HighestPriority to select automatically.
UdpInputConfiguration udpInput
Listens for RTCM on a UDP port as the Udp source. A port that cannot be bound is retried every second...
UdpOutputConfiguration udpOutput
Forwards the selected stream to a UDP peer.
bool operator==(const UdpOutputConfiguration &) const =default
The stream vehicles receive: its source category and the instance within it.