OverallCurrentStateStruct

struct OverallCurrentStateStruct

The current state of the closure.

  • The current Position state of the closure, as defined in the CurrentPositionEnum.

    Declaration

  • The current latch state of the closure. A null value indicates that the state is not known.

    Declaration

    Swift

    let latch: Bool?
  • The current speed state of the closure, as defined in the ThreeLevelAutoEnum.

    Declaration

  • The current secure state of the closure. A secure state requires the closure to meet both of the following conditions defined by the OverallCurrentStateStruct:

    • If the Positioning feature is supported, then the Position field of OverallCurrentState is FullyClosed.
    • If the MotionLatching feature is supported, then the Latch field of OverallCurrentStateis True.

    Declaration

    Swift

    let secureState: Bool?
  • 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)?