Attributes

struct Attributes

Attributes for the LevelControlTrait.

  • Returns a Boolean value indicating whether two values are equal.

    Equality is the inverse of inequality. For any values a and b, a == b implies that a != b is false.

    Declaration

    Swift

    static func == (lhs: Matter.LevelControlTrait.Attributes, rhs: Matter.LevelControlTrait.Attributes) -> Bool

    Parameters

    lhs

    A value to compare.

    rhs

    Another value to compare.

  • A list of client-generated commands which are supported by this cluster server instance.

    Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var acceptedCommandList: [UInt32]? { get }
  • A list of the attribute IDs of the attributes supported by the cluster instance. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var attributeList: [UInt32]? { get }
  • The revision of the server cluster specification supported by the cluster instance. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var clusterRevision: UInt16? { get }
  • The frequency at which the device is at currentLevel. A value of 0 means the frequency is unknown. Cannot be less than the minFrequency or greater than the maxFrequency. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var currentFrequency: UInt16? { get }
  • The current level of the device, which is device dependent. For example, a level for a light may mean the brightness level. Cannot be less than the minLevel or greater than the maxLevel. Nullable: true.

    Declaration

    Swift

    @TraitAttribute
    var currentLevel: UInt8? { get }
  • The movement rate (in units per second) when a move command is reeceived with a rate parameter of null. Nullable: true.

    Declaration

    Swift

    @TraitAttribute
    var defaultMoveRate: UInt8? { get }
  • Writes this object to the given TraitEncoder. Throws HomeError.encodingFailed if the data could not be encoded.

    Declaration

    Swift

    func encode(with encoder: TraitEncoder) throws
  • Whether the server supports zero or more optional cluster features. A cluster feature is a set of cluster elements that are mandatory or optional for a defined feature of the cluster. If a cluster feature is supported by the cluster instance, then the corresponding bit is set to 1, otherwise the bit is set to 0 (zero). Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var featureMap: Matter.LevelControlTrait.Feature? { get }
  • A list of server-generated commands (server to client) which are supported by this cluster server instance. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var generatedCommandList: [UInt32]? { get }
  • Hashes the essential components of this value by feeding them into the given hasher.

    Implement this method to conform to the Hashable protocol. The components used for hashing must be the same as the components compared in your type’s == operator implementation. Call hasher.combine(_:) with each of these components.

    Important

    In your implementation of hash(into:), don’t call finalize() on the hasher instance provided, or replace it with a different instance. Doing so may become a compile-time error in the future.

    Declaration

    Swift

    func hash(into hasher: inout Hasher)
  • The trait identifier.

    Declaration

    Swift

    static var identifier: String { get }
  • The maximum value that can be assigned to the currentFrequency attribute. This value is always greater than or equal to minFrequency. A value of 0 means undefined. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var maxFrequency: UInt16? { get }
  • The maximum value that can be assigned to the currentLevel attribute. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var maxLevel: UInt8? { get }
  • The minimum value that can be assigned to the currentFrequency attribute. This value is always less than or equal to maxFrequency. A value of 0 means undefined. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var minFrequency: UInt16? { get }
  • The minimum value that can be assigned to the currentLevel attribute. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var minLevel: UInt8? { get }
  • The time taken (in 0.1 seconds) to move the currentLevel from the maxLevel to the minLevel when an on command is received by an OnOff cluster on the same endpoint. If not implemented or defined, onOffTransitionTime is used instead. Nullable: true.

    Declaration

    Swift

    @TraitAttribute
    var offTransitionTime: UInt16? { get }
  • The value that the currentLevel attribute is set to when the onOff attribute of the OnOff cluster is set to true as a result of processing an OnOff cluster command. Cannot be less than the minLevel or greater than the maxLevel. Nullable: true.

    Declaration

    Swift

    @TraitAttribute
    var onLevel: UInt8? { get }
  • The time taken (in 0.1 seconds) to move to or from the target level when on or off commands are received by an OnOff cluster on the same endpoint. Not supported for devices that are not able to transition at a variable rate. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var onOffTransitionTime: UInt16? { get }
  • The time taken (in 0.1 seconds) to move the currentLevel from the minLevel to the maxLevel when an on command is received by an OnOff cluster on the same endpoint. If not implemented or defined, onOffTransitionTime is used instead. Nullable: true.

    Declaration

    Swift

    @TraitAttribute
    var onTransitionTime: UInt16? { get }
  • A bitmap that determines the default behavior of some cluster commands. This should only be changed during commissioning. See [LevelControlTrait.OptionsBitmap] for more information. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var options: Matter.LevelControlTrait.OptionsBitmap? { get }
  • The time remaining (in 0.1 seconds) until the current command is complete. Nullable: false.

    Declaration

    Swift

    @TraitAttribute
    var remainingTime: UInt16? { get }
  • The desired startup level for a device when it is supplied with power, which is reflected in the currentLevel attribute. A value of 0 sets currentLevel to minLevel. A value of null, or a device reboot from an OTA, sets currentLevel to its previous value. Any other value sets currentLevel to that value. Nullable: true.

    Declaration

    Swift

    @TraitAttribute
    var startUpCurrentLevel: UInt8? { get }