QKnxNetIpTunnelingFeatureGetProxy Class

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

頭: #include <QKnxNetIpTunnelingFeatureGetProxy>
qmake: QT += knx
Since: Qt 5.12

該類在 Qt 5.12 引入。

公共類型

class Builder

公共函數

QKnxNetIpTunnelingFeatureGetProxy (const QKnxNetIpFrame & frame )
quint8 channelId () const
QKnx::InterfaceFeature featureIdentifier () const
bool isValid () const
quint8 sequenceNumber () const

靜態公共成員

QKnxNetIpTunnelingFeatureGetProxy::Builder builder ()

詳細描述

A tunneling feature-get service frame contains the ID of the communication channel between a KNXnet/IP client and server, the sequence number of the frame, and the interface feature to read.

The tunneling client initiates the tunneling feature-get service to read the value of an interface feature from the tunneling server. Within 3 seconds after confirming the tunneling feature-get service the tunneling server sends a tunneling feature-response frame containing the value of the requested interface feature.

If the tunneling server does not respond to the tunneling feature-get service frame the tunneling client may or may not repeat the request.

注意: When using QKnxNetIpTunnelingFeatureGetProxy, 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-get information sent by a KNXnet/IP client:

auto netIpFrame = QKnxNetIpFrame::fromBytes(...);
const QKnxNetIpTunnelingFeatureGetProxy proxy(netIpFrame);
if (!proxy.isValid())
    return;
auto id = proxy.featureIdentifier();
					

另請參閱 builder (), QKnxNetIpTunnelingFeatureInfoProxy , QKnxNetIpTunnelingFeatureResponseProxy , Qt KNX Tunneling Classes ,和 Qt KNXnet/IP Connection Classes .

成員函數文檔編製

QKnxNetIpTunnelingFeatureGetProxy:: QKnxNetIpTunnelingFeatureGetProxy (const QKnxNetIpFrame & frame )

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

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

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

quint8 QKnxNetIpTunnelingFeatureGetProxy:: channelId () const

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

QKnx::InterfaceFeature QKnxNetIpTunnelingFeatureGetProxy:: featureIdentifier () const

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

bool QKnxNetIpTunnelingFeatureGetProxy:: isValid () const

返迴 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.

另請參閱 QKnxNetIpFrameHeader::totalSize ().

quint8 QKnxNetIpTunnelingFeatureGetProxy:: sequenceNumber () const

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