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 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)
 
LinkInterfacelink () 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.
 

Additional Inherited Members

- Public Types inherited from LinkConfiguration
enum  LinkType {
  TypeSerial , TypeUdp , TypeTcp , TypeBluetooth ,
  TypeLogReplay , TypeLast
}
 
- Static Public Member Functions inherited from LinkConfiguration
static LinkConfigurationcreateSettings (int type, const QString &name)
 
static LinkConfigurationduplicateSettings (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 20 of file TCPLink.cc.

◆ TCPConfiguration() [2/2]

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

Definition at line 26 of file TCPLink.cc.

◆ ~TCPConfiguration()

TCPConfiguration::~TCPConfiguration ( )
override

Definition at line 34 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 56 of file TCPLink.cc.

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

◆ host()

QString TCPConfiguration::host ( ) const
inline

◆ 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 66 of file TCPLink.cc.

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

◆ port()

quint16 TCPConfiguration::port ( ) const
inline

◆ 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 76 of file TCPLink.cc.

References host(), and port().

◆ setHost()

void TCPConfiguration::setHost ( const QString &  host)

Definition at line 39 of file TCPLink.cc.

References host(), and hostChanged().

Referenced by copyFrom(), and loadSettings().

◆ setPort()

void TCPConfiguration::setPort ( quint16  port)

Definition at line 48 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: