QKnxNetIpConnectionHeader Class

The QKnxNetIpConnectionHeader class is a KNXnet/IP frame connection header. More...

Header: #include <QKnxNetIpConnectionHeader>
qmake: QT += knx

Public Functions

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 &items)
void setSequenceNumber(quint8 seqNumber)
void setServiceTypeSpecificValue(quint8 value)
quint8 size() const
bool operator!=(const QKnxNetIpConnectionHeader &other) const
bool operator==(const QKnxNetIpConnectionHeader &other) const

Static Public Members

QKnxNetIpConnectionHeader fromBytes(const QKnxByteArray &bytes, quint16 index = 0)
QDebug operator<<(QDebug debug, const QKnxNetIpConnectionHeader &header)

Detailed Description

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.

See also Qt KNXnet/IP Connection Classes.

Member Function Documentation

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.

See also isValid(), channelId(), sequenceNumber(), and 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.

See also isValid(), channelId(), and sequenceNumber().

QKnxNetIpConnectionHeader::QKnxNetIpConnectionHeader()

Constructs an empty invalid frame header object.

See also isNull() and 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.

See also setChannelId().

QKnxByteArray QKnxNetIpConnectionHeader::connectionTypeSpecificHeaderItems() const

Returns a byte array with connection type specific header items of the KNXnet/IP frame.

See also 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.

See also isNull() and isValid().

bool QKnxNetIpConnectionHeader::isNull() const

Returns 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

Returns 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.

See also isNull().

quint8 QKnxNetIpConnectionHeader::sequenceNumber() const

Returns the sequence number of the KNXnet/IP frame.

See also setSequenceNumber().

quint8 QKnxNetIpConnectionHeader::serviceTypeSpecificValue() const

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

See also setServiceTypeSpecificValue().

void QKnxNetIpConnectionHeader::setChannelId(quint8 channelId)

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

See also channelId().

void QKnxNetIpConnectionHeader::setConnectionTypeSpecificHeaderItems(const QKnxByteArray &items)

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

See also connectionTypeSpecificHeaderItems().

void QKnxNetIpConnectionHeader::setSequenceNumber(quint8 seqNumber)

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

See also sequenceNumber().

void QKnxNetIpConnectionHeader::setServiceTypeSpecificValue(quint8 value)

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

See also 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

Returns true if this object and the given other are not equal; otherwise returns false.

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

Returns true if this object and the given other are equal; otherwise returns false.

Related Non-Members

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

Writes the KNXnet/IP connection header header to the debug stream.

© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.