This struct shall indicate the amount of energy measured during a given measurement period.

A server which does not have the ability to determine the time in UTC, or has not yet done so, shall use the system time fields to specify the measurement period and observation times.

A server which has determined the time in UTC shall use the timestamp fields to specify the measurement period. Such a server may also include the systime fields to indicate how many seconds had passed since boot for a given timestamp; this allows for client-side resolution of UTC time for previous reports that only included systime.

MatterSpecification.v13.Cluster § 2.12.5.1

interface EnergyMeasurement {
    endSystime?: number | bigint;
    endTimestamp?: number;
    energy: number | bigint;
    startSystime?: number | bigint;
    startTimestamp?: number;
}

Hierarchy (view full)

Properties

endSystime?: number | bigint

This field shall indicate the seconds since boot at the end of the period during which the value of the Energy field was measured.

If the server had not yet determined the time in UTC by the end of the measurement period, or does not have the capability of determining the time in UTC, this field shall be indicated.

Otherwise, if the server had determined the time in UTC by the end of the measurement period, this field may be omitted; if it is indicated, its value shall be the seconds since boot at the UTC time indicated in EndTimestamp.

MatterSpecification.v13.Cluster § 2.12.5.1.5

endTimestamp?: number

This field shall indicate the timestamp in UTC of the end of the period during which the value of the Energy field was measured.

If the server had determined the time in UTC by the end of the measurement period, this field shall be indicated.

Otherwise, if the server had not yet determined the time in UTC by the end of the measurement period, or does not have the capability of determining the time in UTC, this field shall be omitted.

MatterSpecification.v13.Cluster § 2.12.5.1.3

energy: number | bigint

This field shall be the reported energy.

If the EnergyMeasurementStruct represents cumulative energy, then this shall represent the cumulative energy recorded at either the value of the EndTimestamp field or the value of the EndSystime field, or both.

If the EnergyMeasurementStruct represents periodic energy, then this shall represent the energy recorded during the period specified by either the StartTimestamp and EndTimestamp fields, the period specified by the StartSystime and EndSystime fields, or both.

MatterSpecification.v13.Cluster § 2.12.5.1.1

startSystime?: number | bigint

This field shall indicate the seconds since boot at the beginning of the period during which the value of the Energy field was measured.

If this EnergyMeasurementStruct represents cumulative energy, this field shall be omitted.

Otherwise, if the server had not yet determined the time in UTC at the start of the measurement period, or does not have the capability of determining the time in UTC, this field shall be indicated.

Otherwise, if the server had determined the time in UTC at or before the beginning of the measurement period, this field may be omitted; if it is indicated, its value shall be the seconds since boot at the UTC time indicated in StartTimestamp.

MatterSpecification.v13.Cluster § 2.12.5.1.4

startTimestamp?: number

This field shall indicate the timestamp in UTC of the beginning of the period during which the value of the Energy field was measured.

If this EnergyMeasurementStruct represents cumulative energy, this field shall be omitted.

Otherwise, if the server had determined the time in UTC at or before the beginning of the measurement period, this field shall be indicated.

Otherwise, if the server had not yet determined the time in UTC at or before the beginning of the measurement period, or does not have the capability of determining the time in UTC, this field shall be omitted.

MatterSpecification.v13.Cluster § 2.12.5.1.2