Class representing an attribute of a header.
More...
#include <headerAttribute.h>
|
| HeaderAttribute (const QString &name, quint32 sizeInBit, const QVector< quint8 > &content) |
| Constructor for QVector<quint8> content.
|
|
| HeaderAttribute (const QString &name, quint32 sizeInBit, quint8 content) |
| Constructor for quint8 content.
|
|
| HeaderAttribute (const QString &name, quint32 sizeInBit, quint16 content) |
| Constructor for quint16 content.
|
|
| HeaderAttribute (const QString &name, quint32 sizeInBit, quint32 content) |
| Constructor for quint32 content.
|
|
| HeaderAttribute (const QString &name, quint32 sizeInBit, quint64 content) |
| Constructor for quint64 content.
|
|
| HeaderAttribute (const QString &name, quint32 sizeInBit, const QString &content) |
| Constructor for QString content.
|
|
| HeaderAttribute ()=default |
| Default constructor.
|
|
QString | name () const |
| Returns the name of the attribute.
|
|
quint32 | size () const |
| Returns the size of the attribute content in bits.
|
|
quint64 | toInt () const |
| Converts the content to an integer.
|
|
QVector< quint8 > | toArray () const |
| Converts the content to a byte array.
|
|
void | setContent (QVector< quint8 > content) |
| Sets the content using a byte array.
|
|
Class representing an attribute of a header.
◆ HeaderAttribute() [1/7]
HeaderAttribute::HeaderAttribute |
( |
const QString & |
name, |
|
|
quint32 |
sizeInBit, |
|
|
const QVector< quint8 > & |
content |
|
) |
| |
Constructor for QVector<quint8> content.
- Parameters
-
name | Attribute name. |
sizeInBit | Size of the content in bits. |
content | Content in bytes. |
◆ HeaderAttribute() [2/7]
HeaderAttribute::HeaderAttribute |
( |
const QString & |
name, |
|
|
quint32 |
sizeInBit, |
|
|
quint8 |
content |
|
) |
| |
Constructor for quint8 content.
- Parameters
-
name | Attribute name. |
sizeInBit | Size of the content in bits. |
content | Single byte content. |
◆ HeaderAttribute() [3/7]
HeaderAttribute::HeaderAttribute |
( |
const QString & |
name, |
|
|
quint32 |
sizeInBit, |
|
|
quint16 |
content |
|
) |
| |
Constructor for quint16 content.
- Parameters
-
name | Attribute name. |
sizeInBit | Size of the content in bits. |
content | Double byte content. |
◆ HeaderAttribute() [4/7]
HeaderAttribute::HeaderAttribute |
( |
const QString & |
name, |
|
|
quint32 |
sizeInBit, |
|
|
quint32 |
content |
|
) |
| |
Constructor for quint32 content.
- Parameters
-
name | Attribute name. |
sizeInBit | Size of the content in bits. |
content | Four byte content. |
◆ HeaderAttribute() [5/7]
HeaderAttribute::HeaderAttribute |
( |
const QString & |
name, |
|
|
quint32 |
sizeInBit, |
|
|
quint64 |
content |
|
) |
| |
Constructor for quint64 content.
- Parameters
-
name | Attribute name. |
sizeInBit | Size of the content in bits. |
content | Eight byte content. |
◆ HeaderAttribute() [6/7]
HeaderAttribute::HeaderAttribute |
( |
const QString & |
name, |
|
|
quint32 |
sizeInBit, |
|
|
const QString & |
content |
|
) |
| |
Constructor for QString content.
- Parameters
-
name | Attribute name. |
sizeInBit | Size of the content in bits. |
content | Content as QString. |
◆ HeaderAttribute() [7/7]
NetSim::HeaderAttribute::HeaderAttribute |
( |
| ) |
|
|
default |
◆ name()
QString HeaderAttribute::name |
( |
| ) |
const |
Returns the name of the attribute.
- Return values
-
QString | Name of the attribute. |
◆ setContent()
void HeaderAttribute::setContent |
( |
QVector< quint8 > |
content | ) |
|
Sets the content using a byte array.
- Parameters
-
content | Content to be set. |
◆ size()
quint32 HeaderAttribute::size |
( |
| ) |
const |
Returns the size of the attribute content in bits.
- Return values
-
◆ toArray()
QVector< quint8 > HeaderAttribute::toArray |
( |
| ) |
const |
Converts the content to a byte array.
- Return values
-
QVector<quint8> | Content as a byte array. |
◆ toInt()
quint64 HeaderAttribute::toInt |
( |
| ) |
const |
Converts the content to an integer.
- Return values
-
quint64 | Content as an integer. |
The documentation for this class was generated from the following files: