The QKnxNetIpTunnelingRequestProxy::Builder class provides the means to create a KNXnet/IP tunneling request frame. 更多...
QKnxNetIpFrame | create () const |
Builder & | setCemi (const QKnxLinkLayerFrame & cemi ) |
Builder & | setChannelId (quint8 channelId ) |
Builder & | setSequenceNumber (quint8 sequenceNumber ) |
A KNXnet/IP tunneling request contains the ID of the communication channel between a KNXnet/IP client and server, the sequence number of the frame, and the KNX frame in the common external message interface (cEMI) format.
The KNXnet/IP server discards frames with sequence numbers that are not the expected sequence numbers or one less the expected 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 request is:
QKnxLinkLayerFrame linkFrame; auto tunnelRequest = QKnxNetIpTunnelingRequestProxy::builder() .setCemi(linkFrame) .setChannelId(10) .setSequenceNumber(0) .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.
Creates and returns a KNXnet/IP tunneling request frame.
注意: The returned frame may be invalid depending on the values used during setup.
另请参阅 isValid ().
Sets the KNX frame within the tunneling request frame to cemi and returns a reference to the builder.
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 tunneling request frame to sequenceNumber and returns a reference to the builder.