Builder Class

class QKnxNetIpTunnelingRequestProxy::Builder

The QKnxNetIpTunnelingRequestProxy::Builder class provides the means to create a KNXnet/IP tunneling request frame. More...

Public Functions

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

Detailed Description

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()

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.

Member Function Documentation

QKnxNetIpFrame Builder::create() const

Creates and returns a KNXnet/IP tunneling request frame.

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

See also isValid().

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

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

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.