The QKnxStatusMode3 class is a datapoint type for a status mode 3. 更多...
头: | #include <QKnxStatusMode3> |
qmake: | QT += knx |
继承: | QKnxFixedSizeDatapointType |
enum class | Mode { Zero, One, Two, Unknown } |
enum | Status { A, B, C, D, E } |
flags | StatusFlags |
QKnxStatusMode3 (QKnxStatusMode3::Mode mode , QKnxStatusMode3::StatusFlags statusFlags ) | |
QKnxStatusMode3 () | |
bool | isSet (QKnxStatusMode3::Status status ) const |
QKnxStatusMode3::Mode | mode () const |
bool | removeStatus (QKnxStatusMode3::Status status ) |
bool | setMode (QKnxStatusMode3::Mode mode ) |
bool | setStatus (QKnxStatusMode3::Status status ) |
bool | setStatusFlags (QKnxStatusMode3::StatusFlags statusFlags ) |
QKnxStatusMode3::StatusFlags | statusFlags () const |
virtual bool | isValid () const override |
This datapoint type holds information about which
status
flags (from
A
to
E
) are set and which
mode
(from
Zero
to
2
) is active. Valid values are from
All set and Mode 0
to
All cleared and Mode 2
.
This is a fixed size datapoint type with the length of 1 byte.
另请参阅 QKnxDatapointType and Qt KNX Datapoint Type Classes .
This enum holds information about which mode is active.
常量 | 值 | 描述 |
---|---|---|
QKnxStatusMode3::Mode::Zero
|
0x01
|
Mode 0 is active. |
QKnxStatusMode3::Mode::One
|
0x02
|
Mode 1 is active. |
QKnxStatusMode3::Mode::Two
|
0x04
|
Mode 2 is active. |
QKnxStatusMode3::Mode::Unknown
|
0x08
|
It is not possible to determine which mode is active. |
This enum indicates whether a status flag is set (
0
) or cleared (
1
).
常量 | 值 | 描述 |
---|---|---|
QKnxStatusMode3::A
|
0x01
|
Status value A. |
QKnxStatusMode3::B
|
0x02
|
Status value B. |
QKnxStatusMode3::C
|
0x04
|
Status value C. |
QKnxStatusMode3::D
|
0x08
|
Status value D. |
QKnxStatusMode3::E
|
0x0a
|
Status value E. |
The StatusFlags type is a typedef for QFlags <Status>. It stores an OR combination of Status values.
Creates a fixed size datapoint type with the mode set to mode and the status flags set to statusFlags .
Creates a fixed size datapoint type with the mode set to
未知
and the status flags left empty.
返回
true
if the status flag
status
is set in the status flags.
[override virtual]
bool
QKnxStatusMode3::
isValid
() const
重实现: QKnxDatapointType::isValid () const.
Returns the mode stored in the datapoint type.
另请参阅 setMode ().
Removes the status status from the status flags.
返回
true
if the status was removed; otherwise returns
false
.
Sets the mode stored in the datapoint type to mode .
If the value is outside the allowed range, returns
false
and does not set the value.
另请参阅 mode ().
Sets the status status in the status flags.
返回
true
if the status was set; otherwise returns
false
.
设置 statusFlags stored in the datapoint type to statusFlags .
返回
true
if the value was set; otherwise returns
false
.
另请参阅 statusFlags ().
Returns the status flags stored in the datapoint type.
另请参阅 setStatusFlags ().