QKnxDatapointType Class

The QKnxDatapointType class is a base class for datapoint types with specific properties. More...

Header: #include <QKnxDatapointType>
qmake: QT += knx
Inherited By:

QKnxFixedSizeDatapointType and QKnxVariableSizeDatapointType

Public Types

enum Type { Unknown, Dpt1_1Bit, DptSwitch, DptBool, ..., DptColourRGB }

Public Functions

QKnxDatapointType(QKnxDatapointType::Type type, int size)
QKnxDatapointType(const QString &dptId, int size)
QKnxDatapointType(quint16 mainType, quint16 subType, int size)
QKnxDatapointType(const QKnxDatapointType &other)
QKnxDatapointType(QKnxDatapointType &&other)
virtual ~QKnxDatapointType()
quint8 byte(quint16 index) const
QKnxByteArray bytes() const
double coefficient() const
const quint8 *constData() const
QString description() const
virtual bool isValid() const
int mainType() const
QVariant maximum() const
QString maximumText() const
QVariant minimum() const
QString minimumText() const
bool setByte(quint16 index, quint8 bytes)
virtual bool setBytes(const QKnxByteArray &bytesToSet, quint16 index, quint16 count)
void setCoefficient(double coef)
void setDescription(const QString &description)
void setMaximum(const QVariant &maximum)
void setMaximumText(const QString &maximumText)
void setMinimum(const QVariant &minimum)
void setMinimumText(const QString &minimumText)
void setRange(const QVariant &minimum, const QVariant &maximum)
void setRangeText(const QString &minimumText, const QString &maximumText)
void setUnit(const QString &unit)
int size() const
int subType() const
void swap(QKnxDatapointType &other)
QKnxDatapointType::Type type() const
QString unit() const
bool operator!=(const QKnxDatapointType &other) const
QKnxDatapointType &operator=(const QKnxDatapointType &other)
QKnxDatapointType &operator=(QKnxDatapointType &&other)
bool operator==(const QKnxDatapointType &other) const

Static Public Members

T setBit(T byteToSet, bool value, quint8 bit)
bool testBit(T byteToTest, quint8 bit)
QKnxDatapointType::Type toType(const QString &dpt)
QDebug operator<<(QDebug debug, const QKnxDatapointType &dpt)

Detailed Description

The QKnxDatapointType class is a base class for datapoint types with specific properties.

A datapoint type represents the data corresponding to a KNX device functionality. It describes the data, setting the rules about the format and values to be allowed, and it holds the bytes containing the data.

This data is used in the data part of the QKnxTpdu class. To retrieve the data of a datapoint type, call bytes().

There are two types of a QKnxDatapointType: QKnxFixedSizeDatapointType for fixed length datapoint types and QKnxVariableSizeDatapointType for variable length datapoint types.

A datapoint type is identified by its main number and a sub number. Each main number corresponds to a datapoint type with a particular structure. The sub numbers correspond to different interpretations or naming of this structure.

The Qt KNX module provides a class for each datapoint type with the main number less than 30 and sub number less than 100. All datapoint types with the same main number inherit from a datapoint type class representing the main number datapoint type characteristics.

Adding Datapoint Types

To implement a datapoint type described in the KNX documentation but not implemented in the Qt KNX module, one can create a class inheriting from QKnxFixedSizeDatapointType or QKnxVariableSizeDatapointType and register this new class using an instance of QKnxDatapointTypeFactory:

#include mynewdatapointtype.h

int main()
{
    int mainType = 65535;
    int subType = 100;
    int typeSize = 1; // size in bytes

    auto &factory = QKnxDatapointTypeFactory::instance() ;
    factory.registerType<MyNewDataPointType>(mainType, subType, typeSize);
}

See also Qt KNX Datapoint Type Classes.

Member Type Documentation

enum QKnxDatapointType::Type

This enum type holds the type of the datapoint type.

ConstantValueDescription
QKnxDatapointType::Unknown0An unknown datapoint type.
QKnxDatapointType::Dpt1_1Bit100000A fixed size datapoint type with the length of 1 bit. This is a boolean datapoint type, such as: switch on or off, move up or down, open and close, stop and start.
QKnxDatapointType::DptSwitch100001Stores the switch state: Off or On.
QKnxDatapointType::DptBool100002Stores a boolean value: False or True.
QKnxDatapointType::DptEnable100003Stores an action: Disable or Enable.
QKnxDatapointType::DptRamp100004Stores ramp information: NoRamp or Ramp.
QKnxDatapointType::DptAlarm100005Stores alarm information: Alarm or NoAlarm.
QKnxDatapointType::DptBinaryValue100006Stores a binary value: Low or High.
QKnxDatapointType::DptStep100007Stores stepping information: Decrease or Increase.
QKnxDatapointType::DptUpDown100008Stores direction: Up or Down.
QKnxDatapointType::DptOpenClose100009Stores action: Open or Close.
QKnxDatapointType::DptStart100010Stores action: Stop or Start.
QKnxDatapointType::DptState100011Stores state: Inactive or Active.
QKnxDatapointType::DptInvert100012Stores state: Not inverted or Inverted.
QKnxDatapointType::DptDimSendStyle100013Stores dimming send style. Possible values are Start/Stop or Cyclically.
QKnxDatapointType::DptInputSource100014Stores input source: Fixed or Calculated.
QKnxDatapointType::DptReset100015Stores reset action: No action (dummy) or Reset command (trigger).
QKnxDatapointType::DptAck100016Stores the acknowledge command (trigger) for alarms, for example. Possible values are Acknowledge or No action (dummy)
QKnxDatapointType::DptTrigger100017Stores trigger action: Trigger or Trigger (also).
QKnxDatapointType::DptOccupancy100018Stores occupancy state: Not occupied or Occupied.
QKnxDatapointType::DptWindowDoor100019Stores window or door state: Closed or Open.
QKnxDatapointType::DptLogicalFunction100021Stores the logical function OR or AND.
QKnxDatapointType::DptSceneAB100022Stores the scene: Scene A or Scene B.
QKnxDatapointType::DptShutterBlindsMode100023Stores the shutter or blinds mode: Only move Up/Down mode (shutter) or Move up down + StepStop mode (blind).
QKnxDatapointType::DptHeatCool100100Stores the heating mode: Cooling or Heating.
QKnxDatapointType::Dpt2_1BitControlled200000A fixed size datapoint type with the length of 2 bits. This is a a boolean datapoint type with a control part.
QKnxDatapointType::DptSwitchControl200001Stores a switch with a control part.
QKnxDatapointType::DptBoolControl200002Stores a boolean value with a control part.
QKnxDatapointType::DptEnableControl200003Stores the enabled state with a control part.
QKnxDatapointType::DptRampControl200004Stores the ramp state with a control part.
QKnxDatapointType::DptAlarmControl200005Stores alarm information with a control part.
QKnxDatapointType::DptBinaryValueControl200006Stores a binary value with a control part.
QKnxDatapointType::DptStepControl200007Stores stepping information with a control part.
QKnxDatapointType::DptDirection1Control200008Stores DptUpDown with a control part.
QKnxDatapointType::DptDirection2Control200009Stores DptOpenClose with a control part.
QKnxDatapointType::DptStartControl200010Stores a start action with a control part.
QKnxDatapointType::DptStateControl200011Stores state with a control part.
QKnxDatapointType::DptInvertControl200012Stores inverted state with a control part.
QKnxDatapointType::Dpt3_3BitControlled300000A fixed size datapoint type with the length of 3 bits.
QKnxDatapointType::DptControlDimming300007Increases or decreases the brightness of lights.
QKnxDatapointType::DptControlBlinds300008Moves blinds up or down.
QKnxDatapointType::Dpt4_Character400000A fixed size datapoint type with the length of 1 byte that encodes a character.
QKnxDatapointType::DptCharAscii400001Encodes an ASCII character.
QKnxDatapointType::DptChar88591400002Encodes an ISO 8859-1 character.
QKnxDatapointType::Dpt5_8bitUnsigned500000A fixed size datapoint type with an 8-bit unsigned value.
QKnxDatapointType::DptScaling500001Stores percentage from 0 to 100.
QKnxDatapointType::DptAngle500003Stores the angle in degrees from 0 to 360.
QKnxDatapointType::DptPercentU8500004Stores percentage from 0 to 255.
QKnxDatapointType::DptDecimalFactor500005Stores the ratio from 0 to 255.
QKnxDatapointType::DptTariff500006Stores the tariff from 0 to 254.
QKnxDatapointType::DptValue1Ucount500010Stores counter pulses from 0 to 255.
QKnxDatapointType::Dpt6_8bitSigned600000A fixed size datapoint type with an 8-bit signed value.
QKnxDatapointType::DptPercentV8600001Stores percentage from -128% to 127%.
QKnxDatapointType::DptValue1Count600010Stores counter pulses from -128 to 127.
QKnxDatapointType::DptStatusMode3600020Stores status mode 3.
QKnxDatapointType::Dpt7_2ByteUnsigned700000A fixed size datapoint type with a 2-byte unsigned value.
QKnxDatapointType::DptValue2UCount700001Stores pulses.
QKnxDatapointType::DptTimePeriodMsec700002Stores the time in milliseconds.
QKnxDatapointType::DptTimePeriod10Msec700003Stores the time in multiples of 10 milliseconds.
QKnxDatapointType::DptTimePeriod100Msec700004Stores the time in multiples of 100 milliseconds.
QKnxDatapointType::DptTimePeriodSec700005Stores the time in seconds.
QKnxDatapointType::DptTimePeriodMin700006Stores the time in minutes.
QKnxDatapointType::DptTimePeriodHrs700007Stores the time in hours.
QKnxDatapointType::DptPropertyDataType700010Stores the Identifier Interface Object Property data type (no unit).
QKnxDatapointType::DptLengthMilliMeter700011Stores the length in millimeters.
QKnxDatapointType::DptUEICurrentMilliA700012Stores the current in milliampere.
QKnxDatapointType::DptBrightness700013Stores the brightness in LUX.
QKnxDatapointType::Dpt8_2ByteSigned800000A fixed size datapoint type with a 2-byte signed value.
QKnxDatapointType::DptValue2Count800001Stores pulse difference.
QKnxDatapointType::DptDeltaTimeMsec800002Stores time lag in milliseconds.
QKnxDatapointType::DptDeltaTime10Msec800003Stores time lag in multiples of 10 milliseconds.
QKnxDatapointType::DptDeltaTime100Msec800004Stores time lag in multiples of 100 milliseconds.
QKnxDatapointType::DptDeltaTimeSec800005Stores time lag in seconds.
QKnxDatapointType::DptDeltaTimeMin800006Stores time lag in minutes.
QKnxDatapointType::DptDeltaTimeHrs800007Stores time lag in hours.
QKnxDatapointType::DptPercentV16800010Stores percentage difference.
QKnxDatapointType::DptRotationAngle800011Stores rotation angle in degrees.
QKnxDatapointType::Dpt9_2ByteFloat900000A fixed size datapoint type with a 2-byte float value.
QKnxDatapointType::DptTemperatureCelsius900001Stores the temperature in degrees Celsius.
QKnxDatapointType::DptTemperatureKelvin900002Stores the temperature in degrees Kelvin.
QKnxDatapointType::DptTemperatureChange900003Stores the change in temperature in (K) per hour.
QKnxDatapointType::DptValueLux900004Stores brightness in LUX.
QKnxDatapointType::DptWindSpeed900005Stores the wind speed in meters per second (m/s).
QKnxDatapointType::DptPressure900006Stores the pressure in Pascal (Pa).
QKnxDatapointType::DptHumidity900007Stores the humidity as a percentage.
QKnxDatapointType::DptAirQuality900008Stores the air quality in ppm.
QKnxDatapointType::DptAirFlow900009Stores the air flow in m3/h.
QKnxDatapointType::DptTimeSecond900010Stores the time in seconds (s).
QKnxDatapointType::DptTimeMilliSecond900011Stores the time in milliseconds (ms).
QKnxDatapointType::DptVoltage900020Stores the voltage in milli-volts (mV).
QKnxDatapointType::DptCurrent900021Stores the current in milliampere (mA).
QKnxDatapointType::DptPowerDensity900022Stores the power density in watts per square meter (W/m2).
QKnxDatapointType::DptKelvinPerPercent900023Stores the Kelvin per percent (K/Percent).
QKnxDatapointType::DptPower900024Stores the power in kilowatts (kW).
QKnxDatapointType::DptVolumeFlow900025Stores the volume flow in liters per hour (l/h).
QKnxDatapointType::DptAmountRain900026Stores the amount of rain in liters per square meter (l/m2).
QKnxDatapointType::DptTemperatureFahrenheit900027Stores the temperature in degrees Fahrenheit.
QKnxDatapointType::DptWindSpeedKmPerHour900028Stores the wind speed in kilometers per hour (km/h).
QKnxDatapointType::DptValueAbsoluteHumidity900029Absolute air humidity in grams per cubic meter (g/m3).
QKnxDatapointType::DptConcentration900030Air pollution in micrograms per cubic meter (micro-g/m3).
QKnxDatapointType::Dpt10_TimeOfDay1000000A fixed size datapoint type with the length of 3 bytes.
QKnxDatapointType::DptTimeOfDay1000001Stores the time of day.
QKnxDatapointType::Dpt11_Date1100000A fixed size datapoint type with the length of 3 bytes.
QKnxDatapointType::DptDate1100001Stores a date.
QKnxDatapointType::Dpt12_4ByteUnsigned1200000A fixed size datapoint type with a 4-byte unsigned value.
QKnxDatapointType::DptValue4Ucount1200001Stores a a 4-byte unsigned value.
QKnxDatapointType::Dpt13_4ByteSigned1300000A fixed size datapoint type with a 4-byte signed value.
QKnxDatapointType::DptValue4Count1300001Stores a a 4-byte signed value.
QKnxDatapointType::DptFlowRateCubicMeterPerHour1300002Stores the flow rate in cubic meters per hour (m3/h).
QKnxDatapointType::DptApparentEnergy1300011Stores the active energy in VAh.
QKnxDatapointType::DptReactiveEnergy1300012Stores the active energy in VARh.
QKnxDatapointType::DptActiveEnergykWh1300013Stores the active energy in kWh.
QKnxDatapointType::Dpt_ApparentEnergykVAh1300014Stores the active energy in kVAh.
QKnxDatapointType::DptReactiveEnergykVARh1300015Stores the active energy in KVARh.
QKnxDatapointType::DptActiveEnergy1300010Stores the active energy in Wh.
QKnxDatapointType::DptLongDeltaTimeSec1300100Stores the active energy in seconds.
QKnxDatapointType::Dpt14_4ByteFloat1400000A fixed size datapoint type with a 4-byte float value.
QKnxDatapointType::DptValueAccelerationAngular1400001Stores angular acceleration in rad/s2.
QKnxDatapointType::DptValueActivationEnergy1400002Stores activation energy in J/mol.
QKnxDatapointType::DptValueActivity1400003Stores radioactive activity in 1/s.
QKnxDatapointType::DptValueMol1400004Stores the amount of substance in mol.
QKnxDatapointType::DptValueAmplitude1400005Stores the amplitude.
QKnxDatapointType::DptValueAngleRad1400006Stores the angle in radian.
QKnxDatapointType::DptValueAngleDeg1400007Stores the angle in degrees.
QKnxDatapointType::DptValueAngularMomentum1400008Stores the angular momentum in Js.
QKnxDatapointType::DptValueAngularVelocity1400009Stores the angular velocity in rad/s.
QKnxDatapointType::DptValueArea1400010Stores the area in m2.
QKnxDatapointType::DptValueCapacitance1400011Stores the capacitance in F.
QKnxDatapointType::DptValueChargeDensitySurface1400012Stores the flux density in C/m2.
QKnxDatapointType::DptValueChargeDensityVolume1400013Stores the charge density in C/m3.
QKnxDatapointType::DptValueCompressibility1400014Stores the compressibility in m2/N.
QKnxDatapointType::DptValueConductance1400015Stores the conductance in S.
QKnxDatapointType::DptValueElectricalConductivity1400016Stores the conductivity in S/m.
QKnxDatapointType::DptValueDensity1400017Stores the density in kg/m3.
QKnxDatapointType::DptValueElectricCharge1400018Stores the electric charge in C.
QKnxDatapointType::DptValueElectricCurrent1400019Stores the electric charge in A.
QKnxDatapointType::DptValueElectricCurrentDensity1400020Stores the electric current density in A/m2.
QKnxDatapointType::DptValueElectricDipoleMoment1400021Stores the electric dipole moment in Cm.
QKnxDatapointType::DptValueElectricDisplacement1400022Stores the electric displacement in C/m2.
QKnxDatapointType::DptValueElectricFieldStrength1400023Stores the electric field strength in V/m.
QKnxDatapointType::DptValueElectricFlux1400024Stores the electric flux in C.
QKnxDatapointType::DptValueElectricFluxDensity1400025Stores the electric flux density in C/m2.
QKnxDatapointType::DptValueElectricPolarization1400026Stores the electric polarization in C/m2.
QKnxDatapointType::DptValueElectricPotential1400027Stores the electric potential in V.
QKnxDatapointType::DptValueElectricPotentialDifference1400028Stores the electric potential difference in V.
QKnxDatapointType::DptValueElectromagneticMoment1400029Stores the electromagnetic moment in Am2.
QKnxDatapointType::DptValueElectromotiveForce1400030Stores the electromotive force in V.
QKnxDatapointType::DptValueEnergy1400031Stores energy in J.
QKnxDatapointType::DptValueForce1400032Stores force in N.
QKnxDatapointType::DptValueFrequency1400033Stores frequency in Hz.
QKnxDatapointType::DptValueAngularFrequency1400034Stores angular frequency in rad/s.
QKnxDatapointType::DptValueHeatCapacity1400035Stores heat capacity in J/K.
QKnxDatapointType::DptValueHeatFlowRate1400036Stores heat flow rate in W.
QKnxDatapointType::DptValueHeatQuantity1400037Stores heat quantity in J.
QKnxDatapointType::DptValueImpedance1400038Stores impedance in Ohm.
QKnxDatapointType::DptValueLength1400039Stores length in m.
QKnxDatapointType::DptValueLightQuantity1400040Stores light quantity in J.
QKnxDatapointType::DptValueLuminance1400041Stores luminance in cd/m2.
QKnxDatapointType::DptValueLuminousFlux1400042Stores luminous flux in lm.
QKnxDatapointType::DptValueLuminousIntensity1400043Stores luminous intensity in cd.
QKnxDatapointType::DptValueMagneticFieldStrength1400044Stores magnetic field strength in A/m.
QKnxDatapointType::DptValueMagneticFlux1400045Stores magnetic flux in Wb.
QKnxDatapointType::DptValueMagneticFluxDensity1400046Stores magnetic flux density in T.
QKnxDatapointType::DptValueMagneticMoment1400047Stores magnetic moment in Am2.
QKnxDatapointType::DptValueMagneticPolarization1400048Stores magnetic polarization in T.
QKnxDatapointType::DptValueMagnetization1400049Stores magnetization in A/m.
QKnxDatapointType::DptValueMagnetomotiveForce1400050Stores the magnetomotive force in A.
QKnxDatapointType::DptValueMass1400051Stores the mass in kg.
QKnxDatapointType::DptValueMassFlux1400052Stores the mass flux in kg.
QKnxDatapointType::DptValueMomentum1400053Stores the momentum in N/s.
QKnxDatapointType::DptValuePhaseAngleRad1400054Stores the phase angle in radian.
QKnxDatapointType::DptValuePhaseAngleDeg1400055Stores the phase angle in degrees.
QKnxDatapointType::DptValuePower1400056Stores the power in W.
QKnxDatapointType::DptValuePowerFactor1400057Stores the power factor in cos Phi.
QKnxDatapointType::DptValuePressure1400058Stores the pressure in Pa.
QKnxDatapointType::DptValueReactance1400059Stores the reactance in Ohm.
QKnxDatapointType::DptValueResistance1400060Stores the resistance in Ohm.
QKnxDatapointType::DptValueResistivity1400061Stores the resistivity in Ohm*m.
QKnxDatapointType::DptValueSelfInductance1400062Stores the self inductance in H.
QKnxDatapointType::DptValueSolidAngle1400063Stores the solid angle in sr.
QKnxDatapointType::DptValueSoundIntensity1400064Stores the sound intensity in W/m2.
QKnxDatapointType::DptValueSpeed1400065Stores the speed in m/s.
QKnxDatapointType::DptValueStress1400066Stores the stress in Pa.
QKnxDatapointType::DptValueSurfaceTension1400067Stores the surface tension in N/m.
QKnxDatapointType::DptValueCommonTemperature1400068Stores the temperature in degrees Celsius.
QKnxDatapointType::DptValueAbsoluteTemperature1400069Stores the absolute temperature in K.
QKnxDatapointType::DptValueTemperatureDifference1400070Stores the temperature difference in K.
QKnxDatapointType::DptValueThermalCapacity1400071Stores the thermal capacity in J/K.
QKnxDatapointType::DptValueThermalConductivity1400072Stores the thermal conductivity in W/mk.
QKnxDatapointType::DptValueThermoelectricPower1400073Stores the thermoelectric power in V/K.
QKnxDatapointType::DptValueTime1400074Stores the time in seconds.
QKnxDatapointType::DptValueTorque1400075Stores the torque in Nm.
QKnxDatapointType::DptValueVolume1400076Stores the volume in m3.
QKnxDatapointType::DptValueVolumeFlux1400077Stores the volume flux in m3/s.
QKnxDatapointType::DptValueWeight1400078Stores the weight in N.
QKnxDatapointType::DptValueWork1400079Stores the work in J.
QKnxDatapointType::DptValueAcceleration1400000Stores the acceleration in m/s2.
QKnxDatapointType::Dpt15_EntranceAccess1500000A fixed size datapoint type for controlling entrance access.
QKnxDatapointType::Dpt16_CharacterString1600000A fixed size datapoint type that encodes a string.
QKnxDatapointType::DptStringASCII1600000Encodes a string of ASCII characters.
QKnxDatapointType::DptString885911600001Encodes a string of ISO 8859-1 characters.
QKnxDatapointType::Dpt17_SceneNumber1700000A fixed size datapoint type with the length of 1 byte.
QKnxDatapointType::DptSceneNumber1700001Stores a scene number.
QKnxDatapointType::Dpt18_SceneControl1800000A fixed size datapoint type with the length of 1 byte.
QKnxDatapointType::DptSceneControl1800001Stores a scene control.
QKnxDatapointType::Dpt19_DataTime1900000A fixed size datapoint type with the length of 8 bytes.
QKnxDatapointType::DptDateTime1900001Stores the date and time.
QKnxDatapointType::Dpt20_1Byte2000000A fixed size datapoint type with the length of 1 byte.
QKnxDatapointType::DptScloMode2000001Stores the main functionality of the system clock (SCLO).
QKnxDatapointType::DptBuildingMode2000002Stores whether the building is in use and whether it is protected.
QKnxDatapointType::DptOccMode2000003Stores the occupy mode.
QKnxDatapointType::DptPriority2000004Stores the priority.
QKnxDatapointType::DptLightApplicationMode2000005Stores the light application mode.
QKnxDatapointType::DptApplicationArea2000006Stores the application area.
QKnxDatapointType::DptAlarmClassType2000007Stores the alarm class type.
QKnxDatapointType::DptPsuMode2000008Stores the bus power supply unit mode: decentral (distributed) bus power supply unit (DPSU) or central bus power supply unit (PSU).
QKnxDatapointType::DptErrorClassSystem2000011Stores fault signals transmitted in the application area QKnxApplicationArea::SystemFunctionCommonInterest.
QKnxDatapointType::DptErrorClassHvac2000012Stores fault signals transmitted in the heating, ventilation, and air conditioning (HVAC) application area.
QKnxDatapointType::DptTimeDelay2000013Stores a time delay.
QKnxDatapointType::DptBeaufortWindForceScale2000014Stores the wind force using the Beaufort wind force scale.
QKnxDatapointType::DptSensorSelect2000017Stores the sensor mode.
QKnxDatapointType::DptActuatorConnectType2000020Stores the actuator connection type. An actuator can be connected to a sensor or a controller.
QKnxDatapointType::DptCloudCover2000021Stores the scale of the sky obscured by clouds when observed from a particular location.
QKnxDatapointType::DptCommandMode2001000 
QKnxDatapointType::DptAdditionalInfoTypes2001001 
QKnxDatapointType::Dpt21_8BitSet2100000A fixed size datapoint type with binary-coded values in all fields.
QKnxDatapointType::DptGeneralStatus2100001Stores general status: out of service, fault, overridden, or in alarm.
QKnxDatapointType::DptDeviceControl2100002Stores device control state.
QKnxDatapointType::Dpt22_16BitSet2200000A fixed size datapoint type with the length of 16 bits.
QKnxDatapointType::DptMedia2201000Stores the supported media: TP1, PL110, RF, or KNX IP.
QKnxDatapointType::Dpt23_2BitSet2300000A fixed size datapoint type with the length of 2 bits.
QKnxDatapointType::DptOnOffAction2300001Stores the on/off action.
QKnxDatapointType::DptAlarmReaction2300002Stores the alarm reaction.
QKnxDatapointType::DptUpDownAction2300003Stores the up/down action.
QKnxDatapointType::Dpt24_VariableString2400000A datapoint type that encodes a variable length string.
QKnxDatapointType::DptVariableString885912400001Encodes a variable length string of ISO 8859-1 characters.
QKnxDatapointType::Dpt25_2NibbleSet2500000A fixed size datapoint type for storing the number of busy and inack repetitions.
QKnxDatapointType::Dpt26_8BitSet2600000A fixed size datapoint type with the length of 1 byte and the 8-bit set.
QKnxDatapointType::DptSceneInfo2600001Stores scene information.
QKnxDatapointType::Dpt27_32BitSet2700000A fixed size datapoint type with the 32-bit set.
QKnxDatapointType::DptCombinedInfoOnOff2700001Stores combined information about the on and off states of a multiple-channel binary actuator.
QKnxDatapointType::Dpt28_StringUtf82800000A variable size datapoint type datapoint type for storing a UTF-8 string.
QKnxDatapointType::DptUtf82800001Stores a UTF-8 (Unicode Transformation Format-8) string.
QKnxDatapointType::Dpt29_ElectricalEnergy2900000A fixed size datapoint type with the length of 8 bytes for storing electrical energy.
QKnxDatapointType::DptActiveEnergyV642900010Stores active energy in Wh.
QKnxDatapointType::DptApparentEnergyV642900011Stores active energy in VAh.
QKnxDatapointType::DptReactiveEnergyV642900012Stores active energy in VARh.
QKnxDatapointType::Dpt30_24TimesChannelActivation3000000A fixed size datapoint type for storing the activation state of a channel.
QKnxDatapointType::DPT217_DatapointTypeVersion21700000A fixed size datapoint type for storing version information.
QKnxDatapointType::DptVersion21700001Stores version information, such as software version, hardware version, or data-interface version.
QKnxDatapointType::Dpt22122100000A fixed size datapoint type for storing the serial number of a device.
QKnxDatapointType::DptSerialNumber22100001Stores a manufacturer code and an incremented number. The leading 4 octets within a manufacturer’s code space must be globally unique.
QKnxDatapointType::Dpt225_ScalingSpeed22500000A fixed size datapoint type for storing scaling speed. Used in the lighting application area, only.
QKnxDatapointType::Dpt232_3ByteColourRGB23200000A fixed size datapoint type for storing an RGB color value.
QKnxDatapointType::DptColourRGB23200600Stores an RGB color value. Can be used for simple color control. How RGB is interpreted depends on the device, and therefore this coding is only suitable for point-to-point communication, where there is only a single receiver.

Member Function Documentation

QKnxDatapointType::QKnxDatapointType(QKnxDatapointType::Type type, int size)

Creates a datapoint type with the type type and size size.

QKnxDatapointType::QKnxDatapointType(const QString &dptId, int size)

Creates a datapoint type with the identifier dptId and size size.

QKnxDatapointType::QKnxDatapointType(quint16 mainType, quint16 subType, int size)

Creates a datapoint type with the main type mainType, subtype subType, and size size.

QKnxDatapointType::QKnxDatapointType(const QKnxDatapointType &other)

Constructs a copy of other.

QKnxDatapointType::QKnxDatapointType(QKnxDatapointType &&other)

Move-constructs an object instance, making it point to the same object that other was pointing to.

[virtual] QKnxDatapointType::~QKnxDatapointType()

Deletes the datapoint type.

quint8 QKnxDatapointType::byte(quint16 index) const

Returns the content of the byte at the index index.

See also setByte().

QKnxByteArray QKnxDatapointType::bytes() const

Returns the content of the bytes stored in the datapoint type.

See also setBytes().

double QKnxDatapointType::coefficient() const

Returns the coefficient of the datapoint type.

See also setCoefficient().

const quint8 *QKnxDatapointType::constData() const

Returns the data stored in the datapoint type.

QString QKnxDatapointType::description() const

Returns a description of the datapoint type.

See also setDescription().

[virtual] bool QKnxDatapointType::isValid() const

Returns true if this is a valid datapoint type; otherwise returns false.

int QKnxDatapointType::mainType() const

Returns the main type of the datapoint type.

QVariant QKnxDatapointType::maximum() const

Returns the maximum value of the datapoint type.

See also setMaximum().

QString QKnxDatapointType::maximumText() const

Returns a description of the maximum value of the datapoint type.

See also setMaximumText().

QVariant QKnxDatapointType::minimum() const

Returns the minimum value of the datapoint type.

See also setMinimum().

QString QKnxDatapointType::minimumText() const

Returns a description of the minimum value of the datapoint type.

See also setMinimumText().

[static] T QKnxDatapointType::setBit(T byteToSet, bool value, quint8 bit)

Sets the value of the bit in byteToSet to value.

Returns true if the value was set; otherwise returns false.

bool QKnxDatapointType::setByte(quint16 index, quint8 bytes)

Sets the content of the byte at the index index to bytes.

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

See also byte().

[virtual] bool QKnxDatapointType::setBytes(const QKnxByteArray &bytesToSet, quint16 index, quint16 count)

Sets the content of the bytes stored in the datapoint type to bytesToSet, from the position index in bytesToSet to the position calculated by adding count to index.

For a fixed size datapoint, returns false if count does not correspond to the size of the datapoint type returned by size().

See also bytes().

void QKnxDatapointType::setCoefficient(double coef)

Sets the coefficient of the datapoint type to coef.

See also coefficient().

void QKnxDatapointType::setDescription(const QString &description)

Sets the description of the datapoint type to description.

See also description().

void QKnxDatapointType::setMaximum(const QVariant &maximum)

Sets the maximum value of the datapoint type to maximum.

See also maximum().

void QKnxDatapointType::setMaximumText(const QString &maximumText)

Sets the description of the maximum value of the datapoint type to maximumText.

See also maximumText().

void QKnxDatapointType::setMinimum(const QVariant &minimum)

Sets the minimum value of the datapoint type to minimum.

See also minimum().

void QKnxDatapointType::setMinimumText(const QString &minimumText)

Sets the description of the minimum value of the datapoint type to minimumText.

See also minimumText().

void QKnxDatapointType::setRange(const QVariant &minimum, const QVariant &maximum)

Sets the minimum value of the datapoint type to minimum and the maximum value to maximum.

void QKnxDatapointType::setRangeText(const QString &minimumText, const QString &maximumText)

Sets the description of the minimum value of the datapoint type to minimumText and the description of the maximum value to maximumText.

void QKnxDatapointType::setUnit(const QString &unit)

Sets the unit of the datapoint type to unit.

See also unit().

int QKnxDatapointType::size() const

Returns the size of the datapoint type.

int QKnxDatapointType::subType() const

Returns the subtype of the datapoint type.

void QKnxDatapointType::swap(QKnxDatapointType &other)

Swaps other with this datapoint. This operation never fails.

[static] bool QKnxDatapointType::testBit(T byteToTest, quint8 bit)

Tests the value of the bit in byteToTest.

Returns true if the value was set; otherwise returns false.

[static] QKnxDatapointType::Type QKnxDatapointType::toType(const QString &dpt)

Converts a KNX datapoint type dpt of the format DPT-* or DPST-*-* into a QKnxDatapointType::Type enumeration used throughout the QtKnx API.

QKnxDatapointType::Type QKnxDatapointType::type() const

Returns the type of the datapoint type.

QString QKnxDatapointType::unit() const

Returns the unit of the datapoint type.

See also setUnit().

bool QKnxDatapointType::operator!=(const QKnxDatapointType &other) const

Returns true if this datapoint and the given other are not equal; otherwise returns false.

QKnxDatapointType &QKnxDatapointType::operator=(const QKnxDatapointType &other)

Assigns other to this datapoint type and returns a reference to this datapoint type.

QKnxDatapointType &QKnxDatapointType::operator=(QKnxDatapointType &&other)

Move assigns other to this datapoint type and returns a reference to this datapoint type.

bool QKnxDatapointType::operator==(const QKnxDatapointType &other) const

Returns true if this datapoint and the given other are equal; otherwise returns false.

Related Non-Members

QDebug operator<<(QDebug debug, const QKnxDatapointType &dpt)

Writes the datapoint type dpt to the debug stream.

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