Builder Class

class QKnxNetIpSessionRequestProxy ::Builder

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

公共函数

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

详细描述

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();
					

成员函数文档编制

Builder:: Builder (const Builder & other )

构造副本为 other .

Builder:: Builder ()

Creates a new empty session request frame builder object.

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

赋值指定 other 到此对象。

Builder:: ~Builder ()

销毁对象并释放任何分配资源。

QKnxNetIpFrame Builder:: create () const

Creates and returns a KNXnet/IP session request frame.

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

另请参阅 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 字节。