QKnxControlField Class

The QKnxControlField class represents a 8 bit KNX control field. More...

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

Public Types

enum Acknowledge { NotRequested, Requested }
enum Broadcast { System, Domain }
enum Confirm { NoError, Error }
enum FrameType { Extended, Standard }
enum Priority { System, Normal, Urgent, Low }
enum Repeat { Repeat, DoNotRepeat }

Public Functions

QKnxControlField() = default
QKnxControlField(quint8 data)
QKnxControlField(const QByteArray &data)
QKnxControlField(const QVector<quint8> &data)
QKnxControlField::Acknowledge acknowledge() const
QKnxControlField::Broadcast broadcast() const
quint8 bytes() const
QKnxControlField::Confirm confirm() const
QKnxControlField::FrameType frameType() const
QKnxControlField::Priority priority() const
QKnxControlField::Repeat repeat() const
void setAcknowledge(QKnxControlField::Acknowledge ack)
void setBroadcast(QKnxControlField::Broadcast bcst)
void setConfirm(QKnxControlField::Confirm confirm)
void setFrameType(QKnxControlField::FrameType type)
void setPriority(QKnxControlField::Priority priority)
void setRepeat(QKnxControlField::Repeat repeat)
quint8 size() const
QDebug operator<<(QDebug debug, const QKnxControlField &field)
QDataStream &operator<<(QDataStream &stream, const QKnxControlField &field)
QDataStream &operator>>(QDataStream &stream, QKnxControlField &field)

Detailed Description

The QKnxControlField class represents a 8 bit KNX control field.

A KNX frame is made up out of several field, one might be the Control field. The Control field shall contain at least the Frame Type, the Repeat flag and the frame Priority.

Member Type Documentation

enum QKnxControlField::Acknowledge

enum QKnxControlField::Broadcast

enum QKnxControlField::Confirm

enum QKnxControlField::FrameType

enum QKnxControlField::Priority

enum QKnxControlField::Repeat

Member Function Documentation

[default] QKnxControlField::QKnxControlField()

Default constructs an instance of QKnxControlField.

QKnxControlField::QKnxControlField(quint8 data)

Creates a new control field from a 8 Bit data value. Hexadecimal, octal and decimal notation are supported.

QKnxControlField::QKnxControlField(const QByteArray &data)

Creates a new control field from the first byte of the data byte array. Hexadecimal, octal and decimal notation are supported.

Note: The byte array must contain at least one elements.

QKnxControlField::QKnxControlField(const QVector<quint8> &data)

Creates a new control field from the first byte of the data vector. Hexadecimal, octal and decimal notation are supported.

Note: The vector must contain at least one elements.

QKnxControlField::Acknowledge QKnxControlField::acknowledge() const

See also setAcknowledge().

QKnxControlField::Broadcast QKnxControlField::broadcast() const

See also setBroadcast().

quint8 QKnxControlField::bytes() const

Returns the control field as byte or range of bytes.

Note: quint8, QByteArray and QVector<quint8> as well as std::vector<quint8> and std::deque<quint8> are supported as return type.

QKnxControlField ctrl;

quint8 byte = ctrl.bytes();
auto byteArray = ctrl.bytes<QByteArray>();
auto vector = ctrl.bytes<QVector<quint8>>();

QKnxControlField::Confirm QKnxControlField::confirm() const

See also setConfirm().

QKnxControlField::FrameType QKnxControlField::frameType() const

See also setFrameType().

QKnxControlField::Priority QKnxControlField::priority() const

Returns the priority that shall be used for transmission or reception of the frame.

See also setPriority().

QKnxControlField::Repeat QKnxControlField::repeat() const

See also setRepeat().

void QKnxControlField::setAcknowledge(QKnxControlField::Acknowledge ack)

See also acknowledge().

void QKnxControlField::setBroadcast(QKnxControlField::Broadcast bcst)

See also broadcast().

void QKnxControlField::setConfirm(QKnxControlField::Confirm confirm)

See also confirm().

void QKnxControlField::setFrameType(QKnxControlField::FrameType type)

See also frameType().

void QKnxControlField::setPriority(QKnxControlField::Priority priority)

Sets the priority that shall be used for transmission or reception of the frame.

See also priority().

void QKnxControlField::setRepeat(QKnxControlField::Repeat repeat)

See also repeat().

quint8 QKnxControlField::size() const

Related Non-Members

QDebug operator<<(QDebug debug, const QKnxControlField &field)

Writes the control field to the debug stream.

QDataStream &operator<<(QDataStream &stream, const QKnxControlField &field)

Writes the control field to the stream and returns a reference to the stream.

QDataStream &operator>>(QDataStream &stream, QKnxControlField &field)

Reads the control field from the stream and returns a reference to the stream.

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