QKnxNetIpExtendedDeviceDibProxy Class

The QKnxNetIpExtendedDeviceDibProxy class provides the means to read the extended device information of a KNXnet/IP device from the generic QKnxNetIpDib class and to create a KNXnet/IP extended device information block (DIB) structure. 更多...

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

該類在 Qt 5.12 引入。

公共類型

class Builder

公共函數

QKnxNetIpExtendedDeviceDibProxy (const QKnxNetIpDib & dib )
QKnxNetIp::DescriptionType descriptionType () const
quint16 deviceDescriptorType0 () const
bool isValid () const
quint16 maximumLocalApduLength () const
QKnx::MediumStatus mediumStatus () const

靜態公共成員

QKnxNetIpExtendedDeviceDibProxy::Builder builder ()

詳細描述

A KNXnet/IP extended device information DIB structure contains specific information about a KNXnet/IP device, such as the KNX medium status, maximum local APDU length and the device descriptor type (mask version).

In most programs, this class will not be used directly. Instead, the QKnxNetIpServerDiscoveryAgent and QKnxNetIpServerInfo are provided.

注意: When using QKnxNetIpExtendedDeviceDibProxy, 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 extended device information can be achieved like this:

auto dib = QKnxNetIpDib::fromBytes(...);
QKnxNetIpExtendedDeviceDibProxy proxy(dib);
if (!proxy.isValid())
    return;
auto mediumStatus = proxy.mediumStatus();
auto adpuLength = proxy.maximumLocalApduLength();
auto descriptorType = proxy.deviceDescriptorType0();
					

另請參閱 builder () 和 Qt KNXnet/IP Connection Classes .

成員函數文檔編製

QKnxNetIpExtendedDeviceDibProxy:: QKnxNetIpExtendedDeviceDibProxy (const QKnxNetIpDib & dib )

Constructs a proxy object with the specified KNXnet/IP DIB structure dib to read the extended device information of a KNXnet/IP device.

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

Returns a builder object to create a KNXnet/IP device information DIB structure.

QKnxNetIp::DescriptionType QKnxNetIpExtendedDeviceDibProxy:: 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 .

quint16 QKnxNetIpExtendedDeviceDibProxy:: deviceDescriptorType0 () const

返迴 device descriptor type (mask version) carried by this KNXnet/IP DIB structure if the object that was passed during construction was valid; otherwise returns a 默認構造值 which can be 0 .

bool QKnxNetIpExtendedDeviceDibProxy:: isValid () const

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

quint16 QKnxNetIpExtendedDeviceDibProxy:: maximumLocalApduLength () const

返迴 maximum local APDU length carried by this KNXnet/IP DIB structure if the object that was passed during construction was valid; otherwise returns a 默認構造值 which can be 0 .

QKnx::MediumStatus QKnxNetIpExtendedDeviceDibProxy:: mediumStatus () const

Returns the medium status contained inside the KNXnet/IP DIB structure if the object that was passed during construction was valid; otherwise returns QKnx::Unknown .