QKnxNetIpExtendedDeviceDibProxy Class

The QKnxNetIpExtendedDeviceDibProxy class provides the means to read the extended device information of a KNXnet/IP device from the generic QKnxNetIpDib class and to create a KNXnet/IP extended device information block (DIB) structure. More...

Header: #include <QKnxNetIpExtendedDeviceDibProxy>
qmake: QT += knx
Since: Qt 5.12

This class was introduced in Qt 5.12.

Public Types

class Builder

Public Functions

QKnxNetIpExtendedDeviceDibProxy(const QKnxNetIpDib &dib)
QKnxNetIp::DescriptionType descriptionType() const
quint16 deviceDescriptorType0() const
bool isValid() const
quint16 maximumLocalApduLength() const
QKnx::MediumStatus mediumStatus() const

Static Public Members

QKnxNetIpExtendedDeviceDibProxy::Builder builder()

Detailed Description

A KNXnet/IP extended device information DIB structure contains specific information about a KNXnet/IP device, such as the KNX medium status, maximum local APDU length and the device descriptor type (mask version).

In most programs, this class will not be used directly. Instead, the QKnxNetIpServerDiscoveryAgent and QKnxNetIpServerInfo are provided.

Note: When using QKnxNetIpExtendedDeviceDibProxy, care must be taken to ensure that the referenced KNXnet/IP DIB structure outlives the proxy on all code paths, lest the proxy ends up referencing deleted data.

Reading the extended device information can be achieved like this:

auto dib = QKnxNetIpDib::fromBytes(...);

QKnxNetIpExtendedDeviceDibProxy proxy(dib);
if (!proxy.isValid())
    return;

auto mediumStatus = proxy.mediumStatus();
auto adpuLength = proxy.maximumLocalApduLength();
auto descriptorType = proxy.deviceDescriptorType0();

See also builder() and Qt KNXnet/IP Connection Classes.

Member Function Documentation

QKnxNetIpExtendedDeviceDibProxy::QKnxNetIpExtendedDeviceDibProxy(const QKnxNetIpDib &dib)

Constructs a proxy object with the specified KNXnet/IP DIB structure dib to read the extended device information of a KNXnet/IP device.

[static] QKnxNetIpExtendedDeviceDibProxy::Builder QKnxNetIpExtendedDeviceDibProxy::builder()

Returns a builder object to create a KNXnet/IP device information DIB structure.

QKnxNetIp::DescriptionType QKnxNetIpExtendedDeviceDibProxy::descriptionType() const

Returns the description type of this KNXnet/IP structure if the object that was passed during construction was valid; otherwise returns QKnx::NetIp::Unknown.

quint16 QKnxNetIpExtendedDeviceDibProxy::deviceDescriptorType0() const

Returns the device descriptor type (mask version) carried by this KNXnet/IP DIB structure if the object that was passed during construction was valid; otherwise returns a default-constructed value which can be 0.

bool QKnxNetIpExtendedDeviceDibProxy::isValid() const

Returns true if the KNXnet/IP structure to create the object is a valid KNXnet/IP DIB structure; otherwise returns false.

quint16 QKnxNetIpExtendedDeviceDibProxy::maximumLocalApduLength() const

Returns the maximum local APDU length carried by this KNXnet/IP DIB structure if the object that was passed during construction was valid; otherwise returns a default-constructed value which can be 0.

QKnx::MediumStatus QKnxNetIpExtendedDeviceDibProxy::mediumStatus() const

Returns the medium status contained inside the KNXnet/IP DIB structure if the object that was passed during construction was valid; otherwise returns QKnx::Unknown.

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