Builder Class

class QKnxNetIpDeviceConfigurationRequestProxy ::Builder

The QKnxNetIpDeviceConfigurationRequestProxy::Builder class provides the means to create a KNXnet/IP device configuration request frame. 更多...

公共函数

QKnxNetIpFrame create () const
Builder & setCemi (const QKnxDeviceManagementFrame & cemi )
Builder & setChannelId (quint8 channelId )
Builder & setSequenceNumber (quint8 sequenceNumber )

详细描述

A KNXnet/IP client connects to a configuration and management data endpoint of a KNXnet/IP server to send device configuration request frames and to receive device configuration acknowledgment frames. A device configuration request is used to read and write KNXnet/IP device configuration data. When a server receives a configuration request, it responds with a device configuration acknowledgment to confirm the reception of the request.

A device configuration request frame contains the ID of the communication channel between a KNXnet/IP client and server, the sequence number of the frame, and a common external message interface (cEMI) frame with the configuration message.

The KNXnet/IP server discards frames with unexpected sequence numbers and does not send a device configuration acknowledgment upon receiving them.

In most programs, this class will not be used directly. Instead, the QKnxNetIpTunnel or QKnxNetIpDeviceManagement class is used to establish a functional connection to a KNXnet/IP server.

The common way to create a device configuration request is:

QKnxDeviceManagementFrame cemi = // build cEMI frame
auto netIpFrame = QKnxNetIpDeviceConfigurationRequestProxy::builder()
    .setChannelId(1)
    .setSequenceNumber(1)
    .setCemi(cemi)
    .create();
					

If the KNXnet/IP client does not receive a device configuration acknowledgment within the specified timeout or the status of a received acknowledgment frame indicates that errors occurred, the client repeats the request three times and then terminates the connection by sending a disconnection request, QKnxNetIpDisconnectRequestProxy , to the server’s control endpoint.

另请参阅 Qt KNX Device Management Classes .

成员函数文档编制

QKnxNetIpFrame Builder:: create () const

Creates and returns a KNXnet/IP device configuration request frame.

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

另请参阅 isValid ().

Builder &Builder:: setCemi (const QKnxDeviceManagementFrame & cemi )

Sets the cEMI frame that contains the device configuration message to cemi and returns a reference to the builder.

Builder &Builder:: setChannelId ( quint8 channelId )

Sets the ID of the communication channel between a KNXnet/IP client and server to channelId and returns a reference to the builder.

Builder &Builder:: setSequenceNumber ( quint8 sequenceNumber )

Sets the sequence number of a device configuration request frame to sequenceNumber and returns a reference to the builder.