QKnxNetIpTimerNotifyProxy Class

The QKnxNetIpTimerNotifyProxy class provides the means to introspect timer notify data inside the generic QKnxNetIpFrame class and to create a KNXnet/IP timer notify frame from provided data. More...

Header: #include <QKnxNetIpTimerNotifyProxy>
qmake: QT += knx
Since: Qt 5.12

This class was introduced in Qt 5.12.

Public Types

class Builder
class SecureBuilder

Public Functions

QKnxNetIpTimerNotifyProxy(const QKnxNetIpFrame &frame)
bool isValid() const
QKnxByteArray messageAuthenticationCode() const
quint16 messageTag() const
QKnxByteArray serialNumber() const
quint48 timerValue() const

Static Public Members

QKnxNetIpTimerNotifyProxy::Builder builder()
QKnxNetIpTimerNotifyProxy::SecureBuilder secureBuilder()

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

Note: When using QKnxNetIpTimerNotifyProxy, care must be taken to ensure that the referenced KNXnet/IP frame outlives the proxy on all code paths, lest the proxy ends up referencing deleted data.

The following code sample illustrates how to read the timer notify information:

auto netIpFrame = QKnxNetIpFrame::fromBytes(...);

const QKnxNetIpTimerNotifyProxy proxy(netIpFrame);
if (!proxy.isValid())
    return;

quint48 value = proxy.timerValue();
QKnxByteArray number = proxy.serialNumber();
quint16 tag = proxy.tag();
QKnxByteArray code = proxy.messageAuthenticationCode();

See also builder() and Qt KNXnet/IP Connection Classes.

Member Function Documentation

QKnxNetIpTimerNotifyProxy::QKnxNetIpTimerNotifyProxy(const QKnxNetIpFrame &frame)

Constructs a proxy object to read the timer notify information carried by the specified KNXnet/IP frame frame.

[static] QKnxNetIpTimerNotifyProxy::Builder QKnxNetIpTimerNotifyProxy::builder()

Returns a builder object to create a KNXnet/IP timer notify frame.

bool QKnxNetIpTimerNotifyProxy::isValid() const

Returns true if the frame contains initialized values and is in itself valid, otherwise returns false. A valid KNXnet/IP frame consists of at least a valid header and a size in bytes corresponding to the total size of the KNXnet/IP frame header.

Note: KNXnet/IP timer notify frames currently have a fixed size of 36 bytes.

See also QKnxNetIpFrameHeader::totalSize().

QKnxByteArray QKnxNetIpTimerNotifyProxy::messageAuthenticationCode() const

Returns the AES128 CCM message authentication code (MAC) from the generic KNXnet/IP secure timer notify frame with a fixed size of 16 bytes.

quint16 QKnxNetIpTimerNotifyProxy::messageTag() const

Returns the message tag from the generic KNXnet/IP secure timer notify frame.

[static] QKnxNetIpTimerNotifyProxy::SecureBuilder QKnxNetIpTimerNotifyProxy::secureBuilder()

Returns a secure builder object to create a KNXnet/IP timer notify frame.

QKnxByteArray QKnxNetIpTimerNotifyProxy::serialNumber() const

Returns the serial number from the generic KNXnet/IP secure timer notify frame.

quint48 QKnxNetIpTimerNotifyProxy::timerValue() const

Returns the timer value from the generic KNXnet/IP secure timer notify frame.

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