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:
Class | Description | 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 |
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.