Builder Class

class QKnxNetIpSearchResponseProxy ::Builder

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

公共函数

QKnxNetIpFrame create () const
Builder & setControlEndpoint (const QKnxNetIpHpai & hpai )
Builder & setDeviceHardware (const QKnxNetIpDib & ddib )
Builder & setSupportedFamilies (const QKnxNetIpDib & sdib )

详细描述

A search response frame contains the host address protocol information (HPAI) of the KNXnet/IP server's control endpoint to use for communication with a KNXnet/IP client.

In addition, a search response can contain information about the server hardware and the supported service families.

In most programs, this class will not be used directly. Instead, the QKnxNetIpServerDiscoveryAgent and QKnxNetIpServerInfo are provided to discover KNXnet/IP servers on the network.

The common way to create a a search response is:

QKnxNetIpHpai controlEndpoint;
QKnxNetIpDib deviceHardware, supportedFamillies;
auto netIpFrame = QKnxNetIpSearchResponseProxy::builder()
    .setControlEndpoint(controlEndpoint)
    .setSupportedFamilies(deviceHardware)
    .setDeviceHardware(supportedFamillies)
    .create();
					

Typically, after discovering a KNXnet/IP server, the KNXnet/IP client sends a description request, QKnxNetIpDescriptionRequestProxy , through a unicast or point-to-point connection to all control endpoints of the KNXnet/IP server.

另请参阅 QKnxNetIpHpaiProxy::builder (), QKnxNetIpServiceFamiliesDibProxy::builder (),和 QKnxNetIpDeviceDibProxy::builder ().

成员函数文档编制

QKnxNetIpFrame Builder:: create () const

Creates and returns a KNXnet/IP search response frame.

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

另请参阅 isValid ().

Builder &Builder:: setControlEndpoint (const QKnxNetIpHpai & hpai )

Sets the control endpoint of the KNXnet/IP server to hpai and returns a reference to the builder.

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:: 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 is not allowed in a search response and it shall not be set in the builder if it is passed in via this method.