QKnxNetIpConnectionHeader Class

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 .

成员函数文档编制

QKnxNetIpConnectionHeader:: QKnxNetIpConnectionHeader ( quint8 channelId , quint8 seqNumber , quint8 serviceTypeSpecificValue )

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 ().

QKnxNetIpConnectionHeader:: QKnxNetIpConnectionHeader ( quint8 channelId , quint8 seqNumber )

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 ().

QKnxNetIpConnectionHeader:: QKnxNetIpConnectionHeader ()

Constructs an empty invalid frame header object.

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

QKnxNetIpConnectionHeader:: ~QKnxNetIpConnectionHeader ()

Destroys the frame header object and releases all allocated resources.

quint8 QKnxNetIpConnectionHeader:: byte ( quint8 index ) const

Returns the byte at position index in the header.

QKnxByteArray QKnxNetIpConnectionHeader:: bytes () const

Returns an array of bytes that represent the KNXnet/IP frame connection header.

quint8 QKnxNetIpConnectionHeader:: channelId () const

Returns the communication channel ID of the KNXnet/IP frame.

另请参阅 setChannelId ().

QKnxByteArray QKnxNetIpConnectionHeader:: connectionTypeSpecificHeaderItems () const

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.

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

bool QKnxNetIpConnectionHeader:: isNull () const

返回 true if this is a default constructed header, otherwise returns false . A header is considered null if its header size is not initialized.

bool QKnxNetIpConnectionHeader:: isValid () const

返回 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 ().

quint8 QKnxNetIpConnectionHeader:: sequenceNumber () const

Returns the sequence number of the KNXnet/IP frame.

另请参阅 setSequenceNumber ().

quint8 QKnxNetIpConnectionHeader:: serviceTypeSpecificValue () const

Returns the service type specific value of the KNXnet/IP frame.

另请参阅 setServiceTypeSpecificValue ().

void QKnxNetIpConnectionHeader:: setChannelId ( quint8 channelId )

Sets the communication channel ID of the KNXnet/IP frame to channelId .

另请参阅 channelId ().

void QKnxNetIpConnectionHeader:: setConnectionTypeSpecificHeaderItems (const QKnxByteArray & )

Sets the connection type specific header items of the KNXnet/IP frame to .

另请参阅 connectionTypeSpecificHeaderItems ().

void QKnxNetIpConnectionHeader:: setSequenceNumber ( quint8 seqNumber )

Sets the sequence number of the KNXnet/IP frame to seqNumber .

另请参阅 sequenceNumber ().

void QKnxNetIpConnectionHeader:: setServiceTypeSpecificValue ( quint8 value )

Sets the service type specific value of the KNXnet/IP frame to value .

另请参阅 serviceTypeSpecificValue ().

quint8 QKnxNetIpConnectionHeader:: size () const

Returns the total size of the header including all items. The minimum size for a valid header is 4 bytes.

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

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

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

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

相关非成员

QDebug operator<< ( QDebug debug , const QKnxNetIpConnectionHeader & header )

Writes the KNXnet/IP connection header header debug stream.