struct AttributesAttributes for the PowerSourceTrait.
-
A list of the attribute IDs of the attributes supported by the cluster instance. Nullable: false.
Declaration
Swift
@TraitAttribute var attributeList: [UInt32]? { get } -
The participation of the power source in providing power to the node, as specified in
PowerSourceStatusEnum. Nullable: false.Declaration
Swift
@TraitAttribute var status: Matter.PowerSourceTrait.PowerSourceStatusEnum? { get } -
The relative preference with which the device selects the source to provide power. A source with a lower order is selected by the device to provide power before any other source with a higher order, if the lower-order source is available. Nullable: false.
Declaration
Swift
@TraitAttribute var order: UInt8? { get } -
A user-facing description of the source, used to distinguish it from other power sources. Nullable: false.
Declaration
Swift
@TraitAttribute var description: String? { get } -
The assessed RMS or DC voltage currently provided by the hard-wired source, in millivolts. A value of null indicates that the device is currently unable to assess the value. If the wired source is not connected, but the device is still able to assess a value, then the assessed value can be reported. Nullable: true.
Declaration
Swift
@TraitAttribute var wiredAssessedInputVoltage: UInt32? { get } -
The assessed frequency of the voltage, currently provided by the hard-wired source, in Hz. A value of null indicates that the device is currently unable to assess the value. If the wired source is not connected, but the device is still able to assess a value, then the assessed value can be reported. Nullable: true.
Declaration
Swift
@TraitAttribute var wiredAssessedInputFrequency: UInt16? { get } -
The type of current that the device expects to be provided by the hard-wired source, as specified in
WiredCurrentTypeEnum. Nullable: false.Declaration
Swift
@TraitAttribute var wiredCurrentType: Matter.PowerSourceTrait.WiredCurrentTypeEnum? { get } -
The assessed instantaneous current draw of the device on the hard-wired source, in milliamps. A value of null indicates the device is currently unable to assess the value. If the wired source is not connected, but the device is still able to assess a value, then the assessed value can be reported. Nullable: true.
Declaration
Swift
@TraitAttribute var wiredAssessedCurrent: UInt32? { get } -
The nominal voltage in millivolts, given in the device’s regulatory compliance label, expected to be provided by the hard-wired source. Nullable: false.
Declaration
Swift
@TraitAttribute var wiredNominalVoltage: UInt32? { get } -
The maximum current in milliamps, given in the device’s regulatory compliance label, expected to be provided by the hard-wired source. Nullable: false.
Declaration
Swift
@TraitAttribute var wiredMaximumCurrent: UInt32? { get } -
Indicates if the device detects that the hard-wired power source is properly connected. Nullable: false.
Declaration
Swift
@TraitAttribute var wiredPresent: Bool? { get } -
The set of wired faults currently detected by the device on this power source. This set is represented as a list of
WiredFaultEnum. When the device detects that a fault has been raised, the appropriateWiredFaultEnumvalue is added to this list, provided this value is not already present in the list. This list should not contain more than one instance of a specificWiredFaultEnumvalue. When the device detects that all conditions contributing to a fault have been cleared, the correspondingWiredFaultEnumvalue is removed from this list. An empty list indicates that there are currently no active faults. Nullable: false.Declaration
Swift
@TraitAttribute var activeWiredFaults: [Matter.PowerSourceTrait.WiredFaultEnum]? { get } -
The currently measured output voltage of the battery in millivolts. A value of null indicates that the device is currently unable to assess the value. Nullable: true.
Declaration
Swift
@TraitAttribute var batVoltage: UInt32? { get } -
The estimated percentage of battery charge remaining until the battery can no longer provide power to the device. Values are expressed in half-percent units, ranging from 0 to 200. For example, a value of 48 is equivalent to 24%. A value of null indicates that the device is currently unable to assess the value. Changes to this attribute are reported either once every 10 seconds or when the value changes between null and a non-null value. Nullable: true.
Declaration
Swift
@TraitAttribute var batPercentRemaining: UInt8? { get } -
The estimated time in seconds before the battery will no longer be able to provide power to the device. A value of null indicates that the device is currently unable to assess the value. Changes to this attribute are reported either once every 10 seconds or when the value changes between null and a non-null value. Nullable: true.
Declaration
Swift
@TraitAttribute var batTimeRemaining: UInt32? { get } -
The ranking of the charge level of the battery used to indicate when intervention is required, as specified in
BatChargeLevelEnum. Nullable: false.Declaration
Swift
@TraitAttribute var batChargeLevel: Matter.PowerSourceTrait.BatChargeLevelEnum? { get } -
Indicates if the battery needs to be replaced. Nullable: false.
Declaration
Swift
@TraitAttribute var batReplacementNeeded: Bool? { get } -
Indicates the replaceability of the battery as specified in
BatReplaceabilityEnum. Nullable: false.Declaration
Swift
@TraitAttribute var batReplaceability: Matter.PowerSourceTrait.BatReplaceabilityEnum? { get } -
Indicates if the device detects that the batteries are properly installed. Nullable: false.
Declaration
Swift
@TraitAttribute var batPresent: Bool? { get } -
Indicates the set of battery faults currently detected by the device on this power source. This set is represented as a list in
BatFaultEnum. When the device detects that a fault has been raised, the appropriateBatFaultEnumvalue is added to this list. When the device detects that all conditions contributing to a fault have been cleared, the corresponding value is removed from this list. An empty list indicates that there are currently no active faults. Nullable: false.Declaration
Swift
@TraitAttribute var activeBatFaults: [Matter.PowerSourceTrait.BatFaultEnum]? { get } -
A user-facing description of this battery, containing information required to identify a replacement, such as form factor, chemistry, or preferred manufacturer. Nullable: false.
Declaration
Swift
@TraitAttribute var batReplacementDescription: String? { get } -
The ID of the common or colloquial designation of the battery, as specified in
BatCommonDesignationEnum. Nullable: false.Declaration
Swift
@TraitAttribute var batCommonDesignation: Matter.PowerSourceTrait.BatCommonDesignationEnum? { get } -
The string representing the ANSI designation for the battery, as specified in ANSI C18. Nullable: false.
Declaration
Swift
@TraitAttribute var batAnsiDesignation: String? { get } -
The string representing the IEC designation for the battery, as specified in IEC 60086. Nullable: false.
Declaration
Swift
@TraitAttribute var batIecDesignation: String? { get } -
ID of the preferred chemistry of the battery source, as specified in
BatApprovedChemistryEnum. Nullable: false.Declaration
Swift
@TraitAttribute var batApprovedChemistry: Matter.PowerSourceTrait.BatApprovedChemistryEnum? { get } -
The preferred minimum charge capacity rating in milliampere-hours of battery cells or packs in the battery source. Nullable: false.
Declaration
Swift
@TraitAttribute var batCapacity: UInt32? { get } -
The number of battery cells or packs in the battery source. Nullable: false.
Declaration
Swift
@TraitAttribute var batQuantity: UInt8? { get } -
The state of the battery charge, as specified in
BatChargeStateEnum. Nullable: false.Declaration
Swift
@TraitAttribute var batChargeState: Matter.PowerSourceTrait.BatChargeStateEnum? { get } -
The estimated time in seconds before the battery source is fully charged. A value of null indicates that the device is currently unable to assess the value. Changes to this attribute are reported either once every 10 seconds or when the value changes between null and a non- null value. Nullable: true.
Declaration
Swift
@TraitAttribute var batTimeToFullCharge: UInt32? { get } -
Indicates whether the device can remain operational while the battery source is charging. Nullable: false.
Declaration
Swift
@TraitAttribute var batFunctionalWhileCharging: Bool? { get } -
The assessed current in milliamps being supplied to charge the battery source. A value of null indicates that the device is currently unable to assess the value. Nullable: true.
Declaration
Swift
@TraitAttribute var batChargingCurrent: UInt32? { get } -
Indicates the set of battery charge faults currently detected by the device on this power source. This set is represented as a list in
BatChargeFaultEnum. When the device detects that a fault has been raised, the appropriateBatChargeFaultEnumvalue is added to this list. When the device detects that all conditions contributing to a fault have been cleared, the corresponding value is removed from this list. An empty list indicates that there are currently no active faults. Nullable: false.Declaration
Swift
@TraitAttribute var activeBatChargeFaults: [Matter.PowerSourceTrait.BatChargeFaultEnum]? { get } -
A list of endpoints that are powered by the source defined by this cluster. Multiple instances of this cluster can list the same endpoint because it is possible for power for an endpoint to come from multiple sources. In that case, the
PowerSourceTrait/Attributes/Orderattribute indicates their priority. For each power source on a device, there is only one instance of this cluster. A cluster instance with an empty list indicates that the power source is for the entire device, which includes all endpoints. A cluster instance with a non-empty list includes the endpoint for which the cluster instance resides. Nullable: false.Declaration
Swift
@TraitAttribute var endpointList: [UInt16]? { 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.PowerSourceTrait.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.encodingFailedif 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
aandb,a == bimplies thata != bisfalse.Declaration
Swift
static func == (lhs: Matter.PowerSourceTrait.Attributes, rhs: Matter.PowerSourceTrait.Attributes) -> BoolParameters
lhsA value to compare.
rhsAnother value to compare.
-
Hashes the essential components of this value by feeding them into the given hasher.
Implement this method to conform to the
Hashableprotocol. 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 thehasherinstance 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)