ExtendedBuilder Class

class QKnxNetIpSearchResponseProxy ::ExtendedBuilder

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

该类在 Qt 5.12 引入。

公共函数

ExtendedBuilder (const ExtendedBuilder & other )
ExtendedBuilder ()
ExtendedBuilder & operator= (const ExtendedBuilder & other )
~ExtendedBuilder ()
QKnxNetIpFrame create () const
ExtendedBuilder & setControlEndpoint (const QKnxNetIpHpai & hpai )
ExtendedBuilder & setDeviceHardware (const QKnxNetIpDib & ddib )
ExtendedBuilder & setOptionalDibs (const QSet<QKnxNetIpDib> & dibs )
ExtendedBuilder & setSupportedFamilies (const QKnxNetIpDib & sdib )

详细描述

The KNXnet/IP server sends the extended search response frame as an answer to a received extended search request frame. It is addressed to the KNXnet/IP client’s discovery endpoint using the host address protocol information (HPAI) included in the received extended search request frame. The HPAI of the KNXnet/IP server’s own control endpoint is carried in the KNXnet/IP body of the extended search response frame along with the description of the device hardware and the supported service families. If the KNXnet/IP server supports more than one KNX connection, the KNXnet/IP server announces each of its own control endpoints in a single extended search response frame. KNXnet/IP servers supporting TCP only report the UDP address of their control endpoint in the extended search response frame. The KNXnet/IP server reports the data information blocks (DIBs) in the response in any order. Each DIB is present only once in the response.

The common way to create an extended search response is:

QKnxNetIpHpai controlEndpoint;
QKnxNetIpDib deviceHardware, supportedFamillies;
QSet<QKnxNetIpDib> optDibs = ...;
auto netIpFrame = QKnxNetIpSearchResponseProxy::extendedBuilder()
    .setControlEndpoint(controlEndpoint)
    .setSupportedFamilies(deviceHardware)
    .setDeviceHardware(supportedFamillies)
    .setOptionalDibs(optDibs)
    .create();
					

另请参阅 QKnxNetIpSearchResponseProxy::Builder , QKnxNetIpHpaiProxy::Builder , QKnxNetIpDeviceDibProxy::Builder ,和 QKnxNetIpServiceFamiliesDibProxy::Builder .

成员函数文档编制

ExtendedBuilder:: ExtendedBuilder (const ExtendedBuilder & other )

构造副本为 other .

ExtendedBuilder:: ExtendedBuilder ()

Creates an extended search response builder.

ExtendedBuilder &ExtendedBuilder:: operator= (const ExtendedBuilder & other )

赋值 other to this builder.

ExtendedBuilder:: ~ExtendedBuilder ()

Destroys an extended search response builder.

QKnxNetIpFrame ExtendedBuilder:: create () const

Creates and returns a KNXnet/IP extended search response frame.

注意: The returned frame may be invalid depending on the values used during setup. For the frame to be valid, at least a device hardware information block (DIB) and a supported families DIB must be set in the builder.

另请参阅 isValid ().

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

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

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

Sets the device hardware device information block (DIB) to ddib and returns a reference to the builder.

ExtendedBuilder &ExtendedBuilder:: setOptionalDibs (const QSet < QKnxNetIpDib > & dibs )

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

注意: The device information blocks dibs argument may not contain the mandatory device hardware DIB and supported families DIB. To set the mandatory DIBs use the dedicated setter functions instead.

另请参阅 setDeviceHardware () 和 setSupportedFamilies ().

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

Sets the supported families information block (DIB) to sdib and returns a reference to the builder.