Builder Class

class QKnxNetIpTunnelingInfoDibProxy ::Builder

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

该类在 Qt 5.12 引入。

公共函数

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 )

详细描述

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();
					

成员函数文档编制

Builder:: Builder (const Builder & other )

构造副本为 other .

Builder:: Builder ()

Creates a new empty tunneling info DIB structure builder object.

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

赋值指定 other 到此对象。

Builder:: ~Builder ()

销毁对象并释放任何分配资源。

QKnxNetIpDib Builder:: create () const

Creates and returns a tunneling info QKnxNetIpDib .

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

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

另请参阅 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.