QKnxNetIpTunnelConnection Class

The QKnxNetIpTunnelConnection class enables the opening and handling of a client connection to a KNXnet/IP server. More...

Header: #include <QKnxNetIpTunnelConnection>
qmake: QT += knx
Inherits: QKnxNetIpEndpointConnection

Public Functions

QKnxNetIpTunnelConnection(QObject *parent = nullptr)
QKnxNetIpTunnelConnection(const QHostAddress &localAddress, QObject *parent = nullptr)
QKnxNetIpTunnelConnection(const QHostAddress &localAddress, quint16 localPort, QObject *parent = nullptr)
QKnxNetIpTunnelConnection(const QHostAddress &localAddress, quint16 localPort, QKnxNetIp::TunnelingLayer layer, QObject *parent = nullptr)
~QKnxNetIpTunnelConnection() override = default
QKnxAddress individualAddress() const
QKnxNetIp::TunnelingLayer layer() const
bool sendTunnelFrame(const QKnxTunnelFrame &frame)
void setIndividualAddress(const QKnxAddress &address)
void setTunnelingLayer(QKnxNetIp::TunnelingLayer layer)

Signals

void receivedTunnelFrame(QKnxTunnelFrame frame)

Additional Inherited Members

  • 1 property inherited from QObject
  • 1 public slot inherited from QObject
  • 1 public variable inherited from QObject
  • 10 static public members inherited from QObject
  • 9 protected functions inherited from QObject
  • 2 protected variables inherited from QObject

Detailed Description

The QKnxNetIpTunnelConnection class enables the opening and handling of a client connection to a KNXnet/IP server.

The QKnxNetIpTunnelConnection is a data connection between a client and a KNXnet/IP server endpoint. This is used to access functionalities of devices on a KNX bus. The IP address of the client must be set. It is then possible to connect to a chosen KNXnet/IP server and to send QKnxTunnelFrame frames to the KNXnet/IP server.

The class takes care of connecting to the server, asking for a data connection, and monitoring the connection:

QKnxNetIpTunnelConnection tunnel;
QHostAddress clientLocalAddress = ...
tunnel.setLocalAddress(clientLocalAddress);

QHostAddress knxNetIpServerAddress = ...
quint16 knxNetIpServerDataEndPointPort = ...
tunnel.connectToHost(knxNetIpServerAddress, knxNetIpServerDataEndPointPort);

QKnxTunnelFrame frame = ...
tunnel.sendTunnelFrame(frame);

Member Function Documentation

QKnxNetIpTunnelConnection::QKnxNetIpTunnelConnection(QObject *parent = nullptr)

Default constructs an instance of QKnxNetIpTunnelConnection.

QKnxNetIpTunnelConnection::QKnxNetIpTunnelConnection(const QHostAddress &localAddress, QObject *parent = nullptr)

Default constructs an instance of QKnxNetIpTunnelConnection.

QKnxNetIpTunnelConnection::QKnxNetIpTunnelConnection(const QHostAddress &localAddress, quint16 localPort, QObject *parent = nullptr)

Default constructs an instance of QKnxNetIpTunnelConnection.

QKnxNetIpTunnelConnection::QKnxNetIpTunnelConnection(const QHostAddress &localAddress, quint16 localPort, QKnxNetIp::TunnelingLayer layer, QObject *parent = nullptr)

Default constructs an instance of QKnxNetIpTunnelConnection.

[default] QKnxNetIpTunnelConnection::~QKnxNetIpTunnelConnection()

Destroys the instance of QKnxNetIpTunnelConnection.

QKnxAddress QKnxNetIpTunnelConnection::individualAddress() const

See also setIndividualAddress().

QKnxNetIp::TunnelingLayer QKnxNetIpTunnelConnection::layer() const

[signal] void QKnxNetIpTunnelConnection::receivedTunnelFrame(QKnxTunnelFrame frame)

bool QKnxNetIpTunnelConnection::sendTunnelFrame(const QKnxTunnelFrame &frame)

void QKnxNetIpTunnelConnection::setIndividualAddress(const QKnxAddress &address)

See also individualAddress().

void QKnxNetIpTunnelConnection::setTunnelingLayer(QKnxNetIp::TunnelingLayer layer)

© 2017 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.