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 字節。