QKnxControlField Class

The QKnxControlField class represents an 8-bit KNX control field. 更多...

頭: #include <QKnxControlField>
qmake: QT += knx

公共類型

class Builder
枚舉類 Acknowledge { NotRequested, Requested }
枚舉類 Broadcast { System, Domain }
枚舉類 Confirm { NoError, Error }
枚舉類 FrameFormat { Extended, Standard }
枚舉類 Priority { System, Normal, Urgent, Low }
枚舉類 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.

Selecting Frame Format

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.

Selecting Frame Priority

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 .

成員類型文檔編製

enum class QKnxControlField:: Acknowledge

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 .

enum class QKnxControlField:: Broadcast

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.

enum class QKnxControlField:: Confirm

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.

enum class QKnxControlField:: FrameFormat

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.

enum class QKnxControlField:: Priority

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.

enum class QKnxControlField:: Repeat

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.

成員函數文檔編製

QKnxControlField:: QKnxControlField (const QKnxByteArray & data )

Creates a new control field from the first byte of the data byte array.

注意: The byte array must contain at least one element.

QKnxControlField:: QKnxControlField ( quint8 data )

Creates a new control field from an 8-bit data 值。

QKnxControlField:: QKnxControlField ()

Creates a KNX control field.

QKnxControlField::Acknowledge QKnxControlField:: acknowledge () const

Returns whether a Layer 2 acknowledge is requested for an L_Data.req frame.

另請參閱 setAcknowledge () 和 QKnxLinkLayerFrame::MessageCode .

QKnxControlField::Broadcast QKnxControlField:: broadcast () const

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.

quint8 QKnxControlField:: byte () const

Returns the control field as single byte.

QKnxByteArray QKnxControlField:: bytes () const

Returns the control field as a range of bytes.

QKnxControlField::Confirm QKnxControlField:: confirm () const

For an L_Data.con frame, returns true if there is an error in the transmitted frame; otherwise returns false .

另請參閱 setConfirm () 和 QKnxLinkLayerFrame::MessageCode .

QKnxControlField::FrameFormat QKnxControlField:: frameFormat () const

Returns the frame format.

另請參閱 setFrameFormat ().

QKnxControlField::Priority QKnxControlField:: priority () const

Returns the priority that is used for the transmission or reception of the frame.

另請參閱 setPriority ().

QKnxControlField::Repeat QKnxControlField:: repeat () const

Returns whether frame transmission is repeated.

另請參閱 setRepeat ().

void QKnxControlField:: setAcknowledge ( QKnxControlField::Acknowledge ack )

Sets whether acknowledgment for an L_Data.req frame is requested to ack .

另請參閱 acknowledge () 和 QKnxLinkLayerFrame::MessageCode .

void QKnxControlField:: setBroadcast ( QKnxControlField::Broadcast bcst )

Sets the broadcast flag to bcst .

另請參閱 broadcast ().

void QKnxControlField:: setConfirm ( QKnxControlField::Confirm conf )

Sets the confirm flag to conf .

另請參閱 confirm ().

void QKnxControlField:: setFrameFormat ( QKnxControlField::FrameFormat type )

Sets the frame type bit of the the frame format parameter to type .

另請參閱 frameFormat ().

void QKnxControlField:: setPriority ( QKnxControlField::Priority priority )

設置 priority that is used for the transmission or reception of the frame.

另請參閱 priority ().

void QKnxControlField:: setRepeat ( QKnxControlField::Repeat rep )

Sets the repetition flag to rep .

另請參閱 repeat ().

quint8 QKnxControlField:: size () const

Returns the number of bytes in the control field.

bool QKnxControlField:: operator!= (const QKnxControlField & other ) const

返迴 true if this object and the given other 不相等;則返迴 false .

bool QKnxControlField:: operator== (const QKnxControlField & other ) const

返迴 true if this object and the given other 相等;否則返迴 false .

相關非成員

QDebug operator<< ( QDebug debug , const QKnxControlField & field )

Writes the control field field debug stream.