|
QGroundControl
Ground Control Station for MAVLink Drones
|
Interface holding link specific settings. More...
#include <LinkConfiguration.h>
Inheritance diagram for LinkConfiguration:
Collaboration diagram for LinkConfiguration:Public Types | |
| enum | LinkType { TypeSerial , TypeUdp , TypeTcp , TypeBluetooth , TypeLogReplay , TypeLast } |
Signals | |
| void | nameChanged (const QString &name) |
| void | linkChanged () |
| void | dynamicChanged () |
| void | autoConnectChanged () |
| void | highLatencyChanged () |
Public Member Functions | |
| 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 | 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 |
| virtual void | setAutoConnect (bool autoc=true) |
| Set if this is this an Auto Connect configuration. | |
| bool | isHighLatency () const |
| void | setHighLatency (bool hl=false) |
| Set if this is this an High Latency configuration. | |
| virtual void | copyFrom (const LinkConfiguration *source) |
| virtual LinkType | type () const =0 |
| virtual void | loadSettings (QSettings &settings, const QString &root)=0 |
| virtual void | saveSettings (QSettings &settings, const QString &root) const =0 |
| virtual QString | settingsURL () const =0 |
| Settings URL, Pure virtual method providing the URL for the (QML) settings dialog. | |
| virtual QString | settingsTitle () const =0 |
| Settings Title, Pure virtual method providing the Title for the (QML) settings dialog. | |
Static Public Member Functions | |
| static LinkConfiguration * | createSettings (int type, const QString &name) |
| static LinkConfiguration * | duplicateSettings (const LinkConfiguration *source) |
| static QString | settingsRoot () |
Protected Attributes | |
| std::weak_ptr< LinkInterface > | _link |
| Link currently using this configuration (if any) | |
Interface holding link specific settings.
Definition at line 11 of file LinkConfiguration.h.
The link types supported by QGC Any changes here MUST be reflected in LinkManager::linkTypeStrings()
| Enumerator | |
|---|---|
| TypeSerial | Serial Link. |
| TypeUdp | UDP Link. |
| TypeTcp | TCP Link. |
| TypeBluetooth | Bluetooth Link. |
| TypeLogReplay | |
| TypeLast | |
Definition at line 71 of file LinkConfiguration.h.
| LinkConfiguration::LinkConfiguration | ( | const QString & | name, |
| QObject * | parent = nullptr |
||
| ) |
Definition at line 16 of file LinkConfiguration.cc.
| LinkConfiguration::LinkConfiguration | ( | const LinkConfiguration * | copy, |
| QObject * | parent = nullptr |
||
| ) |
Definition at line 23 of file LinkConfiguration.cc.
|
virtual |
Definition at line 36 of file LinkConfiguration.cc.
|
signal |
Referenced by setAutoConnect().
|
virtual |
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 in MockConfiguration, BluetoothConfiguration, LogReplayConfiguration, SerialConfiguration, TCPConfiguration, and UDPConfiguration.
Definition at line 41 of file LinkConfiguration.cc.
References _link, isAutoConnect(), isDynamic(), isHighLatency(), name(), setAutoConnect(), setDynamic(), setHighLatency(), setLink(), and setName().
Referenced by MockConfiguration::copyFrom(), BluetoothConfiguration::copyFrom(), LogReplayConfiguration::copyFrom(), SerialConfiguration::copyFrom(), TCPConfiguration::copyFrom(), UDPConfiguration::copyFrom(), and LinkManager::endConfigurationEditing().
|
static |
Configuration Factory to create new link configuration instance based on the given type.
Definition at line 52 of file LinkConfiguration.cc.
References name(), type(), TypeBluetooth, TypeLast, TypeLogReplay, TypeSerial, TypeTcp, and TypeUdp.
Referenced by LinkManager::createConfiguration().
|
static |
Duplicate configuration instance. Helper method to create a new instance copy for editing.
Definition at line 87 of file LinkConfiguration.cc.
References type(), TypeBluetooth, TypeLast, TypeLogReplay, TypeSerial, TypeTcp, and TypeUdp.
Referenced by LinkManager::startConfigurationEditing().
|
signal |
Referenced by setDynamic().
|
signal |
Referenced by setHighLatency().
|
inline |
Definition at line 52 of file LinkConfiguration.h.
Referenced by SerialWorker::connectToPort(), copyFrom(), and UDPConfiguration::setAutoConnect().
|
inline |
Is this a dynamic configuration?
Definition at line 40 of file LinkConfiguration.h.
Referenced by copyFrom().
|
inline |
Is this a forwarding link configuration?
Definition at line 47 of file LinkConfiguration.h.
|
inline |
Is this a High Latency configuration?
Definition at line 59 of file LinkConfiguration.h.
Referenced by copyFrom().
|
inline |
Definition at line 35 of file LinkConfiguration.h.
References _link.
Referenced by LinkManager::removeConfiguration(), and setLink().
|
signal |
Referenced by setLink().
|
pure virtual |
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. |
Implemented in MockConfiguration, BluetoothConfiguration, LogReplayConfiguration, SerialConfiguration, TCPConfiguration, and UDPConfiguration.
Referenced by LinkManager::loadLinkConfigurationList().
|
inline |
Definition at line 32 of file LinkConfiguration.h.
Referenced by SerialConfiguration::cleanPortDisplayName(), copyFrom(), createSettings(), LinkManager::endConfigurationEditing(), LogReplayLink::LogReplayLink(), MockLink::MockLink(), SerialLink::SerialLink(), BluetoothConfiguration::setDevice(), setName(), SerialConfiguration::setPortName(), TCPLink::TCPLink(), and UDPLink::UDPLink().
|
signal |
Referenced by LinkManager::endConfigurationEditing(), and setName().
|
pure virtual |
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. |
Implemented in MockConfiguration, BluetoothConfiguration, LogReplayConfiguration, SerialConfiguration, TCPConfiguration, and UDPConfiguration.
|
virtual |
Set if this is this an Auto Connect configuration.
Reimplemented in UDPConfiguration.
Definition at line 150 of file LinkConfiguration.cc.
References autoConnectChanged().
Referenced by copyFrom(), LinkManager::loadLinkConfigurationList(), and UDPConfiguration::setAutoConnect().
| void LinkConfiguration::setDynamic | ( | bool | dynamic = true | ) |
Set if this is this a dynamic configuration. (decided at runtime)
Definition at line 142 of file LinkConfiguration.cc.
References dynamicChanged().
Referenced by copyFrom().
|
inline |
Set if this is this a forwarding link configuration. (decided at runtime)
Definition at line 50 of file LinkConfiguration.h.
| void LinkConfiguration::setHighLatency | ( | bool | hl = false | ) |
Set if this is this an High Latency configuration.
Definition at line 158 of file LinkConfiguration.cc.
References highLatencyChanged().
Referenced by copyFrom(), and LinkManager::loadLinkConfigurationList().
| void LinkConfiguration::setLink | ( | const std::shared_ptr< LinkInterface > | link | ) |
Definition at line 130 of file LinkConfiguration.cc.
References _link, LinkInterface::disconnected(), link(), and linkChanged().
Referenced by copyFrom().
| void LinkConfiguration::setName | ( | const QString & | name | ) |
Definition at line 122 of file LinkConfiguration.cc.
References name(), and nameChanged().
Referenced by copyFrom(), and LinkManager::startLogReplay().
|
inlinestatic |
Root path for QSettings
Definition at line 116 of file LinkConfiguration.h.
Referenced by LinkManager::loadLinkConfigurationList(), and LinkManager::saveLinkConfigurationList().
|
pure virtual |
Settings Title, Pure virtual method providing the Title for the (QML) settings dialog.
Implemented in MockConfiguration, BluetoothConfiguration, LogReplayConfiguration, SerialConfiguration, TCPConfiguration, and UDPConfiguration.
|
pure virtual |
Settings URL, Pure virtual method providing the URL for the (QML) settings dialog.
Implemented in MockConfiguration, BluetoothConfiguration, LogReplayConfiguration, SerialConfiguration, TCPConfiguration, and UDPConfiguration.
|
pure virtual |
Connection type, pure virtual method returning one of the -TypeXxx types above.
Implemented in MockConfiguration, BluetoothConfiguration, LogReplayConfiguration, SerialConfiguration, TCPConfiguration, and UDPConfiguration.
Referenced by createSettings(), duplicateSettings(), and LinkManager::startConfigurationEditing().
|
protected |
Link currently using this configuration (if any)
Definition at line 126 of file LinkConfiguration.h.
Referenced by copyFrom(), link(), and setLink().