The QKnxNetIpDeviceConfigurationAcknowledgeProxy::Builder class provides the means to create a KNXnet/IP device configuration acknowledgment frame. 更多...
QKnxNetIpFrame | create () const |
Builder & | setChannelId (quint8 channelId ) |
Builder & | setSequenceNumber (quint8 sequenceNumber ) |
Builder & | setStatus (QKnxNetIp::Error status ) |
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 acknowledgment frame contains the ID and status of the communication channel between a KNXnet/IP client and server, as well as the sequence number of the device configuration request frame.
The KNXnet/IP server discards device configuration request 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 following code sample illustrates how to read the device configuration request information sent by a KNXnet/IP client:
auto netIpFrame = QKnxNetIpDeviceConfigurationAcknowledgeProxy::builder() .setChannelId(200) .setSequenceNumber(250) .setStatus(QKnx::NetIp::Error::ConnectionId) .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 device configuration request three times and then terminates the connection by sending a disconnection request frame, QKnxNetIpDisconnectRequestProxy , to the server’s control endpoint.
另请参阅 Qt KNX Device Management Classes .
Creates and returns a KNXnet/IP device configuration request frame.
注意: The returned frame may be invalid depending on the values used during setup.
另请参阅 isValid ().
Sets the ID of the communication channel between a KNXnet/IP client and server to channelId and returns a reference to the builder.
Sets the sequence number of a device configuration request frame to sequenceNumber and returns a reference to the builder.
Sets the status of the communication channel between a KNXnet/IP client and server to status and returns a reference to the builder.