QKnxNetIpTunnelingFeatureSetProxy Class

The QKnxNetIpTunnelingFeatureSetProxy class provides the means to access the information carried by a generic tunneling feature-set service QKnxNetIpFrame frame and to create a KNXnet/IP frame based on the information. More...

Header: #include <QKnxNetIpTunnelingFeatureSetProxy>
qmake: QT += knx
Since: Qt 5.12

Public Types

class Builder

Public Functions

QKnxNetIpTunnelingFeatureSetProxy(const QKnxNetIpFrame &frame)
quint8 channelId() const
QKnx::InterfaceFeature featureIdentifier() const
QKnxByteArray featureValue() const
bool isValid() const
quint8 sequenceNumber() const

Static Public Members

QKnxNetIpTunnelingFeatureSetProxy::Builder builder()

Detailed Description

The QKnxNetIpTunnelingFeatureSetProxy class provides the means to access the information carried by a generic tunneling feature-set service QKnxNetIpFrame frame and to create a KNXnet/IP frame based on the information.

A tunneling feature-set service frame contains the ID of the communication channel between a KNXnet/IP client and server, the sequence number of the frame, the interface feature to set, and the feature value as a byte array.

The tunneling client initiates the tunneling feature-set service to set the value of an interface feature in a tunneling server. The tunneling server accepts the value and applies it immediately, unless specified differently.

This means that the server applies the value before sending the tunneling feature-response or before routing the next tunneling request on the bus.

Within 3 seconds of confirming the tunneling feature-set service, the tunneling server sends a tunneling feature-response frame. The frame contains the written value and a return code.

Note: When using QKnxNetIpTunnelingFeatureSetProxy, care must be taken to ensure that the referenced KNXnet/IP frame outlives the proxy on all code paths, lest the proxy ends up referencing deleted data.

The following code sample illustrates how to read the tunneling feature-set service information sent by a KNXnet/IP client:

auto netIpFrame = QKnxNetIpFrame::fromBytes(...);

const QKnxNetIpTunnelingFeatureSetProxy proxy(netIpFrame);
if (!proxy.isValid())
    return;

auto id = proxy.featureIdentifier();
auto value = proxy.featureValue();

See also builder(), QKnxNetIpTunnelingFeatureInfoProxy, QKnxNetIpTunnelingFeatureResponseProxy, Qt KNX Tunneling Classes, and Qt KNXnet/IP Connection Classes.

Member Function Documentation

QKnxNetIpTunnelingFeatureSetProxy::QKnxNetIpTunnelingFeatureSetProxy(const QKnxNetIpFrame &frame)

Constructs a proxy object to read the tunneling feature-set service information carried by the specified KNXnet/IP frame frame.

[static] QKnxNetIpTunnelingFeatureSetProxy::Builder QKnxNetIpTunnelingFeatureSetProxy::builder()

Returns a builder object to create a KNXnet/IP tunneling feature-set service frame.

quint8 QKnxNetIpTunnelingFeatureSetProxy::channelId() const

Returns the ID of the communication channel between a KNXnet/IP client and server.

QKnx::InterfaceFeature QKnxNetIpTunnelingFeatureSetProxy::featureIdentifier() const

Returns the tunneling interface feature identifier of a tunneling feature-set service frame.

QKnxByteArray QKnxNetIpTunnelingFeatureSetProxy::featureValue() const

Returns the tunneling interface feature value of a tunneling feature-set service frame.

bool QKnxNetIpTunnelingFeatureSetProxy::isValid() const

Returns true if the frame contains initialized values and is in itself valid, otherwise returns false. A valid KNXnet/IP frame consists of at least a valid header and a size in bytes corresponding to the total size of the KNXnet/IP frame header.

See also QKnxNetIpFrameHeader::totalSize().

quint8 QKnxNetIpTunnelingFeatureSetProxy::sequenceNumber() const

Returns the sequence number of a tunneling feature-set service frame.

© 2018 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.