Skip to content

Commit 7d15a5f

Browse files
[Silabs][Lighitng-app]Enable Events on some device management clusters. (project-chip#27086)
* Enable some Events on some device management clusters. Enable Power Source and power source config cluster * Emits different software fault events. Remove optional events that aren't emited by the app
1 parent f1c6c4a commit 7d15a5f

File tree

9 files changed

+2638
-243
lines changed

9 files changed

+2638
-243
lines changed

examples/lighting-app/silabs/data_model/lighting-thread-app.matter

+281
Original file line numberDiff line numberDiff line change
@@ -864,6 +864,253 @@ server cluster TimeFormatLocalization = 44 {
864864
readonly attribute int16u clusterRevision = 65533;
865865
}
866866

867+
/** This cluster is used to describe the configuration and capabilities of a Device's power system. */
868+
server cluster PowerSourceConfiguration = 46 {
869+
readonly attribute INT8U sources[] = 0;
870+
readonly attribute command_id generatedCommandList[] = 65528;
871+
readonly attribute command_id acceptedCommandList[] = 65529;
872+
readonly attribute event_id eventList[] = 65530;
873+
readonly attribute attrib_id attributeList[] = 65531;
874+
readonly attribute bitmap32 featureMap = 65532;
875+
readonly attribute int16u clusterRevision = 65533;
876+
}
877+
878+
/** This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the Node. */
879+
server cluster PowerSource = 47 {
880+
enum BatApprovedChemistryEnum : ENUM16 {
881+
kUnspecified = 0;
882+
kAlkaline = 1;
883+
kLithiumCarbonFluoride = 2;
884+
kLithiumChromiumOxide = 3;
885+
kLithiumCopperOxide = 4;
886+
kLithiumIronDisulfide = 5;
887+
kLithiumManganeseDioxide = 6;
888+
kLithiumThionylChloride = 7;
889+
kMagnesium = 8;
890+
kMercuryOxide = 9;
891+
kNickelOxyhydride = 10;
892+
kSilverOxide = 11;
893+
kZincAir = 12;
894+
kZincCarbon = 13;
895+
kZincChloride = 14;
896+
kZincManganeseDioxide = 15;
897+
kLeadAcid = 16;
898+
kLithiumCobaltOxide = 17;
899+
kLithiumIon = 18;
900+
kLithiumIonPolymer = 19;
901+
kLithiumIronPhosphate = 20;
902+
kLithiumSulfur = 21;
903+
kLithiumTitanate = 22;
904+
kNickelCadmium = 23;
905+
kNickelHydrogen = 24;
906+
kNickelIron = 25;
907+
kNickelMetalHydride = 26;
908+
kNickelZinc = 27;
909+
kSilverZinc = 28;
910+
kSodiumIon = 29;
911+
kSodiumSulfur = 30;
912+
kZincBromide = 31;
913+
kZincCerium = 32;
914+
}
915+
916+
enum BatChargeFaultEnum : ENUM8 {
917+
kUnspecified = 0;
918+
kAmbientTooHot = 1;
919+
kAmbientTooCold = 2;
920+
kBatteryTooHot = 3;
921+
kBatteryTooCold = 4;
922+
kBatteryAbsent = 5;
923+
kBatteryOverVoltage = 6;
924+
kBatteryUnderVoltage = 7;
925+
kChargerOverVoltage = 8;
926+
kChargerUnderVoltage = 9;
927+
kSafetyTimeout = 10;
928+
}
929+
930+
enum BatChargeLevelEnum : ENUM8 {
931+
kOK = 0;
932+
kWarning = 1;
933+
kCritical = 2;
934+
}
935+
936+
enum BatChargeStateEnum : ENUM8 {
937+
kUnknown = 0;
938+
kIsCharging = 1;
939+
kIsAtFullCharge = 2;
940+
kIsNotCharging = 3;
941+
}
942+
943+
enum BatCommonDesignationEnum : ENUM16 {
944+
kUnspecified = 0;
945+
kAAA = 1;
946+
kAA = 2;
947+
kC = 3;
948+
kD = 4;
949+
k4v5 = 5;
950+
k6v0 = 6;
951+
k9v0 = 7;
952+
k12AA = 8;
953+
kAAAA = 9;
954+
kA = 10;
955+
kB = 11;
956+
kF = 12;
957+
kN = 13;
958+
kNo6 = 14;
959+
kSubC = 15;
960+
kA23 = 16;
961+
kA27 = 17;
962+
kBA5800 = 18;
963+
kDuplex = 19;
964+
k4SR44 = 20;
965+
k523 = 21;
966+
k531 = 22;
967+
k15v0 = 23;
968+
k22v5 = 24;
969+
k30v0 = 25;
970+
k45v0 = 26;
971+
k67v5 = 27;
972+
kJ = 28;
973+
kCR123A = 29;
974+
kCR2 = 30;
975+
k2CR5 = 31;
976+
kCRP2 = 32;
977+
kCRV3 = 33;
978+
kSR41 = 34;
979+
kSR43 = 35;
980+
kSR44 = 36;
981+
kSR45 = 37;
982+
kSR48 = 38;
983+
kSR54 = 39;
984+
kSR55 = 40;
985+
kSR57 = 41;
986+
kSR58 = 42;
987+
kSR59 = 43;
988+
kSR60 = 44;
989+
kSR63 = 45;
990+
kSR64 = 46;
991+
kSR65 = 47;
992+
kSR66 = 48;
993+
kSR67 = 49;
994+
kSR68 = 50;
995+
kSR69 = 51;
996+
kSR516 = 52;
997+
kSR731 = 53;
998+
kSR712 = 54;
999+
kLR932 = 55;
1000+
kA5 = 56;
1001+
kA10 = 57;
1002+
kA13 = 58;
1003+
kA312 = 59;
1004+
kA675 = 60;
1005+
kAC41E = 61;
1006+
k10180 = 62;
1007+
k10280 = 63;
1008+
k10440 = 64;
1009+
k14250 = 65;
1010+
k14430 = 66;
1011+
k14500 = 67;
1012+
k14650 = 68;
1013+
k15270 = 69;
1014+
k16340 = 70;
1015+
kRCR123A = 71;
1016+
k17500 = 72;
1017+
k17670 = 73;
1018+
k18350 = 74;
1019+
k18500 = 75;
1020+
k18650 = 76;
1021+
k19670 = 77;
1022+
k25500 = 78;
1023+
k26650 = 79;
1024+
k32600 = 80;
1025+
}
1026+
1027+
enum BatFaultEnum : ENUM8 {
1028+
kUnspecified = 0;
1029+
kOverTemp = 1;
1030+
kUnderTemp = 2;
1031+
}
1032+
1033+
enum BatReplaceabilityEnum : ENUM8 {
1034+
kUnspecified = 0;
1035+
kNotReplaceable = 1;
1036+
kUserReplaceable = 2;
1037+
kFactoryReplaceable = 3;
1038+
}
1039+
1040+
enum PowerSourceStatusEnum : ENUM8 {
1041+
kUnspecified = 0;
1042+
kActive = 1;
1043+
kStandby = 2;
1044+
kUnavailable = 3;
1045+
}
1046+
1047+
enum WiredCurrentTypeEnum : ENUM8 {
1048+
kAC = 0;
1049+
kDC = 1;
1050+
}
1051+
1052+
enum WiredFaultEnum : ENUM8 {
1053+
kUnspecified = 0;
1054+
kOverVoltage = 1;
1055+
kUnderVoltage = 2;
1056+
}
1057+
1058+
bitmap Feature : BITMAP32 {
1059+
kWired = 0x1;
1060+
kBattery = 0x2;
1061+
kRechargeable = 0x4;
1062+
kReplaceable = 0x8;
1063+
}
1064+
1065+
struct BatChargeFaultChangeType {
1066+
BatChargeFaultEnum current[] = 0;
1067+
BatChargeFaultEnum previous[] = 1;
1068+
}
1069+
1070+
struct BatFaultChangeType {
1071+
BatFaultEnum current[] = 0;
1072+
BatFaultEnum previous[] = 1;
1073+
}
1074+
1075+
struct WiredFaultChangeType {
1076+
WiredFaultEnum current[] = 0;
1077+
WiredFaultEnum previous[] = 1;
1078+
}
1079+
1080+
info event WiredFaultChange = 0 {
1081+
WiredFaultEnum current[] = 0;
1082+
WiredFaultEnum previous[] = 1;
1083+
}
1084+
1085+
info event BatFaultChange = 1 {
1086+
BatFaultEnum current[] = 0;
1087+
BatFaultEnum previous[] = 1;
1088+
}
1089+
1090+
info event BatChargeFaultChange = 2 {
1091+
BatChargeFaultEnum current[] = 0;
1092+
BatChargeFaultEnum previous[] = 1;
1093+
}
1094+
1095+
readonly attribute PowerSourceStatusEnum status = 0;
1096+
readonly attribute int8u order = 1;
1097+
readonly attribute char_string<60> description = 2;
1098+
readonly attribute nullable int32u wiredAssessedInputVoltage = 3;
1099+
readonly attribute nullable int16u wiredAssessedInputFrequency = 4;
1100+
readonly attribute WiredCurrentTypeEnum wiredCurrentType = 5;
1101+
readonly attribute nullable int32u wiredAssessedCurrent = 6;
1102+
readonly attribute int32u wiredNominalVoltage = 7;
1103+
readonly attribute int32u wiredMaximumCurrent = 8;
1104+
readonly attribute boolean wiredPresent = 9;
1105+
readonly attribute WiredFaultEnum activeWiredFaults[] = 10;
1106+
readonly attribute command_id generatedCommandList[] = 65528;
1107+
readonly attribute command_id acceptedCommandList[] = 65529;
1108+
readonly attribute event_id eventList[] = 65530;
1109+
readonly attribute attrib_id attributeList[] = 65531;
1110+
readonly attribute bitmap32 featureMap = 65532;
1111+
readonly attribute int16u clusterRevision = 65533;
1112+
}
1113+
8671114
/** This cluster is used to manage global aspects of the Commissioning flow. */
8681115
server cluster GeneralCommissioning = 48 {
8691116
enum CommissioningErrorEnum : ENUM8 {
@@ -1994,6 +2241,8 @@ endpoint 0 {
19942241
}
19952242

19962243
server cluster AccessControl {
2244+
emits event AccessControlEntryChanged;
2245+
emits event AccessControlExtensionChanged;
19972246
callback attribute acl;
19982247
callback attribute extension;
19992248
callback attribute subjectsPerAccessControlEntry default = 4;
@@ -2052,6 +2301,16 @@ endpoint 0 {
20522301
ram attribute clusterRevision default = 1;
20532302
}
20542303

2304+
server cluster PowerSourceConfiguration {
2305+
callback attribute sources;
2306+
callback attribute generatedCommandList;
2307+
callback attribute acceptedCommandList;
2308+
callback attribute eventList;
2309+
callback attribute attributeList;
2310+
ram attribute featureMap default = 0;
2311+
ram attribute clusterRevision default = 1;
2312+
}
2313+
20552314
server cluster GeneralCommissioning {
20562315
ram attribute breadcrumb default = 0x0000000000000000;
20572316
callback attribute basicCommissioningInfo;
@@ -2081,6 +2340,7 @@ endpoint 0 {
20812340
}
20822341

20832342
server cluster GeneralDiagnostics {
2343+
emits event BootReason;
20842344
callback attribute networkInterfaces;
20852345
callback attribute rebootCount default = 0x0000;
20862346
callback attribute upTime default = 0x0000000000000000;
@@ -2095,6 +2355,7 @@ endpoint 0 {
20952355
}
20962356

20972357
server cluster SoftwareDiagnostics {
2358+
emits event SoftwareFault;
20982359
callback attribute threadMetrics;
20992360
callback attribute currentHeapFree default = 0x0000000000000000;
21002361
callback attribute currentHeapUsed default = 0x0000000000000000;
@@ -2297,6 +2558,26 @@ endpoint 1 {
22972558
callback attribute clusterRevision default = 1;
22982559
}
22992560

2561+
server cluster PowerSource {
2562+
ram attribute status default = 0;
2563+
ram attribute order default = 0;
2564+
ram attribute description default = "USB";
2565+
ram attribute wiredAssessedInputVoltage;
2566+
ram attribute wiredAssessedInputFrequency;
2567+
ram attribute wiredCurrentType default = 1;
2568+
ram attribute wiredAssessedCurrent;
2569+
ram attribute wiredNominalVoltage default = 5000;
2570+
ram attribute wiredMaximumCurrent default = 1000;
2571+
ram attribute wiredPresent default = 1;
2572+
callback attribute activeWiredFaults;
2573+
callback attribute generatedCommandList;
2574+
callback attribute acceptedCommandList;
2575+
callback attribute eventList;
2576+
callback attribute attributeList;
2577+
ram attribute featureMap default = 0;
2578+
ram attribute clusterRevision default = 1;
2579+
}
2580+
23002581
server cluster ColorControl {
23012582
persist attribute currentHue default = 0x00;
23022583
persist attribute currentSaturation default = 0x00;

0 commit comments

Comments
 (0)