FunctionPropertyCommandBuilder Class
class QKnxDeviceManagementFrame::FunctionPropertyCommandBuilderThe QKnxDeviceManagementFrame::FunctionPropertyCommandBuilder class provides the means to create valid device management function property command service frames. More...
Public Functions
QKnxDeviceManagementFrame | createConfirmation(QKnxNetIpCemiServer::ReturnCode code, const QKnxByteArray &data, const QKnxDeviceManagementFrame &request = {}) const |
QKnxDeviceManagementFrame | createNegativeConfirmation(const QKnxDeviceManagementFrame &request = {}) const |
QKnxDeviceManagementFrame | createRequest(const QKnxByteArray &data) const |
FunctionPropertyCommandBuilder & | setObjectInstance(quint8 instance) |
FunctionPropertyCommandBuilder & | setObjectType(QKnxInterfaceObjectType type) |
FunctionPropertyCommandBuilder & | setProperty(QKnxInterfaceObjectProperty pid) |
Detailed Description
The function property command service is used by a common external message interface (cEMI) client to send a function property command request frame, M_FuncPropCommand.req
. It must be followed by a function property command confirmation frame, M_FuncPropCommand.con
, sent by a cEMI server. The confirmation indicates whether the request was successful.
See also QKnxDeviceManagementFrame::MessageCode, QKnxDeviceManagementFrame, and Qt KNX Device Management Classes.
Member Function Documentation
QKnxDeviceManagementFrame FunctionPropertyCommandBuilder::createConfirmation(QKnxNetIpCemiServer::ReturnCode code, const QKnxByteArray &data, const QKnxDeviceManagementFrame &request = {}) const
Creates and returns a device management function property command confirmation frame with the return code set to code and the data field to data.
The available default argument request can be used to fill some of the returned frame fields instead of using the setter functions provided.
The common way to create such a confirmation is:
void MyCemiServer::slotFrameReceived(const QKnxDeviceManagementFrame &request) { // do some work auto data = ... auto confirmation = QKnxDeviceManagementFrame::functionPropertyCommandBuilder() .createConfirmation(QKnxNetIpCemiServer::ReturnCode::NoError, data, request); deviceManagement.sendFrame(confirmation); }
Note: The returned frame may be invalid depending on the values used during setup.
See also QKnxDeviceManagementFrame and QKnxDeviceManagementFrame::isValid().
QKnxDeviceManagementFrame FunctionPropertyCommandBuilder::createNegativeConfirmation(const QKnxDeviceManagementFrame &request = {}) const
Creates and returns a negative device management function property command confirmation frame.
The available default argument request can be used to fill some of the returned frame fields instead of using the setter functions provided.
The common way to create such a confirmation is:
void MyCemiServer::slotFrameReceived(const QKnxDeviceManagementFrame &request) { // do some work bool error = ... if (error) { auto confirmation = QKnxDeviceManagementFrame::functionPropertyCommandBuilder() .createNegativeConfirmation(request); deviceManagement.sendFrame(confirmation); } }
Note: The returned frame may be invalid depending on the values used during setup.
See also QKnxDeviceManagementFrame and QKnxDeviceManagementFrame::isValid().
QKnxDeviceManagementFrame FunctionPropertyCommandBuilder::createRequest(const QKnxByteArray &data) const
Creates and returns a device management function property command request frame with the data field set to data.
The common way to create such a request is:
auto request = QKnxDeviceManagementFrame::functionPropertyCommandBuilder() .setObjectType(...) .setObjectInstance(...) .setProperty(...) .createRequest(...); deviceManagement.sendFrame(request);
Note: The returned frame may be invalid depending on the values used during setup.
See also QKnxDeviceManagementFrame and QKnxDeviceManagementFrame::isValid().
FunctionPropertyCommandBuilder &FunctionPropertyCommandBuilder::setObjectInstance(quint8 instance)
Sets the object instance of this builder to instance and returns a reference to the builder.
FunctionPropertyCommandBuilder &FunctionPropertyCommandBuilder::setObjectType(QKnxInterfaceObjectType type)
Sets the interface object type of this builder to type and returns a reference to the builder.
FunctionPropertyCommandBuilder &FunctionPropertyCommandBuilder::setProperty(QKnxInterfaceObjectProperty pid)
Sets the interface object property of this builder to pid and returns a reference to the builder.
© 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.