QKnxNetIpRoutingIndicationProxy Class

The QKnxNetIpRoutingIndicationProxy class provides the means to read a routing indication from the generic QKnxNetIpFrame class and to create a KNXnet/IP frame based on the information. 更多...

头: #include <QKnxNetIpRoutingIndicationProxy>
qmake: QT += knx

公共类型

class Builder

公共函数

QKnxNetIpRoutingIndicationProxy (const QKnxNetIpFrame & frame )
QKnxLinkLayerFrame cemi () const
bool isValid () const

静态公共成员

QKnxNetIpRoutingIndicationProxy::Builder builder ()

详细描述

A routing indication is sent by a KNXnet/IP router or device to transmit KNX link layer frames over IP networks.

注意: When using QKnxNetIpRoutingIndicationProxy, 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 routing indication information sent by a KNXnet/IP router or device:

auto netIpFrame = QKnxNetIpFrame::fromBytes(...);
const QKnxNetIpRoutingIndicationProxy proxy(netIpFrame);
if (!proxy.isValid())
    return;
auto linkFrame = proxy.cemi();
					

另请参阅 builder (), QKnxNetIpRoutingLostMessageProxy , QKnxNetIpRoutingBusyProxy ,和 Qt KNXnet/IP Connection Classes .

成员函数文档编制

QKnxNetIpRoutingIndicationProxy:: QKnxNetIpRoutingIndicationProxy (const QKnxNetIpFrame & frame )

Constructs a proxy object to read the routing indication information carried by the specified KNXnet/IP frame frame .

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

Returns a builder object to create a KNXnet/IP routing indication frame.

QKnxLinkLayerFrame QKnxNetIpRoutingIndicationProxy:: cemi () const

Returns the cEMI frame within the routing indication frame.

该函数在 Qt 5.12 引入。

bool QKnxNetIpRoutingIndicationProxy:: 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 ().