QKnxNetIpRoutingSystemBroadcastProxy Class

The QKnxNetIpRoutingSystemBroadcastProxy class provides the means to introspect a generic routing system broadcast QKnxNetIpFrame and to create a KNXnet/IP frame based on the information. 更多...

头: #include <QKnxNetIpRoutingSystemBroadcastProxy>
qmake: QT += knx
Since: Qt 5.12

该类在 Qt 5.12 引入。

公共类型

class Builder

公共函数

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

静态公共成员

QKnxNetIpRoutingSystemBroadcastProxy::Builder builder ()

详细描述

Routing system broadcast messages are useful in the situation when KNXnet/IP devices configured on different multicast addresses and secure KNXnet/IP devices configured on different backbone keys are not able to communicate between each other.

注意: When using QKnxNetIpRoutingSystemBroadcastProxy, 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 introspect a routing system broadcast frame:

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

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

成员函数文档编制

QKnxNetIpRoutingSystemBroadcastProxy:: QKnxNetIpRoutingSystemBroadcastProxy (const QKnxNetIpFrame & frame )

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

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

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

QKnxLinkLayerFrame QKnxNetIpRoutingSystemBroadcastProxy:: cemi () const

Returns a cEMI frame that contains the routing system broadcast message.

bool QKnxNetIpRoutingSystemBroadcastProxy:: 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.