The QKnxNetIpTimerNotifyProxy::Builder class provides the means to create a KNXnet/IP timer notify frame. 更多...
Builder (const Builder & other ) | |
Builder () | |
Builder & | operator= (const Builder & other ) |
~Builder () | |
QKnxNetIpFrame | create () const |
Builder & | setMessageAuthenticationCode (const QKnxByteArray & data ) |
Builder & | setMessageTag (quint16 tag ) |
Builder & | setSerialNumber (const QKnxByteArray & serialNumber ) |
Builder & | setTimerValue (quint48 timerValue ) |
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 during secure KNXnet/IP multicast group communication to keep the multicast group member's timer values synchronized. The frame is therefore sent to the KNXnet/IP routing endpoint on port
3671
of the configured routing multicast address.
The common way to create a timer notify frame is:
auto auth = ... // create the full 128 bit CCM-MAC auto netIpFrame = QKnxNetIpTimerNotifyProxy::builder() .setTimerValue(15021976) .setSerialNumber(QKnxByteArray::fromHex("0123456789AB")) .setMessageTag(quint16(QRandomGenerator::global()->generate()) .setMessageAuthenticationCode(auth) .create();
另请参阅 QKnxCryptographicEngine .
构造副本为 other .
Creates a new empty timer notify frame builder object.
赋值指定 other 到此对象。
销毁对象并释放任何分配资源。
Creates and returns a KNXnet/IP timer notify frame.
注意: The returned frame may be invalid depending on the values used during setup.
另请参阅 isValid ().
Sets the AES128 CCM message authentication code (MAC) of the generic KNXnet/IP timer notify frame to
data
and returns a reference to the builder. The MAC has a fixed size of
16
字节。
Sets the message tag of the generic KNXnet/IP timer notify frame to tag and returns a reference to the builder.
In case of a periodic or initial notify the tag contains a random value. In case of an update notify this is the value of the outdated frame triggering the update.
Sets the serial number to serialNumber and returns a reference to the builder.
注意: The serial number must contain exactly 6 bytes.
Sets the timer value to timerValue and returns a reference to the builder.
注意:
The size of a timer value is limited to 48 bits, so the maximum number can be
281474976710655
. Passing a larger value will result in creating an invalid frame.