Builder Classclass QKnxDeviceManagementFrame::Builder
|Builder &||setData(const QKnxByteArray &data)|
|Builder &||setMessageCode(MessageCode code)|
|Builder &||setObjectInstance(quint8 instance)|
|Builder &||setObjectType(QKnxInterfaceObjectType type)|
|Builder &||setProperty(QKnxInterfaceObjectProperty pid)|
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:
Member Function Documentation
QKnxDeviceManagementFrame Builder::createFrame() const
Creates and returns a device management frame.
The common way to create a negative confirmation frame is:
auto negativeConfirmation = QKnxDeviceManagementFrame::builder() .setMessageCode(QKnxDeviceManagementFrame::MessageCode::FunctionPropertyStateReadConfirmation) .setObjectType(...) .setObjectInstance(...) .setProperty(...) .createFrame() deviceManagement.sendFrame(negativeConfirmation);
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.
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.