QKnxControlField Class

The QKnxControlField class represents an 8-bit KNX control field. More...

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

Public Types

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

Public Functions

QKnxControlField(const QKnxByteArray &data)
QKnxControlField(quint8 data)
QKnxControlField()
QKnxControlField::Acknowledge acknowledge() const
QKnxControlField::Broadcast broadcast() const
quint8 byte() const
QKnxByteArray bytes() const
QKnxControlField::Confirm confirm() const
QKnxControlField::FrameFormat frameFormat() const
QKnxControlField::Priority priority() const
QKnxControlField::Repeat repeat() const
void setAcknowledge(QKnxControlField::Acknowledge ack)
void setBroadcast(QKnxControlField::Broadcast bcst)
void setConfirm(QKnxControlField::Confirm conf)
void setFrameFormat(QKnxControlField::FrameFormat type)
void setPriority(QKnxControlField::Priority priority)
void setRepeat(QKnxControlField::Repeat rep)
quint8 size() const
bool operator!=(const QKnxControlField &other) const
bool operator==(const QKnxControlField &other) const

Static Public Members

QKnxControlField::Builder builder()
QDebug operator<<(QDebug debug, const QKnxControlField &field)

Detailed Description

A KNX frame contains several fields, one of which might be the control field. The control field must specify at least the FrameFormat, the Repeat flag, and the frame Priority. In addition, it may specify how widely the frame is Broadcast, and whether acknowledgment (Acknowledge) or confirmation (Confirm) is requested for the transmission or reception of the frame.

Selecting Frame Format

The control field selects the standard or extended frame format for the data link layer and includes information for the used extended frame type. The standard format should be preferred and the extended format should only be used when the encoding capabilities of the standard format are insufficient.

Selecting Frame Priority

The priority of frames should be selected carefully to ensure fair bus access. The maximum priority that is allowed for run-time communication is normal. The system priority is reserved for system configuration and management procedures.

The urgent priority is only allowed for implementations of datapoints of functional blocks or channels for which this is specified explicitly. In a network, the frame traffic using urgent priority shall not exceed five percent of the total traffic.

See also builder() and QKnxExtendedControlField.

Member Type Documentation

enum class QKnxControlField::Acknowledge

This enum type holds whether a Layer 2 acknowledge is requested for an L_Data.req frame that is used in client-to-server communiction on the KNX data link layer. This is not valid for all media.

ConstantValueDescription
QKnxControlField::Acknowledge::NotRequested0x00Acknowledgment is not requested.
QKnxControlField::Acknowledge::Requested0x01Acknowledgment is requested.

See also QKnxLinkLayerFrame::MessageCode.

enum class QKnxControlField::Broadcast

This enum type specifies whether the frame is transmitted using system broadcast communication mode or broadcast communication mode.

ConstantValueDescription
QKnxControlField::Broadcast::System0x00The frame is transmitted using system broadcast communication mode.
QKnxControlField::Broadcast::Domain0x01The frame is transmitted using broadcast communication mode.

enum class QKnxControlField::Confirm

This enum type holds whether there is an error in the transmitted frame.

ConstantValueDescription
QKnxControlField::Confirm::NoError0x00No errors found.
QKnxControlField::Confirm::Error0x01Errors found.

enum class QKnxControlField::FrameFormat

This enum type selects the standard or extended frame format for the data link layer and includes information for the used extended frame type.

ConstantValueDescription
QKnxControlField::FrameFormat::Extended0x00This parameter is mapped to QKnxExtendedControlField::ExtendedFrameFormat. The extended frame format is used and the frame type is selected by the frame type parameter bit.
QKnxControlField::FrameFormat::Standard0x01The standard frame format is used.

enum class QKnxControlField::Priority

This enum type holds the priority used for the transmission or reception of the frame.

ConstantValueDescription
QKnxControlField::Priority::System0x00System priority is used. It is reserved for high priority frames, as well as system configuration and management procedures.
QKnxControlField::Priority::Normal0x01Normal priority is used. It is the default priority for short frames.
QKnxControlField::Priority::Urgent0x02High priority is used. It is reserved for urgent frames.
QKnxControlField::Priority::Low0x03Low priority is used. It is mandatory for long frames, burst traffic, and so on.

enum class QKnxControlField::Repeat

This enum type holds whether the frame transmission is repeated. If one of the addressed bus devices has returned a negative acknowledgment, the repeat flag is set to Repeat.

ConstantValueDescription
QKnxControlField::Repeat::Repeat0x00Frame transmission is repeated.
QKnxControlField::Repeat::DoNotRepeat0x01Frame transmission is not repeated.

Member Function Documentation

QKnxControlField::QKnxControlField(const QKnxByteArray &data)

Creates a new control field from the first byte of the data byte array.

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

QKnxControlField::QKnxControlField(quint8 data)

Creates a new control field from an 8-bit data value.

QKnxControlField::QKnxControlField()

Creates a KNX control field.

QKnxControlField::Acknowledge QKnxControlField::acknowledge() const

Returns whether a Layer 2 acknowledge is requested for an L_Data.req frame.

See also setAcknowledge() and QKnxLinkLayerFrame::MessageCode.

QKnxControlField::Broadcast QKnxControlField::broadcast() const

Returns whether the frame is transmitted using system broadcast communication mode or broadcast communication mode.

See also setBroadcast().

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

Returns a builder to create a KNX control field object.

quint8 QKnxControlField::byte() const

Returns the control field as single byte.

QKnxByteArray QKnxControlField::bytes() const

Returns the control field as a range of bytes.

QKnxControlField::Confirm QKnxControlField::confirm() const

For an L_Data.con frame, returns true if there is an error in the transmitted frame; otherwise returns false.

See also setConfirm() and QKnxLinkLayerFrame::MessageCode.

QKnxControlField::FrameFormat QKnxControlField::frameFormat() const

Returns the frame format.

See also setFrameFormat().

QKnxControlField::Priority QKnxControlField::priority() const

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

See also setPriority().

QKnxControlField::Repeat QKnxControlField::repeat() const

Returns whether frame transmission is repeated.

See also setRepeat().

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

Sets whether acknowledgment for an L_Data.req frame is requested to ack.

See also acknowledge() and QKnxLinkLayerFrame::MessageCode.

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

Sets the broadcast flag to bcst.

See also broadcast().

void QKnxControlField::setConfirm(QKnxControlField::Confirm conf)

Sets the confirm flag to conf.

See also confirm().

void QKnxControlField::setFrameFormat(QKnxControlField::FrameFormat type)

Sets the frame type bit of the the frame format parameter to type.

See also frameFormat().

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

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

See also priority().

void QKnxControlField::setRepeat(QKnxControlField::Repeat rep)

Sets the repetition flag to rep.

See also repeat().

quint8 QKnxControlField::size() const

Returns the number of bytes in the control field.

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

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

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

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

Related Non-Members

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

Writes the control field field to the debug stream.

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