QKnxAdditionalInfo Class

The QKnxAdditionalInfo class represents the additional information that can be placed inside a KNX cEMI frame. 更多...

头: #include <QKnxAdditionalInfo>
qmake: QT += knx

公共类型

enum class Type { PlMediumInformation, RfMediumInformation, BusmonitorStatusInfo, TimestampRelative, TimeDelayUntilSending, …, ManufacturerSpecificData }

公共函数

QKnxAdditionalInfo (QKnxAdditionalInfo::Type type , const QKnxByteArray & data )
QKnxAdditionalInfo ()
~QKnxAdditionalInfo ()
quint8 byte (quint8 index ) const
QKnxByteArray bytes () const
QKnxByteArray data () const
quint8 dataSize () const
bool isNull () const
bool isValid () const
void setData (const QKnxByteArray & data )
void setType (QKnxAdditionalInfo::Type type )
quint8 size () const
QKnxAdditionalInfo::Type type () const
bool operator!= (const QKnxAdditionalInfo & other ) const
bool operator== (const QKnxAdditionalInfo & other ) const

静态公共成员

qint32 expectedDataSize (QKnxAdditionalInfo::Type type , bool * isFixedSize = nullptr)
QKnxAdditionalInfo fromBytes (const QKnxByteArray & bytes , quint16 index = 0)
QDebug operator<< (QDebug debug , const QKnxAdditionalInfo & info )

详细描述

A Common External Message Interface (cEMI) frame can be used for KNX information transport, independent of the KNX medium: twisted pair (TP), power line (PL), or radio frequency (RF). The Type enum holds the type of additional information to be placed into the frame.

The KNX specification limits the size of the data stored in the additional info object to a maximum of 252 bytes. The class implementation acknowledges this and silently truncates the data, when necessary.

成员类型文档编制

enum class QKnxAdditionalInfo:: Type

This enum type holds the type of additional information to be placed into a KNX cEMI frame.

常量 描述
QKnxAdditionalInfo::Type::PlMediumInformation 0x01 Domain address used by the power line (PL) medium.
QKnxAdditionalInfo::Type::RfMediumInformation 0x02 RF-Info byte (formerly named RF-Ctrl), KNX Serial Number/DoA, and Data Link Layer Frame Number (LFN) used by the radio frequency (RF) medium.
QKnxAdditionalInfo::Type::BusmonitorStatusInfo 0x03 Bus monitor error flags.
QKnxAdditionalInfo::Type::TimestampRelative 0x04 Relative timestamp. For example, for L_Raw.ind .
QKnxAdditionalInfo::Type::TimeDelayUntilSending 0x05 Time delay. For example, for L_Raw.req .
QKnxAdditionalInfo::Type::ExtendedRelativeTimestamp 0x06 Device independent time stamp. For example, for L_Raw.ind or L_Busmon.ind .
QKnxAdditionalInfo::Type::BiBatInformation 0x07 Contains b7-b4 of the RF KNX-Ctrl field and BiBat Block-number.
QKnxAdditionalInfo::Type::RfMultiInformation 0x08 RF multifrequency, call channel, and Fast Ack number.
QKnxAdditionalInfo::Type::PreambleAndPostamble 0x09 Preamble and postamble length.
QKnxAdditionalInfo::Type::RfFastAckInformation 0x0a Status and information of each expected number of Fast Ack (N).
QKnxAdditionalInfo::Type::ManufacturerSpecificData 0xfe Manufacturer-specific data, including manufacturer ID (2-byte) and Subfunction ID (1-byte).

成员函数文档编制

QKnxAdditionalInfo:: QKnxAdditionalInfo ( QKnxAdditionalInfo::Type type , const QKnxByteArray & data )

Constructs a new additional info object and sets its Type to type and data to data .

另请参阅 isNull () 和 isValid ().

QKnxAdditionalInfo:: QKnxAdditionalInfo ()

Constructs a new, empty, invalid additional info object.

QKnxAdditionalInfo:: ~QKnxAdditionalInfo ()

Destroys the additional info object and releases all allocated resources.

quint8 QKnxAdditionalInfo:: byte ( quint8 index ) const

Returns the byte at the position index in the additional info object.

QKnxByteArray QKnxAdditionalInfo:: bytes () const

Returns an array of bytes that represent the additional info object.

QKnxByteArray QKnxAdditionalInfo:: data () const

Returns the data stored in the additional info object.

另请参阅 setData ().

quint8 QKnxAdditionalInfo:: dataSize () const

Returns the number of bytes representing the data stored in the additional info object.

[static] qint32 QKnxAdditionalInfo:: expectedDataSize ( QKnxAdditionalInfo::Type type , bool * isFixedSize = nullptr)

Returns the number of expected bytes for the Type id type . The additional boolean parameter isFixedSize 被设为 true if the type expects a fixed size of bytes; otherwise it is to false . If the type is unknown, the function returns a negative value.

Known types of variable size are:

[static] QKnxAdditionalInfo QKnxAdditionalInfo:: fromBytes (const QKnxByteArray & bytes , quint16 index = 0)

Constructs the additional info object from the byte array bytes 起始于位置 index inside the array.

另请参阅 isNull () 和 isValid ().

bool QKnxAdditionalInfo:: isNull () const

If this is an additional info object that is constructed by default, returns true ;否则返回 false . An additional info object is considered null if it contains no initialized type value.

另请参阅 isValid ().

bool QKnxAdditionalInfo:: isValid () const

返回 true if this is a valid additional info object; false 否则。

void QKnxAdditionalInfo:: setData (const QKnxByteArray & data )

Sets the data stored in the additional info object to data .

另请参阅 data ().

void QKnxAdditionalInfo:: setType ( QKnxAdditionalInfo::Type type )

Sets the additional info type to type .

另请参阅 type ().

quint8 QKnxAdditionalInfo:: size () const

Returns the number of bytes representing the additional info, including the byte for the Type id and the byte for length information.

QKnxAdditionalInfo::Type QKnxAdditionalInfo:: type () const

Returns the type of the information stored in the additional info object.

另请参阅 setType ().

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

返回 true if this object and the given other 不相等;则返回 false .

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

返回 true if this object and the given other 相等;否则返回 false .

相关非成员

QDebug operator<< ( QDebug debug , const QKnxAdditionalInfo & info )

Writes the KNX cEMI frame's additional info info debug stream.