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.