Builder Class

class QKnxNetIpTunnelingAcknowledgeProxy ::Builder

The QKnxNetIpTunnelingAcknowledgeProxy::Builder class provides the means to create a KNXnet/IP tunneling acknowledgment frame. 更多...

公共函数

QKnxNetIpFrame create () const
Builder & setChannelId (quint8 channelId )
Builder & setSequenceNumber (quint8 sequenceNumber )
Builder & setStatus (QKnxNetIp::Error status )

详细描述

A tunneling 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 a tunneling request frame.

The server only processes frames with the expected sequence number or one less the expected sequence number. It discards frames with other sequence numbers and does not send a tunneling 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 tunneling acknowledgment is:

auto netIpFrame = QKnxNetIpTunnelingAcknowledgeProxy::builder()
    .setChannelId(4)
    .setSequenceNumber(3)
    .setStatus(QKnx::NetIp::Error::None)
    .create()
					

If the KNXnet/IP client does not receive a tunneling acknowledgment within the timeout of one second or the status of a received acknowledgment frame indicates that errors occurred, the client repeats the tunneling request frame once with the same sequence number and then terminates the connection by sending a disconnection request, QKnxNetIpDisconnectRequestProxy , to the server's control endpoint.

成员函数文档编制

QKnxNetIpFrame Builder:: create () const

Creates and returns a KNXnet/IP tunneling request frame.

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

另请参阅 isValid ().

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 tunneling request frame to sequenceNumber and returns a reference to the builder.

Builder &Builder:: setStatus ( QKnxNetIp::Error status )

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