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 .
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.
Returns the description type of this KNXnet/IP structure if the object that was passed during construction was valid; otherwise returns QKnx::NetIp::Unknown .
返回
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
.
返回
true
if the KNXnet/IP structure to create the object is a valid KNXnet/IP DIB structure; otherwise returns
false
.
返回
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
.
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 .