struct MeasurementAccuracyStructThe set of accuracy ranges for a given measurement, the maximum and minimum values for the measurement, and whether the measurement is directly measured or only estimated from other existing information.
-
The measurement type for the accuracy provided.
Declaration
Swift
let measurementType: Matter.ElectricalEnergyMeasurementTrait.MeasurementTypeEnum -
Whether the associated measurement was directly measured. If this field is not set to
true, then the associated measurement was estimated.Declaration
Swift
let measured: Bool -
The minimum possible value of the measured value.
Declaration
Swift
let minMeasuredValue: Int64 -
The maximum possible value of the measured value.
Declaration
Swift
let maxMeasuredValue: Int64 -
A list of measurement ranges and their associated accuracies.
Declaration
Swift
let accuracyRanges: [Matter.ElectricalEnergyMeasurementTrait.MeasurementAccuracyRangeStruct] -
Creates a new Struct instance using data read from the given
TraitDecoder.Throws
HomeError.parseErrorwhen parsing fails.Declaration
Swift
init(decoder: TraitDecoder) throwsParameters
decoderThe raw data representing this Struct.
-
Writes this Struct to the given
TraitEncoder. ThrowsHomeError.parseErrorif 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)?