QKnxNetIpManufacturerDibProxy Class

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

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

Public Types

class Builder

Public Functions

QKnxNetIpManufacturerDibProxy(const QKnxNetIpDib &dib)
QKnxNetIp::DescriptionType descriptionType() const
bool isValid() const
QKnxByteArray manufacturerData() const
quint16 manufacturerId() const

Static Public Members

QKnxNetIpManufacturerDibProxy::Builder builder()

Detailed Description

Note: When using QKnxNetIpManufacturerDibProxy, 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 manufacturer specific device information can be achieved like this:

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

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

auto id = proxy.manufacturerId();
auto data = proxy.manufacturerData();

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

Member Function Documentation

QKnxNetIpManufacturerDibProxy::QKnxNetIpManufacturerDibProxy(const QKnxNetIpDib &dib)

Constructs a proxy object with the specified KNXnet/IP DIB structure dib to read a manufacturer specific device information block.

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

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

QKnxNetIp::DescriptionType QKnxNetIpManufacturerDibProxy::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.

bool QKnxNetIpManufacturerDibProxy::isValid() const

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

QKnxByteArray QKnxNetIpManufacturerDibProxy::manufacturerData() const

Returns the manufacturer data if the object that was passed during construction was valid; otherwise returns an empty byte array.

quint16 QKnxNetIpManufacturerDibProxy::manufacturerId() const

Returns the manufacturer ID of this KNXnet/IP structure if the object that was passed during construction was valid; otherwise returns 0.

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