Builder Class
class QKnxNetIpConnectionStateResponseProxy::BuilderThe QKnxNetIpConnectionStateResponseProxy::Builder class provides the means to create a KNXnet/IP connection state response frame. More...
Public Functions
QKnxNetIpFrame | create() const |
Builder & | setChannelId(quint8 channelId) |
Builder & | setStatus(QKnxNetIp::Error status) |
Detailed Description
A KNXnet/IP connection state response contains the status of a communication channel between a KNXnet/IP client and a KNXnet/IP server.
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 connection state response is:
auto netIpFrame = QKnxNetIpConnectionStateResponseProxy::builder() .setChannelId(25) .setStatus(QKnx::NetIp::Error::None) .create();
If the KNXnet/IP client does not receive the connection state response within a timeout, or the status of the received response indicates that errors occurred, the client repeats the connection state request three times. It then terminates the connection by sending a disconnect request, QKnxNetIpDisconnectRequestProxy, to the server's control endpoint.
Member Function Documentation
QKnxNetIpFrame Builder::create() const
Creates and returns a KNXnet/IP connection state response frame.
Note: The returned frame may be invalid depending on the values used during setup.
See also isValid().
Builder &Builder::setChannelId(quint8 channelId)
Sets the ID of the communication channel to channelId and returns a reference to the builder.
Builder &Builder::setStatus(QKnxNetIp::Error status)
Returns the state of the connection channel established to a KNXnet/IP server to status and returns a reference to the builder.