MeasurementAccuracyRangeStruct

struct MeasurementAccuracyRangeStruct

The accuracy of a measurement for a range of measurement values, shown as a maximum +/- percentage of the true value, a maximum +/- fixed value of the true value, or both.

  • The minimum measurement value for the specified level of accuracy. The value of this field is greater than or equal to the value of minMeasuredValue. The value of this field is less than or equal to the value of maxMeasuredValue.

    Declaration

    Swift

    let rangeMin: Int64
  • The maximum measurement value for the specified level of accuracy. The value of this field is greater than the value of the rangeMin field and greater than or equal to the value of minMeasuredValue. The value of this field is less than or equal to the value of maxMeasuredValue.

    Declaration

    Swift

    let rangeMax: Int64
  • The maximum +/- percentage accuracy for the associated measurement.

    Declaration

    Swift

    let percentMax: UInt16?
  • The minimum +/- percentage accuracy for the associated measurement.

    Declaration

    Swift

    let percentMin: UInt16?
  • The typical +/- percentage accuracy for the associated measurement.

    Declaration

    Swift

    let percentTypical: UInt16?
  • The maximum +/- fixed accuracy for the associated measurement, in the unit indicated by measurementType.

    Declaration

    Swift

    let fixedMax: UInt64?
  • The minimum +/- fixed accuracy for the associated measurement, in the unit indicated by measurementType.

    Declaration

    Swift

    let fixedMin: UInt64?
  • The typical +/- fixed accuracy for the associated measurement, in the unit indicated by measurementType.

    Declaration

    Swift

    let fixedTypical: 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. Throws HomeError.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)?