UnitRangeStruct

struct UnitRangeStruct

Defines an operational range, from a minimum to a maximum value, for a dimension of a closure.

  • min

    The minimum value of the operational range for this dimension, where the unit of measurement is specified by ClosureUnitEnum. The value of min must be less than or equal to the value of max and greater than or equal to -32768. The default value is 0.

    Declaration

    Swift

    let min: Int16
  • max

    The maximum value of the operational range for this dimension, where the unit of measurement is specified by ClosureUnitEnum. The value of max must be greater than or equal to the value of min and less than or equal to 32767. The default value is 1.

    Declaration

    Swift

    let max: Int16
  • 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)?