The QKnxNetIpCrdProxy class provides the means to read the KNXnet/IP connection response data (CRD) from the generic QKnxNetIpCrd class and to create a KNXnet/IP CRD structure based on the information. More...
|qmake:||QT += knx|
|QKnxNetIpCrdProxy(const QKnxNetIpCrd &crd)|
The structure may contain host protocol dependent and independent data, but the current KNX specification foresees additional data only in the case of tunneling.
Note: When using QKnxNetIpCrdProxy, care must be taken to ensure that the referenced KNXnet/IP CRD structure outlives the proxy on all code paths, lest the proxy ends up referencing deleted data.
Reading the connection type and assigned individual address can be achieved like this:
auto crd = QKnxNetIpCrd::fromBytes(...); QKnxNetIpCrdProxy proxy(crd); if (!proxy.isValid()) return; if (proxy.connectionType() != QKnxNetIp::ConnectionType::Tunnel) return; auto address = proxy.individualAddress(); // read the individual address
Member Function Documentation
QKnxNetIpCrdProxy::QKnxNetIpCrdProxy(const QKnxNetIpCrd &crd)
Constructs a proxy object with the specified a KNXnet/IP structure crd to read the connection response data block (CRD).
QKnxByteArray QKnxNetIpCrdProxy::additionalData() const
Returns the additional data of this KNXnet/IP structure.
The current KNX specification foresees additional data only in the case of tunneling.
See also individualAddress().
[static] QKnxNetIpCrdProxy::Builder QKnxNetIpCrdProxy::builder()
Returns a builder object to create a KNXnet/IP connection response data block structure.
Returns the connection type of this KNXnet/IP structure if the object that was passed during construction was valid; otherwise returns QKnx::NetIp::Unknown.
QKnxAddress QKnxNetIpCrdProxy::individualAddress() const
Returns the individual address of this KNXnet/IP structure if the object that was passed during construction was valid and the connection type is QKnx::NetIp::Tunnel; otherwise returns QKnx::NetIp::Unknown.
See also additionalData().
true if the KNXnet/IP structure to create the object is a valid KNXnet/IP CRD structure; otherwise returns
© 2020 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.