struct MeasurementRangeStruct
The maximum and minimum values of a given measurement type during a measurement period, along with the observation times of these values.
-
The measurement type for the range provided.
Declaration
Swift
let measurementType: Matter.ElectricalPowerMeasurementTrait.MeasurementTypeEnum
-
The smallest measured value for the associated measurement over the period between either
startTimestamp
andendTimestamp
or the period betweenstartSystime
andendSystime
, or both.Declaration
Swift
let min: Int64
-
The largest measured value for the associated measurement over the period between either
startTimestamp
andendTimestamp
or the period betweenstartSystime
andendSystime
, or both.Declaration
Swift
let max: Int64
-
The timestamp in UTC of the start of the measurement period.
Declaration
Swift
let startTimestamp: UInt32?
-
The timestamp in UTC of the end of the measurement period.
Declaration
Swift
let endTimestamp: UInt32?
-
The most recent timestamp in UTC of the value in the
min
field. greater than or equal to the value of thestartTimestamp
field, and less than or equal to the value of theendTimestamp
field.Declaration
Swift
let minTimestamp: UInt32?
-
The most recent timestamp in UTC of the value in the
max
field. The value is greater than or equal to the value of thestartTimestamp
field, and less than or equal to the value of theendTimestamp
field.Declaration
Swift
let maxTimestamp: UInt32?
-
The time since boot at the start of the measurement period.
Declaration
Swift
let startSystime: UInt64?
-
The time, in milliseconds, since boot at the end of the measurement period.
Declaration
Swift
let endSystime: UInt64?
-
The measurement time, in milliseconds, since boot of the value in the
min
field. The value is greater than or equal to the value of thestartSystime
field andless than or equal to the value of theendSystime
field.Declaration
Swift
let minSystime: UInt64?
-
The measurement time, in milliseconds, since boot of the value in the
max
field. The value is greater than or equal to the value of thestartSystime
field and less than or equal to the value of theendSystime
field.Declaration
Swift
let maxSystime: UInt64?
-
Creates a new Struct instance using data read from the given
TraitDecoder
.Throws
HomeError.parseError
when parsing fails.Declaration
Swift
init(decoder: TraitDecoder) throws
Parameters
decoder
The raw data representing this Struct.
-
Writes this Struct to the given
TraitEncoder
. ThrowsHomeError.parseError
if the data could not be encoded.Declaration
Swift
func encode(with encoder: TraitEncoder) throws
-
Returns the field corresponding to the given field ID.
Declaration
Swift
static func structField(id: UInt32) -> (any Field)?