QKnxNetIpServerInfo Class

The QKnxNetIpServerInfo class stores information about a KNXnet/IP server. More...

Header: #include <QKnxNetIpServerInfo>
qmake: QT += knx

Public Functions

QKnxNetIpServerInfo()
QKnxNetIpServerInfo(const QKnxNetIpServerInfo &other)
QKnxNetIpServerInfo(QKnxNetIpServerInfo &&other)
~QKnxNetIpServerInfo()
QHostAddress controlEndpointAddress() const
quint16 controlEndpointPort() const
QString deviceName() const
QKnxNetIpHpai endpoint() const
QKnxNetIpDib extendedHardware() const
QKnxNetIpDib hardware() const
QKnxAddress individualAddress() const
quint16 maskVersion() const
quint16 maximumLocalApduLength() const
QKnx::MediumStatus mediumStatus() const
QKnxNetIpDib services() const
QVector<QKnxServiceInfo> supportedServices() const
void swap(QKnxNetIpServerInfo &other)
QKnxNetIpDib tunnelingInfo() const
QVector<QKnxNetIpTunnelingSlotInfo> tunnelingSlotInfos() const
bool operator!=(const QKnxNetIpServerInfo &other) const
QKnxNetIpServerInfo &operator=(const QKnxNetIpServerInfo &other)
QKnxNetIpServerInfo &operator=(QKnxNetIpServerInfo &&other)
bool operator==(const QKnxNetIpServerInfo &other) const

Detailed Description

The QKnxNetIpServerInfo class stores information about a KNXnet/IP server.

A KNXnet/IP server information object contains the information provided by the server during its discovery (using for example QKnxNetIpServerDiscoveryAgent) that the client needs to establish a connection. This includes the device name and individual address of the server, a KNXnet/IP transport connection endpoint, and the services supported by the server.

KNXnet/IP servers are typically connected to one KNX subnetwork and to an IP network. Therefore, they have one KNX individual address returned by individualAddress() and one IP address returned by controlEndpointAddress().

A KNXnet/IP server can support the following service types: core, device management, tunneling, routing, remote logging and configuration, and object server. The supported services are returned by supportedServices() as a vector of QKnxServiceInfo objects or by services() as a QKnxNetIpDib object which can be accessed via QKnxNetIpServiceFamiliesDibProxy.

Furthermore, as specified by the KNX application note AN185, the server info may contain additional tunneling and extend device hardware information. If the information is present, it is made accessible through the mediumStatus(), maximumLocalApduLength(), maskVersion(), and tunnelingSlotInfos() functions. It is also possible to introspect the raw structures via their corresponding proxy objects.

Here is an example on how to use the extended device information proxy in a search that is started using the QKnxNetIpServerDiscoveryAgent:

const auto servers = agent.discoveredServers();
for (auto server : servers) {
    const auto dib = server.extendedHardware();
    QKnxNetIpExtendedDeviceDibProxy proxy(dib);

    if (!proxy.isValid())
        continue;

    qDebug() << "Medium status:" << proxy.mediumStatus()
        << "Maximum local APDU length:" << proxy.maximumLocalApduLength()
        << "Device mask:" << proxy.deviceDescriptorType0();
}

See also QKnxAddress, QKnxNetIpHpai, QKnxNetIpHpaiProxy, QKnxNetIpDib, QKnxNetIpDeviceDibProxy, QKnxNetIpServiceFamiliesDibProxy, and Qt KNXnet/IP Connection Classes.

Member Function Documentation

QKnxNetIpServerInfo::QKnxNetIpServerInfo()

Creates a KNXnet/IP server information object.

QKnxNetIpServerInfo::QKnxNetIpServerInfo(const QKnxNetIpServerInfo &other)

Constructs a copy of other.

QKnxNetIpServerInfo::QKnxNetIpServerInfo(QKnxNetIpServerInfo &&other)

Move-constructs an object instance, making it point to the same object that other was pointing to.

QKnxNetIpServerInfo::~QKnxNetIpServerInfo()

Deletes a KNXnet/IP server information object.

QHostAddress QKnxNetIpServerInfo::controlEndpointAddress() const

Returns the host address of the control endpoint.

quint16 QKnxNetIpServerInfo::controlEndpointPort() const

Returns the port number of the control endpoint.

QString QKnxNetIpServerInfo::deviceName() const

Returns the device name.

QKnxNetIpHpai QKnxNetIpServerInfo::endpoint() const

Returns a KNXnet/IP transport connection endpoint.

See also QKnxNetIpHpaiProxy.

QKnxNetIpDib QKnxNetIpServerInfo::extendedHardware() const

Returns extended hardware information about the KNXnet/IP server hardware.

This function was introduced in Qt 5.12.

See also QKnxNetIpExtendedDeviceDibProxy.

QKnxNetIpDib QKnxNetIpServerInfo::hardware() const

Returns information about the KNXnet/IP server hardware.

See also QKnxNetIpDeviceDibProxy.

QKnxAddress QKnxNetIpServerInfo::individualAddress() const

Returns the individual address of the server.

quint16 QKnxNetIpServerInfo::maskVersion() const

Returns the mask version (device descriptor 0) of the discovered KNXnet/IP server if it supports extended device information; otherwise returns a default-constructed value which can be 0.

This function was introduced in Qt 5.12.

quint16 QKnxNetIpServerInfo::maximumLocalApduLength() const

Returns the maximum local application protocol data unit (APDU) length of the discovered KNXnet/IP server if it supports extended device information; otherwise returns a default-constructed value which can be 0.

This function was introduced in Qt 5.12.

QKnx::MediumStatus QKnxNetIpServerInfo::mediumStatus() const

Returns the medium status of the discovered KNXnet/IP server if it supports extended device information; otherwise returns QKnx::Unknown.

This function was introduced in Qt 5.12.

QKnxNetIpDib QKnxNetIpServerInfo::services() const

Returns the services available on a KNXnet/IP server.

See also QKnxNetIpServiceFamiliesDibProxy.

QVector<QKnxServiceInfo> QKnxNetIpServerInfo::supportedServices() const

Returns the services supported by a KNXnet/IP server.

void QKnxNetIpServerInfo::swap(QKnxNetIpServerInfo &other)

Swaps the server information object other with this object.

QKnxNetIpDib QKnxNetIpServerInfo::tunnelingInfo() const

Returns tunneling information if available on a KNXnet/IP server.

This function was introduced in Qt 5.12.

See also QKnxNetIpTunnelingInfoDibProxy.

QVector<QKnxNetIpTunnelingSlotInfo> QKnxNetIpServerInfo::tunnelingSlotInfos() const

Returns the available tunneling slots of the discovered KNXnet/IP server if it supports providing this kind of information; otherwise returns an empty vector.

This function was introduced in Qt 5.12.

bool QKnxNetIpServerInfo::operator!=(const QKnxNetIpServerInfo &other) const

Returns true if other points to a different item than this server information object. Otherwise, returns false.

QKnxNetIpServerInfo &QKnxNetIpServerInfo::operator=(const QKnxNetIpServerInfo &other)

Assigns other to this object.

QKnxNetIpServerInfo &QKnxNetIpServerInfo::operator=(QKnxNetIpServerInfo &&other)

Move-constructs an object instance, making it point to the same object that other was pointing to.

bool QKnxNetIpServerInfo::operator==(const QKnxNetIpServerInfo &other) const

Returns true if other points to the same item as this server information object. Otherwise, returns false.

© 2018 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.