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 ().