Builder Class

class QKnxNetIpSearchResponseProxy::Builder

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

Public Functions

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

Detailed Description

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.

See also QKnxNetIpHpaiProxy::builder(), QKnxNetIpServiceFamiliesDibProxy::builder(), and QKnxNetIpDeviceDibProxy::builder().

Member Function Documentation

QKnxNetIpFrame Builder::create() const

Creates and returns a KNXnet/IP search response frame.

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

See also 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.

Note: 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.

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.