The QKnxDeviceManagementFrame::Builder class provides the means to create valid device management service frames. 更多...
QKnxDeviceManagementFrame | createFrame () const |
Builder & | setData (const QKnxByteArray & data ) |
Builder & | setMessageCode (MessageCode code ) |
Builder & | setObjectInstance (quint8 实例 ) |
Builder & | setObjectType (QKnxInterfaceObjectType type ) |
Builder & | setProperty (QKnxInterfaceObjectProperty pid ) |
The typical arguments needed to build a QKnxDeviceManagementFrame 是:
More specialized versions of the builder are also provided and it is recommended to prefer them over the generic version:
另请参阅 QKnxDeviceManagementFrame::MessageCode , QKnxDeviceManagementFrame ,和 Qt KNX Device Management Classes .
Creates and returns a device management frame.
The service used depends on the frame's message code . All other fields, such as 对象类型 , 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() .setMessageCode(QKnxDeviceManagementFrame::MessageCode::FunctionPropertyStateReadConfirmation) .setObjectType(...) .setObjectInstance(...) .setProperty(...) .createFrame() deviceManagement.sendFrame(negativeConfirmation);
The above code is equivalent to calling the FunctionPropertyStateReadBuilder::createNegativeConfirmation 函数。
注意: The returned frame may be invalid depending on the values used during setup.
另请参阅 QKnxDeviceManagementFrame and QKnxDeviceManagementFrame::isValid ().
Sets the data of this builder to data and returns a reference to the builder.
Sets the message code of this builder to code and returns a reference to the builder.
Sets the object instance of this builder to 实例 and returns a reference to the builder.
Sets the interface object type of this builder to type and returns a reference to the builder.
Sets the interface object property of this builder to pid and returns a reference to the builder.