Builder Class

class QKnxNetIpCrdProxy ::Builder

The QKnxNetIpCrdProxy::Builder class creates a KNXnet/IP connection response data (CDR) structure. 更多...

公共函数

QKnxNetIpCrd create () const
Builder & setAdditionalData (const QKnxByteArray & additionalData )
Builder & setConnectionType (QKnxNetIp::ConnectionType type )
Builder & setIndividualAddress (const QKnxAddress & address )

详细描述

A KNXnet/IP CRD structure contains the data block returned with the connect response QKnxNetIpFrame .

The common way to create such a CRD structure is:

auto crd = QKnxNetIpCrdProxy::builder()
    .setConnectionType(QKnxNetIp::ConnectionType::Tunnel)
    .setIndividualAddress(QKnxAddress::createIndividual(1, 1, 1))
    .create();
					

成员函数文档编制

QKnxNetIpCrd Builder:: create () const

Creates and returns a KNXnet/IP CRD structure.

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

另请参阅 isValid ().

Builder &Builder:: setAdditionalData (const QKnxByteArray & additionalData )

Sets the additional data to additionalData and returns a reference to the builder.

The current KNX specification foresees additional data only in the case of tunneling.

另请参阅 setIndividualAddress ().

Builder &Builder:: setConnectionType ( QKnxNetIp::ConnectionType type )

Sets the connection type to type and returns a reference to the builder.

什么都不做若 type 不是 QKnx::NetIp::ConnectionType .

Builder &Builder:: setIndividualAddress (const QKnxAddress & address )

Sets the additional data to the individual address address and returns a reference to the builder.

什么都不做若 address is invalid or not an individual address.

另请参阅 setAdditionalData ().