Skip to content

Commit

Permalink
[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
  • Loading branch information
Damian-Nordic authored Jul 11, 2022
1 parent 776c06d commit 383ced5
Show file tree
Hide file tree
Showing 52 changed files with 5,584 additions and 5,427 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ server cluster PowerSourceConfiguration = 46 {
}

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

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

enum WiredFaultType : ENUM8 {
enum WiredFault : ENUM8 {
kUnspecfied = 0;
kOverVoltage = 1;
kUnderVoltage = 2;
Expand All @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
}
Expand Down
Loading

0 comments on commit 383ced5

Please sign in to comment.