Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[power-source] Update cluster definitions (#20370)
Browse files Browse the repository at this point in the history
* [power-source] Update cluster definitions

1. Align attribute names with the spec by replacing
   BateryXYZ names with BatXYZ.
2. Use specific enum types instead of ENUM8.
3. Add missing isNullable="true" definitions.
4. Fix attribute value ranges.

Signed-off-by: Damian Krolik <[email protected]>

* Fix examples

* Regen ZAP
Damian-Nordic authored and pull[bot] committed Oct 23, 2023

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
1 parent bc41fb1 commit 0dd00a5
Showing 52 changed files with 5,584 additions and 5,427 deletions.
Original file line number Diff line number Diff line change
@@ -780,7 +780,7 @@ server cluster PowerSourceConfiguration = 46 {
}

server cluster PowerSource = 47 {
enum BatChargeFaultType : ENUM8 {
enum BatChargeFault : ENUM8 {
kUnspecfied = 0;
kAmbientTooHot = 1;
kAmbientTooCold = 2;
@@ -807,7 +807,7 @@ server cluster PowerSource = 47 {
kIsNotCharging = 3;
}

enum BatFaultType : ENUM8 {
enum BatFault : ENUM8 {
kUnspecfied = 0;
kOverTemp = 1;
kUnderTemp = 2;
@@ -832,7 +832,7 @@ server cluster PowerSource = 47 {
kDc = 1;
}

enum WiredFaultType : ENUM8 {
enum WiredFault : ENUM8 {
kUnspecfied = 0;
kOverVoltage = 1;
kUnderVoltage = 2;
@@ -845,12 +845,12 @@ server cluster PowerSource = 47 {
kReplaceable = 0x8;
}

readonly attribute enum8 status = 0;
readonly attribute PowerSourceStatus status = 0;
readonly attribute int8u order = 1;
readonly attribute char_string<60> description = 2;
readonly attribute enum8 batteryChargeLevel = 14;
readonly attribute boolean batteryReplacementNeeded = 15;
readonly attribute enum8 batteryReplaceability = 16;
readonly attribute BatChargeLevel batChargeLevel = 14;
readonly attribute boolean batReplacementNeeded = 15;
readonly attribute BatReplaceability batReplaceability = 16;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;
}
@@ -3917,9 +3917,9 @@ endpoint 0 {
ram attribute status;
ram attribute order default = 3;
ram attribute description default = "B1";
ram attribute batteryChargeLevel;
ram attribute batteryReplacementNeeded;
ram attribute batteryReplaceability;
ram attribute batChargeLevel;
ram attribute batReplacementNeeded;
ram attribute batReplaceability;
ram attribute featureMap default = 2;
ram attribute clusterRevision default = 1;
}
@@ -4223,9 +4223,9 @@ endpoint 1 {
ram attribute status;
ram attribute order default = 2;
ram attribute description default = "B2";
ram attribute batteryChargeLevel;
ram attribute batteryReplacementNeeded;
ram attribute batteryReplaceability;
ram attribute batChargeLevel;
ram attribute batReplacementNeeded;
ram attribute batReplaceability;
ram attribute featureMap default = 2;
ram attribute clusterRevision default = 1;
}
@@ -4745,9 +4745,9 @@ endpoint 2 {
ram attribute status;
ram attribute order default = 1;
ram attribute description default = "B3";
ram attribute batteryChargeLevel;
ram attribute batteryReplacementNeeded;
ram attribute batteryReplaceability;
ram attribute batChargeLevel;
ram attribute batReplacementNeeded;
ram attribute batReplaceability;
ram attribute featureMap default = 2;
ram attribute clusterRevision default = 1;
}
Loading

0 comments on commit 0dd00a5

Please sign in to comment.