The QKnxCharString class is a datapoint type that encodes a string. 更多...
头: | #include <QKnxCharString> |
qmake: | QT += knx |
继承: | QKnxFixedSizeDatapointType |
继承者: |
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 .
Creates a fixed size datapoint type storing the string string with the length size .
Creates a fixed size datapoint type storing the string string .
Creates a fixed size datapoint type with the value set to
0
.
[override virtual]
bool
QKnxCharString::
isValid
() const
重实现: QKnxDatapointType::isValid () const.
Sets the string stored in the datapoint type to string .
返回
true
if the value was set; otherwise returns
false
.
另请参阅 string ().
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.
Returns the string stored in the datapoint type.
另请参阅 setString ().