|
QGroundControl
Ground Control Station for MAVLink Drones
|
#include <UDPLink.h>
Inheritance diagram for UDPConfiguration:
Collaboration diagram for UDPConfiguration:Signals | |
| void | hostListChanged () |
| void | localPortChanged () |
Signals inherited from LinkConfiguration | |
| void | nameChanged (const QString &name) |
| void | linkChanged () |
| void | linkActiveChanged () |
| void | dynamicChanged () |
| void | autoConnectChanged () |
| void | highLatencyChanged () |
Public Member Functions | |
| UDPConfiguration (const QString &name, QObject *parent=nullptr) | |
| UDPConfiguration (const UDPConfiguration *source, QObject *parent=nullptr) | |
| virtual | ~UDPConfiguration () |
| Q_INVOKABLE void | addHost (const QString &host) |
| Q_INVOKABLE void | addHost (const QString &host, quint16 port) |
| Q_INVOKABLE void | removeHost (const QString &host) |
| Q_INVOKABLE void | removeHost (const QString &host, quint16 port) |
| LinkType | type () const override |
| void | copyFrom (const LinkConfiguration *source) override |
| void | loadSettings (QSettings &settings, const QString &root) override |
| void | saveSettings (QSettings &settings, const QString &root) const override |
| QString | settingsURL () const override |
| Settings URL, Pure virtual method providing the URL for the (QML) settings dialog. | |
| QString | settingsTitle () const override |
| Settings Title, Pure virtual method providing the Title for the (QML) settings dialog. | |
| QStringList | hostList () const |
| QList< std::shared_ptr< UDPClient > > | targetHosts () const |
| QStringList | resolveHosts () const |
| Returns the hostnames that failed to resolve. | |
| bool | requireResolvedHosts () const |
| When false, connect proceeds (listening) even if a target host fails to resolve. | |
| void | setRequireResolvedHosts (bool require) |
| quint16 | localPort () const |
| void | setLocalPort (quint16 port) |
Public Member Functions inherited from LinkConfiguration | |
| LinkConfiguration (const QString &name, QObject *parent=nullptr) | |
| LinkConfiguration (const LinkConfiguration *copy, QObject *parent=nullptr) | |
| virtual | ~LinkConfiguration () |
| QString | name () const |
| void | setName (const QString &name) |
| LinkInterface * | link () const |
| void | setLink (const std::shared_ptr< LinkInterface > link) |
| bool | linkActive () const |
| bool | isDynamic () const |
| void | setDynamic (bool dynamic=true) |
| Set if this is this a dynamic configuration. (decided at runtime) | |
| bool | isForwarding () const |
| void | setForwarding (bool forwarding=true) |
| Set if this is this a forwarding link configuration. (decided at runtime) | |
| bool | isAutoConnect () const |
| void | setAutoConnect (bool autoc=true) |
| Set if this is this an Auto Connect configuration. | |
| bool | suppressAutoReconnect () const |
| void | setSuppressAutoReconnect (bool suppress) |
| bool | autoConnectStarted () const |
| void | setAutoConnectStarted (bool started) |
| bool | reconnectReady () const |
| int | reconnectAttempts () const |
| void | noteReconnectAttempt () |
| void | resetReconnectBackoff () |
| void | noteConnected () |
| void | noteDisconnected () |
| Reset backoff only if the link stayed up long enough to count as working. | |
| bool | isHighLatency () const |
| void | setHighLatency (bool hl=false) |
| Set if this is this an High Latency configuration. | |
Additional Inherited Members | |
Public Types inherited from LinkConfiguration | |
| enum | LinkType { TypeSerial , TypeUdp , TypeTcp , TypeBluetooth , TypeLogReplay , TypeLast } |
Static Public Member Functions inherited from LinkConfiguration | |
| static LinkConfiguration * | createSettings (int type, const QString &name) |
| static LinkConfiguration * | duplicateSettings (const LinkConfiguration *source) |
| static QString | settingsRoot () |
Protected Attributes inherited from LinkConfiguration | |
| std::weak_ptr< LinkInterface > | _link |
| Link currently using this configuration (if any) | |
|
explicit |
Definition at line 46 of file UDPLink.cc.
|
explicit |
Definition at line 51 of file UDPLink.cc.
References copyFrom().
|
virtual |
Definition at line 59 of file UDPLink.cc.
| void UDPConfiguration::addHost | ( | const QString & | host | ) |
Definition at line 129 of file UDPLink.cc.
References addHost().
Referenced by addHost(), LinkManager::createMavlinkForwardingSupportLink(), and loadSettings().
| void UDPConfiguration::addHost | ( | const QString & | host, |
| quint16 | port | ||
| ) |
Definition at line 147 of file UDPLink.cc.
|
overridevirtual |
Copy instance data, When manipulating data, you create a copy of the configuration using the copy constructor, edit it and then transfer its content to the original using this method.
| [in] | source | The source instance (the edited copy) |
Reimplemented from LinkConfiguration.
Definition at line 66 of file UDPLink.cc.
References LinkConfiguration::copyFrom(), localPort(), requireResolvedHosts(), setLocalPort(), setRequireResolvedHosts(), and targetHosts().
Referenced by UDPConfiguration().
|
signal |
|
overridevirtual |
Load settings, Pure virtual method telling the instance to load its configuration.
| [in] | settings | The QSettings instance to use |
| [in] | root | The root path of the setting. |
Implements LinkConfiguration.
Definition at line 89 of file UDPLink.cc.
References addHost(), SettingsManager::autoConnectSettings(), SettingsManager::instance(), and setLocalPort().
|
inline |
Definition at line 94 of file UDPLink.h.
Referenced by UDPWorker::connectLink(), and copyFrom().
|
signal |
Referenced by setLocalPort().
| void UDPConfiguration::removeHost | ( | const QString & | host | ) |
| void UDPConfiguration::removeHost | ( | const QString & | host, |
| quint16 | port | ||
| ) |
Definition at line 180 of file UDPLink.cc.
|
inline |
When false, connect proceeds (listening) even if a target host fails to resolve.
Definition at line 90 of file UDPLink.h.
Referenced by UDPWorker::connectLink(), and copyFrom().
| QStringList UDPConfiguration::resolveHosts | ( | ) | const |
Returns the hostnames that failed to resolve.
Definition at line 220 of file UDPLink.cc.
Referenced by UDPWorker::connectLink().
|
overridevirtual |
Save settings, Pure virtual method telling the instance to save its configuration.
| [in] | settings | The QSettings instance to use |
| [in] | root | The root path of the setting. |
Implements LinkConfiguration.
Definition at line 110 of file UDPLink.cc.
|
inline |
Definition at line 95 of file UDPLink.h.
References localPortChanged().
Referenced by copyFrom(), and loadSettings().
|
inline |
Definition at line 92 of file UDPLink.h.
Referenced by copyFrom().
|
inlineoverridevirtual |
Settings Title, Pure virtual method providing the Title for the (QML) settings dialog.
Implements LinkConfiguration.
|
inlineoverridevirtual |
Settings URL, Pure virtual method providing the URL for the (QML) settings dialog.
Implements LinkConfiguration.
|
inline |
Definition at line 84 of file UDPLink.h.
Referenced by copyFrom(), and UDPWorker::writeData().
|
inlineoverridevirtual |
Connection type, pure virtual method returning one of the -TypeXxx types above.
Implements LinkConfiguration.
Definition at line 76 of file UDPLink.h.
References LinkConfiguration::TypeUdp.