QKnxAdditionalInfo Class

The QKnxAdditionalInfo class represents the additional information that can be placed inside a KNX cEMI frame. More...

Header: #include <QKnxAdditionalInfo>
qmake: QT += knx

Public Types

enum Type { PlMediumInformation, RfMediumInformation, BusmonitorStatusInfo, TimestampRelative, ..., ManufacturerSpecificData }

Public Functions

QKnxAdditionalInfo()
QKnxAdditionalInfo(QKnxAdditionalInfo::Type type, const QKnxByteArray &data)
~QKnxAdditionalInfo()
quint8 byte(quint8 index) const
QKnxByteArray bytes() const
QKnxByteArray data() const
quint8 dataSize() const
bool isNull() const
bool isValid() const
void setData(const QKnxByteArray &data)
void setType(QKnxAdditionalInfo::Type type)
quint8 size() const
QKnxAdditionalInfo::Type type() const
bool operator!=(const QKnxAdditionalInfo &other) const
bool operator==(const QKnxAdditionalInfo &other) const

Static Public Members

qint32 expectedDataSize(QKnxAdditionalInfo::Type type, bool *isFixedSize = nullptr)
QKnxAdditionalInfo fromBytes(const QKnxByteArray &bytes, quint16 index = 0)
QDebug operator<<(QDebug debug, const QKnxAdditionalInfo &info)

Detailed Description

The QKnxAdditionalInfo class represents the additional information that can be placed inside a KNX cEMI frame.

A Common External Message Interface (cEMI) frame can be used for KNX information transport, independent of the KNX medium: twisted pair (TP), power line (PL), or radio frequency (RF). The Type enum holds the type of additional information to be placed into the frame.

The KNX specification limits the size of the data stored in the additional info object to a maximum of 252 bytes. The class implementation acknowledges this and silently truncates the data, when necessary.

Member Type Documentation

enum QKnxAdditionalInfo::Type

This enum type holds the type of additional information to be placed into a KNX cEMI frame.

ConstantValueDescription
QKnxAdditionalInfo::PlMediumInformation0x01Domain address used by the power line (PL) medium.
QKnxAdditionalInfo::RfMediumInformation0x02RF-Info byte (formerly named RF-Ctrl), KNX Serial Number/DoA, and Data Link Layer Frame Number (LFN) used by the radio frequency (RF) medium.
QKnxAdditionalInfo::BusmonitorStatusInfo0x03Bus monitor error flags.
QKnxAdditionalInfo::TimestampRelative0x04Relative timestamp. For example, for L_Raw.ind.
QKnxAdditionalInfo::TimeDelayUntilSending0x05Time delay. For example, for L_Raw.req.
QKnxAdditionalInfo::ExtendedRelativeTimestamp0x06Device independent time stamp. For example, for L_Raw.ind or L_Busmon.ind.
QKnxAdditionalInfo::BiBatInformation0x07Contains b7-b4 of the RF KNX-Ctrl field and BiBat Block-number.
QKnxAdditionalInfo::RfMultiInformation0x08RF multifrequency, call channel, and Fast Ack number.
QKnxAdditionalInfo::PreambleAndPostamble0x09Preamble and postamble length.
QKnxAdditionalInfo::RfFastAckInformation0x0aStatus and information of each expected number of Fast Ack (N).
QKnxAdditionalInfo::ManufacturerSpecificData0xfeManufacturer-specific data, including manufacturer ID (2-byte) and Subfunction ID (1-byte).

Member Function Documentation

QKnxAdditionalInfo::QKnxAdditionalInfo()

Constructs a new, empty, invalid additional info object.

QKnxAdditionalInfo::QKnxAdditionalInfo(QKnxAdditionalInfo::Type type, const QKnxByteArray &data)

Constructs a new additional info object and sets its Type to type and data to data.

See also isNull() and isValid().

QKnxAdditionalInfo::~QKnxAdditionalInfo()

Destroys the additional info object and releases all allocated resources.

quint8 QKnxAdditionalInfo::byte(quint8 index) const

Returns the byte at the position index in the additional info object.

QKnxByteArray QKnxAdditionalInfo::bytes() const

Returns an array of bytes that represent the additional info object.

QKnxByteArray QKnxAdditionalInfo::data() const

Returns the data stored in the additional info object.

See also setData().

quint8 QKnxAdditionalInfo::dataSize() const

Returns the number of bytes representing the data stored in the additional info object.

[static] qint32 QKnxAdditionalInfo::expectedDataSize(QKnxAdditionalInfo::Type type, bool *isFixedSize = nullptr)

Returns the number of expected bytes for the Type id type. The additional boolean parameter isFixedSize is set to true if the type expects a fixed size of bytes; otherwise it is to false. If the type is unknown, the function returns a negative value.

Known types of variable size are:

[static] QKnxAdditionalInfo QKnxAdditionalInfo::fromBytes(const QKnxByteArray &bytes, quint16 index = 0)

Constructs the additional info object from the byte array bytes starting at position index inside the array.

See also isNull() and isValid().

bool QKnxAdditionalInfo::isNull() const

If this is an additional info object that is constructed by default, returns true; otherwise returns false. An additional info object is considered null if it contains no initialized type value.

See also isValid().

bool QKnxAdditionalInfo::isValid() const

Returns true if this is a valid additional info object; false otherwise.

void QKnxAdditionalInfo::setData(const QKnxByteArray &data)

Sets the data stored in the additional info object to data.

See also data().

void QKnxAdditionalInfo::setType(QKnxAdditionalInfo::Type type)

Sets the additional info type to type.

See also type().

quint8 QKnxAdditionalInfo::size() const

Returns the number of bytes representing the additional info, including the byte for the Type id and the byte for length information.

QKnxAdditionalInfo::Type QKnxAdditionalInfo::type() const

Returns the type of the information stored in the additional info object.

See also setType().

bool QKnxAdditionalInfo::operator!=(const QKnxAdditionalInfo &other) const

Returns true if this object and the given other are not equal; otherwise returns false.

bool QKnxAdditionalInfo::operator==(const QKnxAdditionalInfo &other) const

Returns true if this object and the given other are equal; otherwise returns false.

Related Non-Members

QDebug operator<<(QDebug debug, const QKnxAdditionalInfo &info)

Writes the KNX cEMI frame's additional info info to the debug stream.

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