The QKnxNetIpConnectionHeader class is a KNXnet/IP frame connection header. 更多...
头: | #include <QKnxNetIpConnectionHeader> |
qmake: | QT += knx |
QKnxNetIpConnectionHeader (quint8 channelId , quint8 seqNumber , quint8 serviceTypeSpecificValue ) | |
QKnxNetIpConnectionHeader (quint8 channelId , quint8 seqNumber ) | |
QKnxNetIpConnectionHeader () | |
~QKnxNetIpConnectionHeader () | |
quint8 | byte (quint8 index ) const |
QKnxByteArray | bytes () const |
quint8 | channelId () const |
QKnxByteArray | connectionTypeSpecificHeaderItems () const |
bool | isNull () const |
bool | isValid () const |
quint8 | sequenceNumber () const |
quint8 | serviceTypeSpecificValue () const |
void | setChannelId (quint8 channelId ) |
void | setConnectionTypeSpecificHeaderItems (const QKnxByteArray & 项 ) |
void | setSequenceNumber (quint8 seqNumber ) |
void | setServiceTypeSpecificValue (quint8 value ) |
quint8 | size () const |
bool | operator!= (const QKnxNetIpConnectionHeader & other ) const |
bool | operator== (const QKnxNetIpConnectionHeader & other ) const |
QKnxNetIpConnectionHeader | fromBytes (const QKnxByteArray & bytes , quint16 index = 0) |
QDebug | operator<< (QDebug debug , const QKnxNetIpConnectionHeader & header ) |
The body of every KNXnet/IP frame sent over an established communication channel starts with a data field that contains additional general information about the data connection. The amount of this data and what type of information is included there in particular is determined by several options during the connection phase of a communication channel. The total of these data fields is called connection header and its appearance varies greatly depending on the already mentioned connection options. Only the order in which the different data fields are stored in the connection header is fixed.
另请参阅 Qt KNXnet/IP Connection Classes .
Constructs a valid frame header object. Sets the object's communication channel ID to channelId , the sequence number to seqNumber , and the service specific value to serviceTypeSpecificValue . The header size is updated accordingly.
另请参阅 isValid (), channelId (), sequenceNumber (),和 serviceTypeSpecificValue ().
Constructs a valid frame header object. Sets the object's communication channel ID to channelId and the sequence number to seqNumber . The header size is updated accordingly.
另请参阅 isValid (), channelId (),和 sequenceNumber ().
Constructs an empty invalid frame header object.
Destroys the frame header object and releases all allocated resources.
Returns the byte at position index in the header.
Returns an array of bytes that represent the KNXnet/IP frame connection header.
Returns the communication channel ID of the KNXnet/IP frame.
另请参阅 setChannelId ().
Returns a byte array with connection type specific header items of the KNXnet/IP frame.
另请参阅 setConnectionTypeSpecificHeaderItems ().
[static]
QKnxNetIpConnectionHeader
QKnxNetIpConnectionHeader::
fromBytes
(const
QKnxByteArray
&
bytes
,
quint16
index
= 0)
Constructs the KNXnet/IP frame connection header from the byte array bytes starting at the position index inside the array.
返回
true
if this is a default constructed header, otherwise returns
false
. A header is considered null if its header size is not initialized.
返回
true
if the frame header contains initialized values and is in itself valid, otherwise returns
false
. A valid KNXnet/IP frame connection header consist of a header size, communication channel ID, sequence Number and a service specific type. All values can be
null
except the header size.
另请参阅 isNull ().
Returns the sequence number of the KNXnet/IP frame.
另请参阅 setSequenceNumber ().
Returns the service type specific value of the KNXnet/IP frame.
另请参阅 setServiceTypeSpecificValue ().
Sets the communication channel ID of the KNXnet/IP frame to channelId .
另请参阅 channelId ().
Sets the connection type specific header items of the KNXnet/IP frame to 项 .
另请参阅 connectionTypeSpecificHeaderItems ().
Sets the sequence number of the KNXnet/IP frame to seqNumber .
另请参阅 sequenceNumber ().
Sets the service type specific value of the KNXnet/IP frame to value .
另请参阅 serviceTypeSpecificValue ().
Returns the total size of the header including all items. The minimum size for a valid header is 4 bytes.
返回
true
if this object and the given
other
不相等;则返回
false
.
返回
true
if this object and the given
other
相等;否则返回
false
.
Writes the KNXnet/IP connection header header 到 debug stream.