QKnxStatusMode3 Class
The QKnxStatusMode3 class is a datapoint type for a status mode 3. More...
Header: | #include <QKnxStatusMode3> |
qmake: | QT += knx |
Inherits: | QKnxFixedSizeDatapointType |
Public Types
enum class | Mode { Zero, One, Two, Unknown } |
enum | Status { A, B, C, D, E } |
flags | StatusFlags |
Public Functions
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 |
Reimplemented Public Functions
virtual bool | isValid() const override |
Detailed Description
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.
See also QKnxDatapointType and Qt KNX Datapoint Type Classes.
Member Type Documentation
enum class QKnxStatusMode3::Mode
This enum holds information about which mode is active.
Constant | Value | Description |
---|---|---|
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. |
enum QKnxStatusMode3::Status
flags QKnxStatusMode3::StatusFlags
This enum indicates whether a status flag is set (0
) or cleared (1
).
Constant | Value | Description |
---|---|---|
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.
Member Function Documentation
QKnxStatusMode3::QKnxStatusMode3(QKnxStatusMode3::Mode mode, QKnxStatusMode3::StatusFlags statusFlags)
Creates a fixed size datapoint type with the mode set to mode and the status flags set to statusFlags.
QKnxStatusMode3::QKnxStatusMode3()
Creates a fixed size datapoint type with the mode set to Unknown
and the status flags left empty.
bool QKnxStatusMode3::isSet(QKnxStatusMode3::Status status) const
Returns true
if the status flag status is set in the status flags.
[override virtual]
bool QKnxStatusMode3::isValid() const
Reimplements: QKnxDatapointType::isValid() const.
QKnxStatusMode3::Mode QKnxStatusMode3::mode() const
Returns the mode stored in the datapoint type.
See also setMode().
bool QKnxStatusMode3::removeStatus(QKnxStatusMode3::Status status)
Removes the status status from the status flags.
Returns true
if the status was removed; otherwise returns false
.
bool QKnxStatusMode3::setMode(QKnxStatusMode3::Mode mode)
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.
See also mode().
bool QKnxStatusMode3::setStatus(QKnxStatusMode3::Status status)
Sets the status status in the status flags.
Returns true
if the status was set; otherwise returns false
.
bool QKnxStatusMode3::setStatusFlags(QKnxStatusMode3::StatusFlags statusFlags)
Sets the statusFlags stored in the datapoint type to statusFlags.
Returns true
if the value was set; otherwise returns false
.
See also statusFlags().
QKnxStatusMode3::StatusFlags QKnxStatusMode3::statusFlags() const
Returns the status flags stored in the datapoint type.
See also setStatusFlags().
© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.