Builder Class

class QKnxDeviceManagementFrame::Builder

The QKnxDeviceManagementFrame::Builder class provides the means to create valid device management service frames. More...

Public Functions

QKnxDeviceManagementFrame createFrame() const
Builder &setData(const QKnxByteArray &data)
Builder &setMessageCode(MessageCode code)
Builder &setObjectInstance(quint8 instance)
Builder &setObjectType(QKnxInterfaceObjectType type)
Builder &setProperty(QKnxInterfaceObjectProperty pid)

Detailed Description

The typical arguments needed to build a QKnxDeviceManagementFrame are:

  • The code describing the service to use, QKnxDeviceManagementFrame::MessageCode.
  • The type of the interface object holding the property one wants to access, QKnxInterfaceObjectType.
  • The instance of this interface object (because it is possible to have more than one realization of an interface object in a given device).
  • The property of the interface object one wants to access, QKnxInterfaceObjectProperty.
  • The data part which might consist of the number of elements one wants to read in this property and start index from where to read.

More specialized versions of the builder are also provided and it is recommended to prefer them over the generic version:

See also QKnxDeviceManagementFrame::MessageCode, QKnxDeviceManagementFrame, and Qt KNX Device Management Classes.

Member Function Documentation

QKnxDeviceManagementFrame Builder::createFrame() const

Creates and returns a device management frame.

The service used depends on the frame's message code. All other fields, such as object type, object instance, interface object property, and depending on the service data, need to be set as well.

The common way to create a negative confirmation frame is:

auto negativeConfirmation = QKnxDeviceManagementFrame::builder()

The above code is equivalent to calling the FunctionPropertyStateReadBuilder::createNegativeConfirmation function.

Note: The returned frame may be invalid depending on the values used during setup.

See also QKnxDeviceManagementFrame and QKnxDeviceManagementFrame::isValid().

Builder &Builder::setData(const QKnxByteArray &data)

Sets the data of this builder to data and returns a reference to the builder.

Builder &Builder::setMessageCode(MessageCode code)

Sets the message code of this builder to code and returns a reference to the builder.

Builder &Builder::setObjectInstance(quint8 instance)

Sets the object instance of this builder to instance and returns a reference to the builder.

Builder &Builder::setObjectType(QKnxInterfaceObjectType type)

Sets the interface object type of this builder to type and returns a reference to the builder.

Builder &Builder::setProperty(QKnxInterfaceObjectProperty pid)

Sets the interface object property of this builder to pid 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.