struct Attributes
Attributes for the ElectricalPowerMeasurementTrait
.
-
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.ElectricalPowerMeasurementTrait.Attributes, rhs: Matter.ElectricalPowerMeasurementTrait.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 }
-
List of accuracy specifications for the measurement types supported by the server. Nullable: false.
Declaration
Swift
@TraitAttribute var accuracy: [Matter.ElectricalPowerMeasurementTrait.MeasurementAccuracyStruct]? { get }
-
The most recent current reading in milliamps (mA). A positive value means that current is flowing into the server, and a negative value means that current is flowing out of the server. Nullable: true.
Declaration
Swift
@TraitAttribute var activeCurrent: Int64? { get }
-
The most recent power reading in milliwatts (mW). A positive value means that power is being imported, and a negative value means that power is being exported. Nullable: true.
Declaration
Swift
@TraitAttribute var activePower: Int64? { get }
-
The most recent
apparentCurrent
(square root sum of the squares of active and reactive currents) reading in milliamps (mA). Nullable: true.Declaration
Swift
@TraitAttribute var apparentCurrent: Int64? { get }
-
The most recent
apparentPower
reading in millivolt-amps (mVA). A positive value denotes power imported, and a negative value denotes power exported. Nullable: true.Declaration
Swift
@TraitAttribute var apparentPower: Int64? { 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 }
-
Writes this object to the given
TraitEncoder
. ThrowsHomeError.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.ElectricalPowerMeasurementTrait.Feature? { get }
-
The most recent frequency reading in millihertz (mHz). Nullable: true.
Declaration
Swift
@TraitAttribute var frequency: Int64? { 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
HarmonicMeasurementStruct
values, where each value represents the harmonic current reading for the harmonic order as specified byorder
. Nullable: true.Declaration
Swift
@TraitAttribute var harmonicCurrents: [Matter.ElectricalPowerMeasurementTrait.HarmonicMeasurementStruct]? { get }
-
A list of
HarmonicMeasurementStruct
values, where each value represents the harmonic phase reading for the harmonic order as specified byorder
. Nullable: true.Declaration
Swift
@TraitAttribute var harmonicPhases: [Matter.ElectricalPowerMeasurementTrait.HarmonicMeasurementStruct]? { 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. 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)
-
The trait identifier.
Declaration
Swift
static var identifier: String { get }
-
The most recent
neutralCurrent
reading in milliamps (mA). Typically, this is the magnitude of the vector sum of the phase currents. A positive value represents an imbalance between the phase currents when power is imported. A negative value represents an imbalance between the phase currents when power is exported. Nullable: true.Declaration
Swift
@TraitAttribute var neutralCurrent: Int64? { get }
-
Maximum number of measurement types the server is capable of reporting. Nullable: false.
Declaration
Swift
@TraitAttribute var numberOfMeasurementTypes: UInt8? { get }
-
The power factor ratio in +/- 1/100ths of a percent. Nullable: true.
Declaration
Swift
@TraitAttribute var powerFactor: Int64? { get }
-
The current mode of the server. Nullable: false.
Declaration
Swift
@TraitAttribute var powerMode: Matter.ElectricalPowerMeasurementTrait.PowerModeEnum? { get }
-
The measured ranges for different measurement types. Each measurement type is limited to one entry in this list, which represents the range of measurements in the most recent measurement period. Nullable: false.
Declaration
Swift
@TraitAttribute var ranges: [Matter.ElectricalPowerMeasurementTrait.MeasurementRangeStruct]? { get }
-
The most recent
reactiveCurrent
reading in milliamps (mA). A positive value means that current is flowing into the server, and a negative value means that current is flowing out of the server. Nullable: true.Declaration
Swift
@TraitAttribute var reactiveCurrent: Int64? { get }
-
The most recent
reactivePower
reading in millivolt-amps reactive (mVAR). A positive value denotes power imported, and a negative value denotes power exported. Nullable: true.Declaration
Swift
@TraitAttribute var reactivePower: Int64? { get }
-
Root mean squared current in milliamps (mA). A positive value means that current is flowing into the server, and a negative value means that current is flowing out of the server. Nullable: true.
Declaration
Swift
@TraitAttribute var rmsCurrent: Int64? { get }
-
Root mean squared power in milliwatts (mW). A positive value means that power is being imported, and a negative value means that power is being exported. Nullable: true.
Declaration
Swift
@TraitAttribute var rmsPower: Int64? { get }
-
Root mean squared voltage in millivolts (mV). Nullable: true.
Declaration
Swift
@TraitAttribute var rmsVoltage: Int64? { get }
-
Voltage in millivolts (mV). Nullable: true.
Declaration
Swift
@TraitAttribute var voltage: Int64? { get }