Builder Classclass QKnxControlField::Builder
|Builder &||setAcknowledge(Acknowledge acknowledge)|
|Builder &||setBroadcast(Broadcast broadcast)|
|Builder &||setConfirm(Confirm errorStatus)|
|Builder &||setFrameFormat(FrameFormat type)|
|Builder &||setPriority(Priority priority)|
|Builder &||setRepeat(Repeat repeat)|
The control field of a KNX frame must specify at least the FrameFormat, the Repeat flag, and the frame Priority. In addition, it may specify how widely the frame is Broadcast, and whether acknowledgment (Acknowledge) or confirmation (Confirm) is requested for the transmission or reception of the frame.
The default values produce control fields that are suitable for multicast frames that read or write group values.
The control field selects the standard or extended frame format for the data link layer and includes information for the used extended frame type. By default, the frame format is set to Standard, which is the preferred format for short frames.
The repeat flag determines whether the frame transmission is repeated if the status of an acknowledgment frame received from a bus device indicates that an error has occurred. By default, the repeat flag is set to DoNotRepeat.
The broadcast flag selects the communication mode used for transmitting the frame. By default, it is set to Domain to transmit frames using broadcast communication mode.
The priority of frames should be selected carefully to ensure fair bus access. By default, the priority of a frame is set to Low, which is mandatory for long frames. The maximum priority that is allowed for run-time communication is Normal.
The acknowledge flag determines whether a Layer 2 acknowledge is requested for an
L_Data.req frame that is used in client-to-server communiction on the KNX data link layer. By default, it is set to NotRequested.
The confirm flag indicates whether there is an error in the transmitted frame. By default, it is set to NoError.
The following sample code creates a control field using the default values:
auto ctrl = QKnxControlField::builder.create();
Some flags can be modified for more advanced use, such as setting up a control field used for unicast or broadcast with a higher priority:
Member Function Documentation
QKnxControlField Builder::create() const
Creates and returns a KNX control field.
Builder &Builder::setAcknowledge(Acknowledge acknowledge)
Sets the acknowledge flag to acknowledge and returns a reference to the builder.
Sets the broadcast flag to broadcast and returns a reference to the builder.
Sets the confirm flag to errorStatus and returns a reference to the builder.
Builder &Builder::setFrameFormat(FrameFormat type)
Sets the frame type bit of the frame format parameter to type and returns a reference to the builder.
Sets the priority flag to priority and returns a reference to the builder.
Sets the repeat flag to repeat 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.