QKnxCharString Class

The QKnxCharString class is a datapoint type that encodes a string. 更多...

頭: #include <QKnxCharString>
qmake: QT += knx
繼承: QKnxFixedSizeDatapointType
繼承者:

QKnxCharString88591 and QKnxCharStringASCII

公共函數

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

重實現公共函數

virtual bool isValid () const override

保護函數

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

詳細描述

This datapoint type encodes a string of QKnxChar . The encoding of the string is specified in QKnxCharStringASCII and QKnxCharString88591 .

This is a fixed size datapoint type with the length of 14 bytes.

The range for the string size is from 0 to 14 .

另請參閱 QKnxDatapointType , QKnxVarString , QKnxVarString88591 ,和 Qt KNX Datapoint Type Classes .

成員函數文檔編製

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

Creates a fixed size datapoint type with the subtype subType , storing the string string with the length size .

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

Creates a fixed size datapoint type storing the string string with the length size .

QKnxCharString:: QKnxCharString ( QLatin1String string )

Creates a fixed size datapoint type storing the string string .

QKnxCharString:: QKnxCharString ()

Creates a fixed size datapoint type with the value set to 0 .

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

重實現: QKnxDatapointType::isValid () const.

bool QKnxCharString:: setString ( QLatin1String string )

Sets the string stored in the datapoint type to string .

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

另請參閱 string ().

bool QKnxCharString:: 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 被使用。

If the value is outside the allowed range, returns false and does not set the string.

QLatin1String QKnxCharString:: string () const

Returns the string stored in the datapoint type.

另請參閱 setString ().