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