QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
NTRIPTransportConfig.h
Go to the documentation of this file.
1#pragma once
2
3#include <QtCore/QString>
4#include <QtCore/QVector>
5
6class NTRIPSettings;
7
9{
10 QString host;
11 int port = 2101;
12 QString username;
13 QString password;
14 QString mountpoint;
15 QString whitelist;
16 bool useTls = false;
18
19 // UDP forwarding
20 bool udpForwardEnabled = false;
22 quint16 udpTargetPort = 0;
23
24 bool operator==(const NTRIPTransportConfig&) const = default;
25
29 QString validationError() const;
30
31 bool isValid() const { return validationError().isEmpty(); }
32
33 // The three differ-checks below must jointly cover every field (union == operator!=);
34 // a new field assigned to none silently breaks reconnect.
35
38 bool transportDiffers(const NTRIPTransportConfig& other) const;
39
42 bool udpForwardDiffers(const NTRIPTransportConfig& other) const;
43
46 bool whitelistDiffers(const NTRIPTransportConfig& other) const { return whitelist != other.whitelist; }
47
52 QString casterIdentity() const;
53
55
59 static QVector<int> parseWhitelist(const QString& csv);
60};
bool whitelistDiffers(const NTRIPTransportConfig &other) const
bool transportDiffers(const NTRIPTransportConfig &other) const
static NTRIPTransportConfig fromSettings(NTRIPSettings &settings)
bool udpForwardDiffers(const NTRIPTransportConfig &other) const
QString validationError() const
bool operator==(const NTRIPTransportConfig &) const =default
static QVector< int > parseWhitelist(const QString &csv)