Builder Class

class QKnxNetIpSearchRequestProxy ::Builder

The QKnxNetIpSearchRequestProxy::Builder class provides the means to create a KNXnet/IP search request. 更多...

公共函数

QKnxNetIpFrame create () const
Builder & setDiscoveryEndpoint (const QKnxNetIpHpai & hpai )

详细描述

To discover KNXnet/IP servers, a KNXnet/IP client sends a search request data packet via multicast using its discovery endpoint. The search request contains the host address protocol information (HPAI) of the discovery endpoint. The HPAI may also contain a unicast IP address to receive the answers from the different servers directly in a point-to-point manner. Typically, it should contain the KNXnet/IP system setup multicast address to ensure reception from KNXnet/IP servers that are on a different subnetwork.

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 search request is:

auto hpai = QKnxNetIpHpaiProxy::builder().create();
auto netIpFrame = QKnxNetIpSearchRequestProxy::builder()
    .setDiscoveryEndpoint(hpai)
    .create();
					

After sending the search request, the KNXnet/IP client waits until timeout for the response frame from the KNXnet/IP server, QKnxNetIpSearchResponseProxy . After the timeout, received response frames are ignored by the client until it sends another search request. Search requests received from other clients are always ignored.

另请参阅 QKnxNetIpHpaiProxy::Builder .

成员函数文档编制

QKnxNetIpFrame Builder:: create () const

Creates and returns a KNXnet/IP search request frame.

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

另请参阅 isValid ().

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

Sets the discovery endpoint of the KNXnet/IP client to hpai and returns a reference to the builder.