Builder Class

class QKnxNetIpTunnelingInfoDibProxy::Builder

The QKnxNetIpTunnelingInfoDibProxy::Builder class creates a KNXnet/IP tunneling info DIB structure. More...

This class was introduced in Qt 5.12.

Public Functions

Builder(const Builder &other)
Builder()
Builder &operator=(const Builder &other)
~Builder()
QKnxNetIpDib create() const
Builder &setMaximumInterfaceApduLength(quint16 length)
Builder &setOptionalSlotInfos(const QVector<QKnxNetIpTunnelingSlotInfo> &infos)
Builder &setTunnelingSlotInfo(const QKnxNetIpTunnelingSlotInfo &info)

Detailed Description

A KNXnet/IP tunneling info DIB structure contains the maximum application layer protocol data unit (APDU) length supported by a KNXnet/IP tunneling interface for bus access and one or more tunneling slot information objects.

The common way to create such a DIB structure is:

auto dib = QKnxNetIpTunnelingInfoDibProxy::builder()
    .setMaximumInterfaceApduLength(0x1000)
    .setTunnelingSlotInfo({ { QKnxAddress::Type::Individual, 1976 },
        QKnxNetIpTunnelingSlotInfo::Available
    }).setOptionalSlotInfos({
        { { QKnxAddress::Type::Individual, 2013 },
            QKnxNetIpTunnelingSlotInfo::Usable
                | QKnxNetIpTunnelingSlotInfo::Authorized
                | QKnxNetIpTunnelingSlotInfo::Free },
        { { QKnxAddress::Type::Individual, 1978 }, QKnxNetIpTunnelingSlotInfo::NotAvailable },
        { QKnxNetIpTunnelingSlotInfo({ QKnxAddress::Type::Individual, 2002 }) }
    }).create();

Member Function Documentation

Builder::Builder(const Builder &other)

Constructs a copy of other.

Builder::Builder()

Creates a new empty tunneling info DIB structure builder object.

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

Assigns the specified other to this object.

Builder::~Builder()

Destroys the object and frees any allocated resources.

QKnxNetIpDib Builder::create() const

Creates and returns a tunneling info QKnxNetIpDib.

Note: The returned structure may be invalid depending on the values used during setup.

Note: Invalid tunneling slot information objects are not taken into account when creating the tunneling information QKnxNetIpDib.

See also isValid().

Builder &Builder::setMaximumInterfaceApduLength(quint16 length)

Sets the maximum APDU length of the KNXnet/IP DIB structure to length and returns a reference to the builder.

Builder &Builder::setOptionalSlotInfos(const QVector<QKnxNetIpTunnelingSlotInfo> &infos)

Sets the optional tunneling slot information of the KNXnet/IP DIB structure to infos and returns a reference to the builder.

Builder &Builder::setTunnelingSlotInfo(const QKnxNetIpTunnelingSlotInfo &info)

Sets the mandatory tunneling slot information of the KNXnet/IP DIB structure to info and returns a reference to the builder.

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