QKnxByteStore Class

The QKnxByteStore class is a byte store used when building frames. More...

Header: #include <QKnxByteStore>
qmake: QT += knx
Inherited By:

QKnxAdditionalInfo, QKnxNetIpStructHeader, and QKnxNpdu

Public Functions

void appendBytes(const T &bytesToAppend)
quint8 byte(quint16 index) const
void insertBytes(quint16 pos, const T &bytesToInsert)
QKnxByteStoreRef ref(quint16 index = 0) const
void replaceBytes(quint16 pos, const T &replacement)
void resize(quint16 size, const quint8 value = 0)
void setByte(quint16 index, quint8 byte)
void setBytes(const T &sourceBytes)
void setBytes(QByteArray::const_iterator sourceBegin, QByteArray::const_iterator sourceEnd)
void setBytes(Iterator sourceBegin, Iterator sourceEnd)
quint16 size() const
virtual QString toString() const

Protected Functions

QKnxByteStore() = default
QKnxByteStore(quint8 byte)
QKnxByteStore(const quint8 *bytes, quint16 size)
virtual ~QKnxByteStore() = default
const quint8 *data() const

Detailed Description

The QKnxByteStore class is a byte store used when building frames.

To communicate with the KNX bus, frames needs to be exchanged. The byte store is useful when building the frames and serves as a base to classes representing the frames.

Member Function Documentation

[default protected] QKnxByteStore::QKnxByteStore()

Default constructs an instance of QKnxByteStore.

[protected] QKnxByteStore::QKnxByteStore(quint8 byte)

Constructs a new byte store equal to byte.

[protected] QKnxByteStore::QKnxByteStore(const quint8 *bytes, quint16 size)

Constructs a new byte store of the size size from the bytes array.

[default protected] QKnxByteStore::~QKnxByteStore()

Destroys the instance of QKnxByteStore. The destructor is virtual.

void QKnxByteStore::appendBytes(const T &bytesToAppend)

quint8 QKnxByteStore::byte(quint16 index) const

Returns the byte of the current byte store at index.

See also setByte().

[protected] const quint8 *QKnxByteStore::data() const

void QKnxByteStore::insertBytes(quint16 pos, const T &bytesToInsert)

QKnxByteStoreRef QKnxByteStore::ref(quint16 index = 0) const

Creates a QKnxByteStoreRef object pointing to the index of the object.

void QKnxByteStore::replaceBytes(quint16 pos, const T &replacement)

void QKnxByteStore::resize(quint16 size, const quint8 value = 0)

Resizes the range of bytes to the given size and value.

void QKnxByteStore::setByte(quint16 index, quint8 byte)

See also byte().

void QKnxByteStore::setBytes(const T &sourceBytes)

void QKnxByteStore::setBytes(QByteArray::const_iterator sourceBegin, QByteArray::const_iterator sourceEnd)

Replaces the current byte store using the STL-style const iterators sourceBegin and sourceEnd.

void QKnxByteStore::setBytes(Iterator sourceBegin, Iterator sourceEnd)

quint16 QKnxByteStore::size() const

Returns the number of bytes.

[virtual] QString QKnxByteStore::toString() const

Returns a QString object representing the bytes.

© 2017 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.