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.
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). |
Constructs a new additional info object and sets its Type to type and data to data .
Constructs a new, empty, invalid additional info object.
Destroys the additional info object and releases all allocated resources.
Returns the byte at the position index in the additional info object.
Returns an array of bytes that represent the additional info object.
Returns the data stored in the additional info object.
另请参阅 setData ().
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.
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 ().
返回
true
if this is a valid additional info object;
false
否则。
Sets the data stored in the additional info object to data .
另请参阅 data ().
Sets the additional info type to type .
另请参阅 type ().
Returns the number of bytes representing the additional info, including the byte for the Type id and the byte for length information.
Returns the type of the information stored in the additional info object.
另请参阅 setType ().
返回
true
if this object and the given
other
不相等;则返回
false
.
返回
true
if this object and the given
other
相等;否则返回
false
.
Writes the KNX cEMI frame's additional info info 到 debug stream.