Builder Class

class QKnxNetIpSessionRequestProxy::Builder

The QKnxNetIpSessionRequestProxy::Builder class provides the means to create a KNXnet/IP session request frame. More...

Public Functions

Builder(const Builder &other)
Builder()
Builder &operator=(const Builder &other)
~Builder()
QKnxNetIpFrame create() const
Builder &setControlEndpoint(const QKnxNetIpHpai &hpai)
Builder &setPublicKey(const QKnxByteArray &publicKey)

Detailed Description

This class is part of the Qt KNX module and currently available as a Technology Preview, and therefore the API and functionality provided by the class may be subject to change at any time without prior notice.

This frame will be sent by a KNXnet/IP secure client to the control endpoint of the KNXnet/IP secure server to initiate the secure session setup handshake for a new secure communication channel. The maximum time a KNXnet/IP secure client will wait for a response of the KNXnet/IP secure server is 10 seconds.

The common way to create a session request frame is:

auto publicKey = ... // create Client Public Value X

auto netIpFrame = QKnxNetIpSessionRequestProxy::builder()
    .setControlEndpoint(QKnxNetIpHpaiProxy::builder()
        .setHostAddress(QHostAddress::LocalHost)
        .setPort(3671).create())
    .setPublicKey(publicKey)
    .create();

Member Function Documentation

Builder::Builder(const Builder &other)

Constructs a copy of other.

Builder::Builder()

Creates a new empty session request frame builder object.

Builder &Builder::operator=(const Builder &other)

Assigns the specified other to this object.

Builder::~Builder()

Destroys the object and frees any allocated resources.

QKnxNetIpFrame Builder::create() const

Creates and returns a KNXnet/IP session request frame.

Note: The returned frame may be invalid depending on the values used during setup.

See also isValid().

Builder &Builder::setControlEndpoint(const QKnxNetIpHpai &hpai)

Sets the control endpoint of the KNXnet/IP session request frame to hpai and returns a reference to the builder.

Builder &Builder::setPublicKey(const QKnxByteArray &publicKey)

Sets the unencrypted data of the KNXnet/IP session request frame to publicKey and returns a reference to the builder. The public key needs to be generated using the Curve25519 algorithm and has a fixed size of 32 bytes.

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