QKnx2ByteFloat Class

The QKnx2ByteFloat class is a datapoint type for a 2-byte float value. 更多...

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

公共函数

QKnx2ByteFloat (float value )
QKnx2ByteFloat ()
virtual bool setValue (float value )
virtual float value () const

重实现公共函数

virtual bool isValid () const override

保护函数

QKnx2ByteFloat (int subType , float value )

详细描述

This is a fixed size datapoint type with the length of 2 bytes. It is a base class for datapoint types for temperature, brightness in LUX, and wind speed, as well as air pressure, humidity, quality, and flow, for example.

The range for the value of this datapoint type is from -671 088.64 to 670 760.96 .

The float is encoded as (0.01*M)*2^E where E and M are encoded as follows in the 2 bytes:

MEEEEMMM  MMMMMMMM
					

This class is a base class for the following datapoint types:

描述 Range
QKnxAirFlow Air flow in m3/h. -670760 - 670760
QKnxAirQuality Air quality in ppm. 0 - 670760
QKnxAmountRain Amount of Rain in liters per square meter (l/m2). -671088.64 - 670760.96
QKnxCurrent Current in milliampere (mA). -670760 - 670760
QKnxHumidity Humidity as a percentage. 0 - 670760
QKnxKelvinPerPercent Kelvin per percent (K/Percent). -670760 - 670760
QKnxPower Power in kilowatts (kW). -670760 - 670760
QKnxPowerDensity Power Density in watts per square meter (W/m2). -670760 - 670760
QKnxPressure Pressure in Pascal (Pa). 0 - 670760
QKnxTemperatureCelsius Temperature in degrees Celsius. -273 - 670760
QKnxTemperatureChange Change in temperature (K) per hour. -670760 - 670760
QKnxTemperatureFahrenheit Temperature in degrees Fahrenheit. -459.6 - 670760.96
QKnxTemperatureKelvin Temperature in degrees Kelvin. -670760 - 670760
QKnxTimeMilliSecond Time in milliseconds (ms). -670760 - 670760
QKnxTimeSecond Time in seconds. -670760 - 670760
QKnxValueLux Brightness in LUX. 0 - 670760
QKnxVoltage Voltage in milli-volts (mV). -670760 - 670760
QKnxVolumeFlow Volume flow in liters per hour (l/h). -670760 - 670760
QKnxWindSpeed Wind speed in meters per second (m/s). 0 - 670760
QKnxWindSpeedKmPerHour Wind speed in kilometers per hour (km/h). 0 - 670760.96
QKnxValueAbsoluteHumidity Absolute air humidity in grams per cubic meter (g/m3). 0 - 670760.96
QKnxConcentration Air pollution in micrograms per cubic meter (micro-g/m3). 0 - 670760.96

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

成员函数文档编制

[protected] QKnx2ByteFloat:: QKnx2ByteFloat ( int subType , float value )

Creates a fixed size datapoint type with the subtype subType and float value .

QKnx2ByteFloat:: QKnx2ByteFloat ( float value )

Creates a fixed size datapoint type with the float value .

QKnx2ByteFloat:: QKnx2ByteFloat ()

Creates a fixed size datapoint type.

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

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

[虚拟] bool QKnx2ByteFloat:: setValue ( float value )

Sets the float of the datapoint type to value .

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

另请参阅 value ().

[虚拟] float QKnx2ByteFloat:: value () const

Returns the float stored in the datapoint type.

另请参阅 setValue ().