The QKnxControlField class represents an 8-bit KNX control field. 更多...
头: | #include <QKnxControlField> |
qmake: | QT += knx |
class | Builder |
enum class | Acknowledge { NotRequested, Requested } |
enum class | Broadcast { System, Domain } |
enum class | Confirm { NoError, Error } |
enum class | FrameFormat { Extended, Standard } |
enum class | Priority { System, Normal, Urgent, Low } |
enum class | Repeat { Repeat, DoNotRepeat } |
QKnxControlField (const QKnxByteArray & data ) | |
QKnxControlField (quint8 data ) | |
QKnxControlField () | |
QKnxControlField::Acknowledge | acknowledge () const |
QKnxControlField::Broadcast | broadcast () const |
quint8 | byte () const |
QKnxByteArray | bytes () const |
QKnxControlField::Confirm | confirm () const |
QKnxControlField::FrameFormat | frameFormat () const |
QKnxControlField::Priority | priority () const |
QKnxControlField::Repeat | repeat () const |
void | setAcknowledge (QKnxControlField::Acknowledge ack ) |
void | setBroadcast (QKnxControlField::Broadcast bcst ) |
void | setConfirm (QKnxControlField::Confirm conf ) |
void | setFrameFormat (QKnxControlField::FrameFormat type ) |
void | setPriority (QKnxControlField::Priority priority ) |
void | setRepeat (QKnxControlField::Repeat rep ) |
quint8 | size () const |
bool | operator!= (const QKnxControlField & other ) const |
bool | operator== (const QKnxControlField & other ) const |
QKnxControlField::Builder | builder () |
QDebug | operator<< (QDebug debug , const QKnxControlField & field ) |
A KNX frame contains several fields, one of which might be the control field. The control field must specify at least the FrameFormat , 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 control field selects the standard or extended frame format for the data link layer and includes information for the used extended frame type. The standard format should be preferred and the extended format should only be used when the encoding capabilities of the standard format are insufficient.
The priority of frames should be selected carefully to ensure fair bus access. The maximum priority that is allowed for run-time communication is normal 。 system priority is reserved for system configuration and management procedures.
The urgent priority is only allowed for implementations of datapoints of functional blocks or channels for which this is specified explicitly. In a network, the frame traffic using urgent priority shall not exceed five percent of the total traffic.
另请参阅 builder () 和 QKnxExtendedControlField .
This enum type holds 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. This is not valid for all media.
常量 | 值 | 描述 |
---|---|---|
QKnxControlField::Acknowledge::NotRequested
|
0x00
|
Acknowledgment is not requested. |
QKnxControlField::Acknowledge::Requested
|
0x01
|
Acknowledgment is requested. |
另请参阅 QKnxLinkLayerFrame::MessageCode .
This enum type specifies whether the frame is transmitted using system broadcast communication mode or broadcast communication mode.
常量 | 值 | 描述 |
---|---|---|
QKnxControlField::Broadcast::System
|
0x00
|
The frame is transmitted using system broadcast communication mode. |
QKnxControlField::Broadcast::Domain
|
0x01
|
The frame is transmitted using broadcast communication mode. |
This enum type holds whether there is an error in the transmitted frame.
常量 | 值 | 描述 |
---|---|---|
QKnxControlField::Confirm::NoError
|
0x00
|
No errors found. |
QKnxControlField::Confirm::Error
|
0x01
|
Errors found. |
This enum type selects the standard or extended frame format for the data link layer and includes information for the used extended frame type.
常量 | 值 | 描述 |
---|---|---|
QKnxControlField::FrameFormat::Extended
|
0x00
|
This parameter is mapped to QKnxExtendedControlField::ExtendedFrameFormat . The extended frame format is used and the frame type is selected by the frame type parameter bit. |
QKnxControlField::FrameFormat::Standard
|
0x01
|
The standard frame format is used. |
This enum type holds the priority used for the transmission or reception of the frame.
常量 | 值 | 描述 |
---|---|---|
QKnxControlField::Priority::System
|
0x00
|
System priority is used. It is reserved for high priority frames, as well as system configuration and management procedures. |
QKnxControlField::Priority::Normal
|
0x01
|
Normal priority is used. It is the default priority for short frames. |
QKnxControlField::Priority::Urgent
|
0x02
|
High priority is used. It is reserved for urgent frames. |
QKnxControlField::Priority::Low
|
0x03
|
Low priority is used. It is mandatory for long frames, burst traffic, and so on. |
This enum type holds whether the frame transmission is repeated. If one of the addressed bus devices has returned a negative acknowledgment, the repeat flag is set to
Repeat
.
常量 | 值 | 描述 |
---|---|---|
QKnxControlField::Repeat::Repeat
|
0x00
|
Frame transmission is repeated. |
QKnxControlField::Repeat::DoNotRepeat
|
0x01
|
Frame transmission is not repeated. |
Creates a new control field from the first byte of the data byte array.
注意: The byte array must contain at least one element.
Creates a new control field from an 8-bit data 值。
Creates a KNX control field.
Returns whether a Layer 2 acknowledge is requested for an
L_Data.req
frame.
另请参阅 setAcknowledge () 和 QKnxLinkLayerFrame::MessageCode .
Returns whether the frame is transmitted using system broadcast communication mode or broadcast communication mode.
另请参阅 setBroadcast ().
[static]
QKnxControlField::Builder
QKnxControlField::
builder
()
Returns a builder to create a KNX control field object.
Returns the control field as single byte.
Returns the control field as a range of bytes.
For an
L_Data.con
frame, returns
true
if there is an error in the transmitted frame; otherwise returns
false
.
另请参阅 setConfirm () 和 QKnxLinkLayerFrame::MessageCode .
Returns the frame format.
另请参阅 setFrameFormat ().
Returns the priority that is used for the transmission or reception of the frame.
另请参阅 setPriority ().
Returns whether frame transmission is repeated.
另请参阅 setRepeat ().
Sets whether acknowledgment for an
L_Data.req
frame is requested to
ack
.
另请参阅 acknowledge () 和 QKnxLinkLayerFrame::MessageCode .
Sets the broadcast flag to bcst .
另请参阅 broadcast ().
Sets the confirm flag to conf .
另请参阅 confirm ().
Sets the frame type bit of the the frame format parameter to type .
另请参阅 frameFormat ().
设置 priority that is used for the transmission or reception of the frame.
另请参阅 priority ().
Sets the repetition flag to rep .
另请参阅 repeat ().
Returns the number of bytes in the control field.
返回
true
if this object and the given
other
不相等;则返回
false
.
返回
true
if this object and the given
other
相等;否则返回
false
.
Writes the control field field 到 debug stream.