Builder Class

class QKnxExtendedControlField::Builder

The QKnxExtendedControlField::Builder class creates a KNX extended control field with some default values set. More...

Public Functions

QKnxExtendedControlField create() const
Builder &setDestinationAddressType(QKnxAddress::Type address)
Builder &setFormat(ExtendedFrameFormat format)
Builder &setHopCount(quint8 hopCount)

Detailed Description

The default values produce extended control fields that are suitable for multicast frames that read or write group values.

By default, the address type is set to Group to specify that the frame is sent to a group address. The hop count is set to 6 to limit the number of subnetworks the frame is allowed to pass to six. This prevents the endless circulation of messages in incorrectly configured installations. The frame format is mapped to the value of QKnxControlField::FrameFormat, which is set to Standard by default. That is the preferred format for short frames.

The following sample code creates an extended control field using the default values:

Example:

auto ctrl = QKnxExtendedControlField::builder.create();

Some flags can be modified for more advanced use, such as setting up an extended control field used for transmitting a L_Data_Extended frame to the individual address of a device:

auto ctrl = QKnxControlField::builder
    .setDestinationAddressType(QKnxAddress::Type::Individual)
    .create();

Member Function Documentation

QKnxExtendedControlField Builder::create() const

Creates and returns a QKnxExtendedControlField.

Builder &Builder::setDestinationAddressType(QKnxAddress::Type address)

Sets the destination address type to address and returns a reference to the builder.

Builder &Builder::setFormat(ExtendedFrameFormat format)

Sets the extended frame format to format and returns a reference to the builder.

Builder &Builder::setHopCount(quint8 hopCount)

Sets the hop count to hopCount and returns a reference to the builder.

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