Builder Class

class QKnxNetIpDescriptionResponseProxy ::Builder

The QKnxNetIpDescriptionResponseProxy::Builder class provides the means to create a KNXnet/IP description response frame. 更多...

公共函数

QKnxNetIpFrame create () const
Builder & setDeviceHardware (const QKnxNetIpDib & ddib )
Builder & setOptionalDibs (const QVector<QKnxNetIpDib> & dibs )
Builder & setSupportedFamilies (const QKnxNetIpDib & sdib )

详细描述

A description response frame contains information about the supported protocol version range, the KNXnet/IP server capabilities, state information, and optionally a friendly name for this server's KNX connection.

In most programs, this class will not be used directly. Instead, the QKnxNetIpServerDescriptionAgent and QKnxNetIpServerInfo are provided to check that the server supports the requested connection type and options.

The common way to create a a description response is:

auto ddib = QKnxNetIpDeviceDibProxy::builder().create();
auto sdib = QKnxNetIpServiceFamiliesDibProxy::builder().create();
auto response = QKnxNetIpDescriptionResponseProxy::builder()
    .setDeviceHardware(ddib)
    .setSupportedFamilies(sdib)
    .create();
					

成员函数文档编制

QKnxNetIpFrame Builder:: create () const

Creates and returns a KNXnet/IP description response frame.

注意: KNXnet/IP tunneling information DIB structures are only allowed in extended description response frames. The function therefore removes these structures before creating the description response frame.

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

另请参阅 isValid ().

Builder &Builder:: setDeviceHardware (const QKnxNetIpDib & ddib )

Sets the KNXnet/IP server device information block (DIB) to ddib and returns a reference to the builder.

Builder &Builder:: setOptionalDibs (const QVector < QKnxNetIpDib > & dibs )

Sets the optional KNXnet/IP server device information block (DIB) structure to dibs and returns a reference to the builder.

Builder &Builder:: setSupportedFamilies (const QKnxNetIpDib & sdib )

Sets the device families supported by the KNXnet/IP server to sdib and returns a reference to the builder.

注意: A service family higher than or equal to the security family is not allowed in a description response and it shall not be set in the builder if it is passed in via this method.