QKnx3BitControlled Class

The QKnx3BitControlled class is a datapoint type with a control part. More...

Header: #include <QKnx3BitControlled>
qmake: QT += knx
Inherits: QKnxFixedSizeDatapointType
Inherited By:

QKnxControlBlinds and QKnxControlDimming

Public Types

enum NumberOfIntervals { Break, One, Two, Four, Eight, …, ThirtyTwo }

Public Functions

QKnx3BitControlled(bool control, QKnx3BitControlled::NumberOfIntervals n)
QKnx3BitControlled()
bool controlBit() const
QKnx3BitControlled::NumberOfIntervals numberOfIntervals() const
void setControlBit(bool value)
bool setNumberOfIntervals(QKnx3BitControlled::NumberOfIntervals n)

Reimplemented Public Functions

virtual bool isValid() const override

Protected Functions

QKnx3BitControlled(int subType, bool control, QKnx3BitControlled::NumberOfIntervals n)

Detailed Description

This is a fixed size datapoint type with the length of 1 byte, though only 4 bits are used by the actual implementation.

Of the 4 bits, 3 bits are reserved for the step code and 1 bit for the control part. The step code allows for the calculation of the number of intervals, so that numberOfIntervals() equals 2^(step code -1).

To set this datapoint type, the control and the NumberOfIntervals have to be set.

See also QKnxDatapointType and Qt KNX Datapoint Type Classes.

Member Type Documentation

enum QKnx3BitControlled::NumberOfIntervals

This enum type holds the allowed number of intervals for the datapoint type.

ConstantValue
QKnx3BitControlled::Break0x00
QKnx3BitControlled::One0x01
QKnx3BitControlled::Two0x02
QKnx3BitControlled::Four0x04
QKnx3BitControlled::Eight0x08
QKnx3BitControlled::Sixteen0x10
QKnx3BitControlled::ThirtyTwo0x20

Member Function Documentation

[protected] QKnx3BitControlled::QKnx3BitControlled(int subType, bool control, QKnx3BitControlled::NumberOfIntervals n)

Creates a fixed size datapoint type with subtype subType, control control, and number of intervals n.

QKnx3BitControlled::QKnx3BitControlled(bool control, QKnx3BitControlled::NumberOfIntervals n)

Creates a fixed size datapoint type with the control control and the number of intervals n.

QKnx3BitControlled::QKnx3BitControlled()

Creates a fixed size datapoint type with the control part set to false and the number of intervals set to Break.

bool QKnx3BitControlled::controlBit() const

Returns the control stored in the datapoint type.

See also setControlBit().

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

Reimplements: QKnxDatapointType::isValid() const.

QKnx3BitControlled::NumberOfIntervals QKnx3BitControlled::numberOfIntervals() const

Returns the number of intervals stored in the datapoint type.

See also setNumberOfIntervals().

void QKnx3BitControlled::setControlBit(bool value)

Sets the control part of the datapoint type to value.

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

See also controlBit().

bool QKnx3BitControlled::setNumberOfIntervals(QKnx3BitControlled::NumberOfIntervals n)

Sets the number of intervals to n.

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

See also numberOfIntervals().

© 2023 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.