QKnx3BitControlled Class

The QKnx3BitControlled class is a datapoint type with a control part. 更多...

头: #include <QKnx3BitControlled>
qmake: QT += knx
继承: QKnxFixedSizeDatapointType
继承者:

QKnxControlBlinds and QKnxControlDimming

公共类型

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

公共函数

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

重实现公共函数

virtual bool isValid () const override

保护函数

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

详细描述

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 () 等于 2^(step code -1) .

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

另请参阅 QKnxDatapointType and Qt KNX Datapoint Type Classes .

成员类型文档编制

enum QKnx3BitControlled:: NumberOfIntervals

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

常量
QKnx3BitControlled::Break 0x00
QKnx3BitControlled::One 0x01
QKnx3BitControlled::Two 0x02
QKnx3BitControlled::Four 0x04
QKnx3BitControlled::Eight 0x08
QKnx3BitControlled::Sixteen 0x10
QKnx3BitControlled::ThirtyTwo 0x20

成员函数文档编制

[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.

另请参阅 setControlBit ().

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

重实现: QKnxDatapointType::isValid () const.

QKnx3BitControlled::NumberOfIntervals QKnx3BitControlled:: numberOfIntervals () const

Returns the number of intervals stored in the datapoint type.

另请参阅 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.

另请参阅 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.

另请参阅 numberOfIntervals ().