QKnxNetIpDescriptionRequestProxy Class

The QKnxNetIpDescriptionRequestProxy class provides the means to read a description request from the generic QKnxNetIpFrame class and to create a KNXnet/IP frame based on the information. More...

Header: #include <QKnxNetIpDescriptionRequestProxy>
qmake: QT += knx

Public Types

class Builder

Public Functions

QKnxNetIpDescriptionRequestProxy(const QKnxNetIpFrame &frame)
QKnxNetIpHpai controlEndpoint() const
bool isValid() const

Static Public Members

QKnxNetIpDescriptionRequestProxy::Builder builder()

Detailed Description

After discovering a KNXnet/IP server, the KNXnet/IP client sends a description request through a unicast or point-to-point connection to all control endpoints of the server.

In most programs, this class will not be used directly. Instead, the QKnxNetIpServerDescriptionAgent and QKnxNetIpServerInfo are provided to check that the server supports the requested connection type and options.

Note: When using QKnxNetIpDescriptionRequestProxy, 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 read the description request information sent by a KNXnet/IP client:

auto netIpFrame = QKnxNetIpFrame::fromBytes(...);

const QKnxNetIpDescriptionRequestProxy proxy(netIpFrame);
if (!proxy.isValid())
    return;

auto endPoint = proxy.controlEndpoint();

See also builder(), QKnxNetIpDescriptionResponseProxy, and Qt KNXnet/IP Connection Classes.

Member Function Documentation

QKnxNetIpDescriptionRequestProxy::QKnxNetIpDescriptionRequestProxy(const QKnxNetIpFrame &frame)

Constructs a proxy object to read the description request information carried by the specified KNXnet/IP frame frame.

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

Returns a builder object to create a KNXnet/IP description request frame.

QKnxNetIpHpai QKnxNetIpDescriptionRequestProxy::controlEndpoint() const

Returns the control endpoint of the KNXnet/IP client sending the description request.

bool QKnxNetIpDescriptionRequestProxy::isValid() const

Returns 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.

See also QKnxNetIpFrameHeader::totalSize().

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.