Builder Class

class QKnxNetIpSessionResponseProxy ::Builder

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

公共函数

Builder (const Builder & other )
Builder ()
Builder & operator= (const Builder & other )
~Builder ()
QKnxNetIpFrame create () const
Builder & setMessageAuthenticationCode (const QKnxByteArray & data )
Builder & setPublicKey (const QKnxByteArray & serverPublicKey )
Builder & setSecureSessionId (quint16 sessionId )

详细描述

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 the KNXnet/IP secure server to the KNXnet/IP secure client control endpoint in response to a received secure session request frame.

The common way to create a session response frame is:

auto serverPublicKey = ... // create the public key
auto auth = ... // create the full 128 bit CCM-MAC
auto netIpFrame = QKnxNetIpSessionResponseProxy::builder()
    .setSecureSessionId(0x1976)
    .setPublicKey(serverPublicKey)
    .setMessageAuthenticationCode(auth)
    .create();
					

另请参阅 QKnxCryptographicEngine .

成员函数文档编制

Builder:: Builder (const Builder & other )

构造副本为 other .

Builder:: Builder ()

Creates a new empty session response builder object.

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

赋值指定 other 到此对象。

Builder:: ~Builder ()

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

QKnxNetIpFrame Builder:: create () const

Creates and returns a KNXnet/IP session response frame.

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

另请参阅 isValid ().

Builder &Builder:: setMessageAuthenticationCode (const QKnxByteArray & data )

Sets the AES128 CCM message authentication code (MAC) of the generic KNXnet/IP session response frame to data and returns a reference to the builder. The MAC has a fixed size of 16 字节。

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

Sets the public key of the KNXnet/IP session response frame to serverPublicKey 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 字节。

Builder &Builder:: setSecureSessionId ( quint16 sessionId )

Sets the secure session ID of the KNXnet/IP session response frame to sessionId and returns a reference to the builder.