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