QKnxNetIpSecuredServiceFamiliesDibProxy Class

The QKnxNetIpSecuredServiceFamiliesDibProxy class provides the means to introspect the supported service families and required security version inside the generic QKnxNetIpDib class and to create a KNXnet/IP device information block (DIB) structure based on the information. 更多...

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

该类在 Qt 5.12 引入。

公共类型

class Builder

公共函数

QKnxNetIpSecuredServiceFamiliesDibProxy (const QKnxNetIpDib & dib )
QKnxNetIp::DescriptionType descriptionType () const
bool isValid () const
QVector<QKnxSecuredServiceInfo> serviceInfos () const

静态公共成员

QKnxNetIpSecuredServiceFamiliesDibProxy::Builder builder ()

详细描述

A KNXnet/IP secured service families DIB structure contains a set of supported services and their corresponding required security version. The service family is the high octet of the service type ID and the required security version is an integer representing the security version.

KNXnet/IP service families without security requirements will not be included in the secured service families DIB.

注意: When using QKnxNetIpSecuredServiceFamiliesDibProxy, care must be taken to ensure that the referenced KNXnet/IP DIB structure outlives the proxy on all code paths, lest the proxy ends up referencing deleted data.

Reading the secured service families can be achieved like this:

auto dib = QKnxNetIpDib::fromBytes(...);
QKnxNetIpSecuredServiceFamiliesDibProxy proxy(dib);
if (!proxy.isValid())
    return;
auto infos = proxy.serviceInfos();
					

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

成员函数文档编制

QKnxNetIpSecuredServiceFamiliesDibProxy:: QKnxNetIpSecuredServiceFamiliesDibProxy (const QKnxNetIpDib & dib )

Constructs a proxy object with the specified KNXnet/IP DIB structure dib to read the supported service families and security versions.

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

Returns a builder object to create a KNXnet/IP secured service families DIB structure.

QKnxNetIp::DescriptionType QKnxNetIpSecuredServiceFamiliesDibProxy:: descriptionType () const

Returns the description type of this KNXnet/IP structure if the object that was passed during construction was valid; otherwise returns QKnx::NetIp::Unknown .

bool QKnxNetIpSecuredServiceFamiliesDibProxy:: isValid () const

返回 true if the KNXnet/IP structure to create the object is a valid KNXnet/IP DIB structure; otherwise returns false .

QVector < QKnxSecuredServiceInfo > QKnxNetIpSecuredServiceFamiliesDibProxy:: serviceInfos () const

Returns a vector of the QKnxSecuredServiceInfo carried by this KNXnet/IP DIB structure if the object that was passed during construction was valid; otherwise returns an empty vector.