The QKnxExtendedControlField::Builder class creates a KNX extended control field with some default values set. 更多...
QKnxExtendedControlField | create () const |
Builder & | setDestinationAddressType (QKnxAddress::Type address ) |
Builder & | setFormat (ExtendedFrameFormat format ) |
Builder & | setHopCount (quint8 hopCount ) |
The default values produce extended control fields that are suitable for multicast frames that read or write group values.
By default, the address type is set to
Group
to specify that the frame is sent to a group address. The hop count is set to 6 to limit the number of subnetworks the frame is allowed to pass to six. This prevents the endless circulation of messages in incorrectly configured installations. The frame format is mapped to the value of
QKnxControlField::FrameFormat
, which is set to
Standard
by default. That is the preferred format for short frames.
The following sample code creates an extended control field using the default values:
范例:
auto ctrl = QKnxExtendedControlField::builder.create();
Some flags can be modified for more advanced use, such as setting up an extended control field used for transmitting a
L_Data_Extended
frame to the individual address of a device:
auto ctrl = QKnxControlField::builder .setDestinationAddressType(QKnxAddress::Type::Individual) .create();
创建并返回 QKnxExtendedControlField .
Sets the destination address type to address and returns a reference to the builder.
Sets the extended frame format to format and returns a reference to the builder.
Sets the hop count to hopCount and returns a reference to the builder.