QKnx2ByteFloat Class

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

Header: #include <QKnx2ByteFloat>
qmake: QT += knx
Inherits: QKnxFixedSizeDatapointType

Public Functions

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

Reimplemented Public Functions

virtual bool isValid() const override

Protected Functions

QKnx2ByteFloat(int subType, float value)

Detailed Description

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:

ClassDescriptionRange
QKnxAirFlowAir flow in m3/h.-670760 - 670760
QKnxAirQualityAir quality in ppm.0 - 670760
QKnxAmountRainAmount of Rain in liters per square meter (l/m2).-671088.64 - 670760.96
QKnxCurrentCurrent in milliampere (mA).-670760 - 670760
QKnxHumidityHumidity as a percentage.0 - 670760
QKnxKelvinPerPercentKelvin per percent (K/Percent).-670760 - 670760
QKnxPowerPower in kilowatts (kW).-670760 - 670760
QKnxPowerDensityPower Density in watts per square meter (W/m2).-670760 - 670760
QKnxPressurePressure in Pascal (Pa).0 - 670760
QKnxTemperatureCelsiusTemperature in degrees Celsius.-273 - 670760
QKnxTemperatureChangeChange in temperature (K) per hour.-670760 - 670760
QKnxTemperatureFahrenheitTemperature in degrees Fahrenheit.-459.6 - 670760.96
QKnxTemperatureKelvinTemperature in degrees Kelvin.-670760 - 670760
QKnxTimeMilliSecondTime in milliseconds (ms).-670760 - 670760
QKnxTimeSecondTime in seconds.-670760 - 670760
QKnxValueLuxBrightness in LUX.0 - 670760
QKnxVoltageVoltage in milli-volts (mV).-670760 - 670760
QKnxVolumeFlowVolume flow in liters per hour (l/h).-670760 - 670760
QKnxWindSpeedWind speed in meters per second (m/s).0 - 670760
QKnxWindSpeedKmPerHourWind speed in kilometers per hour (km/h).0 - 670760.96
QKnxValueAbsoluteHumidityAbsolute air humidity in grams per cubic meter (g/m3).0 - 670760.96
QKnxConcentrationAir pollution in micrograms per cubic meter (micro-g/m3).0 - 670760.96

See also QKnxDatapointType and Qt KNX Datapoint Type Classes.

Member Function Documentation

[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

Reimplements: QKnxDatapointType::isValid() const.

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

See also value().

[virtual] float QKnx2ByteFloat::value() const

Returns the float stored in the datapoint type.

See also setValue().

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