QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
TCPConfiguration Class Reference

#include <TCPLink.h>

Inheritance diagram for TCPConfiguration:
Collaboration diagram for TCPConfiguration:

Signals

void hostChanged ()
void portChanged ()
Signals inherited from LinkConfiguration
void nameChanged (const QString &name)
void linkChanged ()
void linkActiveChanged ()
void dynamicChanged ()
void autoConnectChanged ()
void highLatencyChanged ()

Public Member Functions

 TCPConfiguration (const QString &name, QObject *parent=nullptr)
 TCPConfiguration (const TCPConfiguration *copy, QObject *parent=nullptr)
 ~TCPConfiguration () override
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.
QString host () const
void setHost (const QString &host)
quint16 port () const
void setPort (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).

Detailed Description

Definition at line 17 of file TCPLink.h.

Constructor & Destructor Documentation

◆ TCPConfiguration() [1/2]

TCPConfiguration::TCPConfiguration ( const QString & name,
QObject * parent = nullptr )
explicit

Definition at line 19 of file TCPLink.cc.

References LinkConfiguration::LinkConfiguration(), and LinkConfiguration::name().

Referenced by copyFrom(), and TCPConfiguration().

◆ TCPConfiguration() [2/2]

TCPConfiguration::TCPConfiguration ( const TCPConfiguration * copy,
QObject * parent = nullptr )
explicit

Definition at line 25 of file TCPLink.cc.

References host(), LinkConfiguration::LinkConfiguration(), port(), and TCPConfiguration().

◆ ~TCPConfiguration()

TCPConfiguration::~TCPConfiguration ( )
override

Definition at line 33 of file TCPLink.cc.

Member Function Documentation

◆ copyFrom()

void TCPConfiguration::copyFrom ( const LinkConfiguration * source)
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.

Parameters
[in]sourceThe source instance (the edited copy)

Reimplemented from LinkConfiguration.

Definition at line 55 of file TCPLink.cc.

References LinkConfiguration::copyFrom(), host(), LinkConfiguration::LinkConfiguration(), port(), setHost(), setPort(), and TCPConfiguration().

◆ host()

QString TCPConfiguration::host ( ) const
inline

Definition at line 36 of file TCPLink.h.

Referenced by copyFrom(), loadSettings(), saveSettings(), setHost(), and TCPConfiguration().

◆ hostChanged

void TCPConfiguration::hostChanged ( )
signal

Referenced by setHost().

◆ loadSettings()

void TCPConfiguration::loadSettings ( QSettings & settings,
const QString & root )
overridevirtual

Load settings, Pure virtual method telling the instance to load its configuration.

Parameters
[in]settingsThe QSettings instance to use
[in]rootThe root path of the setting.

Implements LinkConfiguration.

Definition at line 69 of file TCPLink.cc.

References host(), port(), setHost(), and setPort().

◆ port()

quint16 TCPConfiguration::port ( ) const
inline

Definition at line 38 of file TCPLink.h.

Referenced by copyFrom(), loadSettings(), saveSettings(), setPort(), and TCPConfiguration().

◆ portChanged

void TCPConfiguration::portChanged ( )
signal

Referenced by setPort().

◆ saveSettings()

void TCPConfiguration::saveSettings ( QSettings & settings,
const QString & root ) const
overridevirtual

Save settings, Pure virtual method telling the instance to save its configuration.

Parameters
[in]settingsThe QSettings instance to use
[in]rootThe root path of the setting.

Implements LinkConfiguration.

Definition at line 79 of file TCPLink.cc.

References host(), and port().

◆ setHost()

void TCPConfiguration::setHost ( const QString & host)

Definition at line 38 of file TCPLink.cc.

References host(), and hostChanged().

Referenced by copyFrom(), and loadSettings().

◆ setPort()

void TCPConfiguration::setPort ( quint16 port)

Definition at line 47 of file TCPLink.cc.

References port(), and portChanged().

Referenced by copyFrom(), and loadSettings().

◆ settingsTitle()

QString TCPConfiguration::settingsTitle ( ) const
inlineoverridevirtual

Settings Title, Pure virtual method providing the Title for the (QML) settings dialog.

Implements LinkConfiguration.

Definition at line 34 of file TCPLink.h.

◆ settingsURL()

QString TCPConfiguration::settingsURL ( ) const
inlineoverridevirtual

Settings URL, Pure virtual method providing the URL for the (QML) settings dialog.

Implements LinkConfiguration.

Definition at line 33 of file TCPLink.h.

◆ type()

LinkType TCPConfiguration::type ( ) const
inlineoverridevirtual

Connection type, pure virtual method returning one of the -TypeXxx types above.

Returns
The type of links these settings belong to.

Implements LinkConfiguration.

Definition at line 29 of file TCPLink.h.

References LinkConfiguration::TypeTcp.


The documentation for this class was generated from the following files: