QKnxNetIpServiceFamiliesDibProxy Class

The QKnxNetIpServiceFamiliesDibProxy class provides the means to read the supported service families and versions from the generic QKnxNetIpDib class and to create a KNXnet/IP device information block (DIB) structure based on the information. 更多...

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

公共类型

class Builder

公共函数

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

静态公共成员

QKnxNetIpServiceFamiliesDibProxy::Builder builder ()

详细描述

A KNXnet/IP supported service families DIB structure contains a set of supported services and their corresponding versions. The service family is the high octet of the service type ID and the service family version is an integer representing the service family version. It refers to the version of the corresponding KNXnet/IP document, not to the manufacturer's implemented version.

注意: When using QKnxNetIpServiceFamiliesDibProxy, 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 supported service families can be achieved like this:

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

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

成员函数文档编制

QKnxNetIpServiceFamiliesDibProxy:: QKnxNetIpServiceFamiliesDibProxy (const QKnxNetIpDib & dib )

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

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

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

QKnxNetIp::DescriptionType QKnxNetIpServiceFamiliesDibProxy:: 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 QKnxNetIpServiceFamiliesDibProxy:: isValid () const

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

QVector < QKnxServiceInfo > QKnxNetIpServiceFamiliesDibProxy:: serviceInfos () const

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