MeasurementRangeStruct

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

  • min

    The smallest measured value for the associated measurement over the period between either startTimestamp and endTimestamp or the period between startSystime and endSystime, or both.

    Declaration

    Swift

    let min: Int64
  • max

    The largest measured value for the associated measurement over the period between either startTimestamp and endTimestamp or the period between startSystime and endSystime, 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 the startTimestamp field, and less than or equal to the value of the endTimestamp 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 the startTimestamp field, and less than or equal to the value of the endTimestamp 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 the startSystime field andless than or equal to the value of the endSystime 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 the startSystime field and less than or equal to the value of the endSystime 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. 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)?