struct Attributes
Attributes for the LevelControlTrait
.
-
A list of the attribute IDs of the attributes supported by the cluster instance. Nullable: false.
Declaration
Swift
@TraitAttribute var attributeList: [UInt32]? { get }
-
The time remaining (in 0.1 seconds) until the current command is complete. Nullable: false.
Declaration
Swift
@TraitAttribute var remainingTime: UInt16? { get }
-
The minimum value that can be assigned to the
currentLevel
attribute. Nullable: false.Declaration
Swift
@TraitAttribute var minLevel: UInt8? { get }
-
The maximum value that can be assigned to the
currentLevel
attribute. Nullable: false.Declaration
Swift
@TraitAttribute var maxLevel: UInt8? { get }
-
The frequency at which the device is at
currentLevel
. A value of0
means the frequency is unknown. Cannot be less than theminFrequency
or greater than themaxFrequency
. Nullable: false.Declaration
Swift
@TraitAttribute var currentFrequency: UInt16? { get }
-
The minimum value that can be assigned to the
currentFrequency
attribute. This value is always less than or equal tomaxFrequency
. A value of0
means undefined. Nullable: false.Declaration
Swift
@TraitAttribute var minFrequency: UInt16? { get }
-
The maximum value that can be assigned to the
currentFrequency
attribute. This value is always greater than or equal tominFrequency
. A value of0
means undefined. Nullable: false.Declaration
Swift
@TraitAttribute var maxFrequency: 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 taken (in 0.1 seconds) to move to or from the target level when
on
oroff
commands are received by anOnOff
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 value that the
currentLevel
attribute is set to when theonOff
attribute of theOnOff
cluster is set to true as a result of processing anOnOff
cluster command. Cannot be less than theminLevel
or greater than themaxLevel
. Nullable: true.Declaration
Swift
@TraitAttribute var onLevel: UInt8? { get }
-
The time taken (in 0.1 seconds) to move the
currentLevel
from theminLevel
to themaxLevel
when anon
command is received by anOnOff
cluster on the same endpoint. If not implemented or defined,onOffTransitionTime
is used instead. Nullable: true.Declaration
Swift
@TraitAttribute var onTransitionTime: UInt16? { get }
-
The time taken (in 0.1 seconds) to move the
currentLevel
from themaxLevel
to theminLevel
when anon
command is received by anOnOff
cluster on the same endpoint. If not implemented or defined,onOffTransitionTime
is used instead. Nullable: true.Declaration
Swift
@TraitAttribute var offTransitionTime: UInt16? { get }
-
The movement rate (in units per second) when a
move
command is reeceived with arate
parameter of null. Nullable: true.Declaration
Swift
@TraitAttribute var defaultMoveRate: UInt8? { get }
-
The desired startup level for a device when it is supplied with power, which is reflected in the
currentLevel
attribute. A value of0
setscurrentLevel
tominLevel
. A value of null, or a device reboot from an OTA, setscurrentLevel
to its previous value. Any other value setscurrentLevel
to that value. Nullable: true.Declaration
Swift
@TraitAttribute var startUpCurrentLevel: UInt8? { 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 }
-
A list of client-generated commands which are supported by this cluster server instance.
Nullable: false.
Declaration
Swift
@TraitAttribute var acceptedCommandList: [UInt32]? { get }
-
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 }
-
The revision of the server cluster specification supported by the cluster instance. Nullable: false.
Declaration
Swift
@TraitAttribute var clusterRevision: UInt16? { get }
-
The trait identifier.
Declaration
Swift
static var identifier: String { get }
-
Writes this object to the given
TraitEncoder
. ThrowsHomeError.encodingFailed
if the data could not be encoded.Declaration
Swift
func encode(with encoder: TraitEncoder) throws
-
Returns a Boolean value indicating whether two values are equal.
Equality is the inverse of inequality. For any values
a
andb
,a == b
implies thata != b
isfalse
.Declaration
Swift
static func == (lhs: Matter.LevelControlTrait.Attributes, rhs: Matter.LevelControlTrait.Attributes) -> Bool
Parameters
lhs
A value to compare.
rhs
Another value to compare.
-
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. Callhasher.combine(_:)
with each of these components.Important
In your implementation of
hash(into:)
, don’t callfinalize()
on thehasher
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)