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

Public Types

class Builder

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

Detailed Description

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.

TODO: Add more documentation. AN159 paragraph 2.2.2.4 TIMER_NOTIFY

Note: When using QKnxNetIpTimerNotifyProxy, care must be taken to ensure that the referenced KNXnet/IP DIB structure 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 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.

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.

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