QKnxVarString Class

The QKnxVarString class is a datapoint type that encodes a variable length string. 更多...

头: #include <QKnxVarString>
qmake: QT += knx
Since: Qt 5.11
继承: QKnxVariableSizeDatapointType
继承者:

QKnxVarString88591

该类在 Qt 5.11 引入。

公共函数

QKnxVarString (const char * string , int size = -1)
QKnxVarString (QLatin1String string )
QKnxVarString ()
bool setString (QLatin1String string )
bool setString (const char * string , int size = -1)
QLatin1String string () const

重实现公共函数

virtual bool isValid () const override

保护函数

QKnxVarString (int subType , const char * string , int size )

详细描述

This datapoint type encodes a string of variable length. The encoding of the string is specified in QKnxVarString88591 .

This is a variable sized datapoint type.

另请参阅 QKnxDatapointType , QKnxVarString88591 , QKnxCharString , QKnxCharStringASCII , QKnxCharString88591 ,和 Qt KNX Datapoint Type Classes .

成员函数文档编制

[protected] QKnxVarString:: QKnxVarString ( int subType , const char * string , int size )

Creates a variable sized datapoint type with the sub type subType that stores the string string with the length size .

QKnxVarString:: QKnxVarString (const char * string , int size = -1)

Creates a variable sized datapoint type that stores the string string with the length size .

QKnxVarString:: QKnxVarString ( QLatin1String string )

Creates a variable sized datapoint type that stores the string string .

QKnxVarString:: QKnxVarString ()

Creates a variable sized datapoint type.

[override virtual] bool QKnxVarString:: isValid () const

重实现: QKnxDatapointType::isValid () const.

bool QKnxVarString:: setString ( QLatin1String string )

Sets the string stored in the datapoint type to string .

返回 true if the value was set; otherwise returns false .

另请参阅 string ().

bool QKnxVarString:: setString (const char * string , int size = -1)

Sets the string stored in the datapoint type to string with the length size .

size is -1 , the full string 被使用。

返回 true if the value was set; otherwise returns false .

QLatin1String QKnxVarString:: string () const

Returns the string stored in the datapoint type.

另请参阅 setString ().