QKnxElectricalEnergy Class

The QKnxElectricalEnergy class is a datapoint type for electrical energy. 更多...

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

公共函数

QKnxElectricalEnergy (qint64 value )
QKnxElectricalEnergy ()
bool setValue (qint64 value )
qint64 value () const

重实现公共函数

virtual bool isValid () const override

保护函数

QKnxElectricalEnergy (int subType , qint64 value )

详细描述

This is a fixed size datapoint type with the length of 8 bytes.

It is a base class for the following classes:

  • QKnxActiveEnergyV64 - Active energy in Wh.
  • QKnxApparentEnergyV64 - Active energy in VAh.
  • QKnxReactiveEnergyV64 - Active energy in VARh.

The range for the value is from -9 223 372 036 854 775 808 to 9 223 372 036 854 775 807 .

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

成员函数文档编制

[protected] QKnxElectricalEnergy:: QKnxElectricalEnergy ( int subType , qint64 value )

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

QKnxElectricalEnergy:: QKnxElectricalEnergy ( qint64 value )

Creates a fixed size datapoint type with the value value .

QKnxElectricalEnergy:: QKnxElectricalEnergy ()

Creates a fixed size datapoint type with the value set to 0 .

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

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

bool QKnxElectricalEnergy:: setValue ( qint64 value )

Sets the value of the datapoint type to value .

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

另请参阅 value ().

qint64 QKnxElectricalEnergy:: value () const

Returns the value stored in the datapoint type.

另请参阅 setValue ().