Skip to content

Commit

Permalink
[Silabs][Lighitng-app]Enable Events on some device management cluster…
Browse files Browse the repository at this point in the history
…s. (#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
  • Loading branch information
jmartinez-silabs authored and pull[bot] committed Feb 21, 2024
1 parent d400096 commit 2811f0a
Show file tree
Hide file tree
Showing 9 changed files with 2,638 additions and 243 deletions.
281 changes: 281 additions & 0 deletions examples/lighting-app/silabs/data_model/lighting-thread-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,253 @@ server cluster TimeFormatLocalization = 44 {
readonly attribute int16u clusterRevision = 65533;
}

/** This cluster is used to describe the configuration and capabilities of a Device's power system. */
server cluster PowerSourceConfiguration = 46 {
readonly attribute INT8U sources[] = 0;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
readonly attribute attrib_id attributeList[] = 65531;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;
}

/** This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the Node. */
server cluster PowerSource = 47 {
enum BatApprovedChemistryEnum : ENUM16 {
kUnspecified = 0;
kAlkaline = 1;
kLithiumCarbonFluoride = 2;
kLithiumChromiumOxide = 3;
kLithiumCopperOxide = 4;
kLithiumIronDisulfide = 5;
kLithiumManganeseDioxide = 6;
kLithiumThionylChloride = 7;
kMagnesium = 8;
kMercuryOxide = 9;
kNickelOxyhydride = 10;
kSilverOxide = 11;
kZincAir = 12;
kZincCarbon = 13;
kZincChloride = 14;
kZincManganeseDioxide = 15;
kLeadAcid = 16;
kLithiumCobaltOxide = 17;
kLithiumIon = 18;
kLithiumIonPolymer = 19;
kLithiumIronPhosphate = 20;
kLithiumSulfur = 21;
kLithiumTitanate = 22;
kNickelCadmium = 23;
kNickelHydrogen = 24;
kNickelIron = 25;
kNickelMetalHydride = 26;
kNickelZinc = 27;
kSilverZinc = 28;
kSodiumIon = 29;
kSodiumSulfur = 30;
kZincBromide = 31;
kZincCerium = 32;
}

enum BatChargeFaultEnum : ENUM8 {
kUnspecified = 0;
kAmbientTooHot = 1;
kAmbientTooCold = 2;
kBatteryTooHot = 3;
kBatteryTooCold = 4;
kBatteryAbsent = 5;
kBatteryOverVoltage = 6;
kBatteryUnderVoltage = 7;
kChargerOverVoltage = 8;
kChargerUnderVoltage = 9;
kSafetyTimeout = 10;
}

enum BatChargeLevelEnum : ENUM8 {
kOK = 0;
kWarning = 1;
kCritical = 2;
}

enum BatChargeStateEnum : ENUM8 {
kUnknown = 0;
kIsCharging = 1;
kIsAtFullCharge = 2;
kIsNotCharging = 3;
}

enum BatCommonDesignationEnum : ENUM16 {
kUnspecified = 0;
kAAA = 1;
kAA = 2;
kC = 3;
kD = 4;
k4v5 = 5;
k6v0 = 6;
k9v0 = 7;
k12AA = 8;
kAAAA = 9;
kA = 10;
kB = 11;
kF = 12;
kN = 13;
kNo6 = 14;
kSubC = 15;
kA23 = 16;
kA27 = 17;
kBA5800 = 18;
kDuplex = 19;
k4SR44 = 20;
k523 = 21;
k531 = 22;
k15v0 = 23;
k22v5 = 24;
k30v0 = 25;
k45v0 = 26;
k67v5 = 27;
kJ = 28;
kCR123A = 29;
kCR2 = 30;
k2CR5 = 31;
kCRP2 = 32;
kCRV3 = 33;
kSR41 = 34;
kSR43 = 35;
kSR44 = 36;
kSR45 = 37;
kSR48 = 38;
kSR54 = 39;
kSR55 = 40;
kSR57 = 41;
kSR58 = 42;
kSR59 = 43;
kSR60 = 44;
kSR63 = 45;
kSR64 = 46;
kSR65 = 47;
kSR66 = 48;
kSR67 = 49;
kSR68 = 50;
kSR69 = 51;
kSR516 = 52;
kSR731 = 53;
kSR712 = 54;
kLR932 = 55;
kA5 = 56;
kA10 = 57;
kA13 = 58;
kA312 = 59;
kA675 = 60;
kAC41E = 61;
k10180 = 62;
k10280 = 63;
k10440 = 64;
k14250 = 65;
k14430 = 66;
k14500 = 67;
k14650 = 68;
k15270 = 69;
k16340 = 70;
kRCR123A = 71;
k17500 = 72;
k17670 = 73;
k18350 = 74;
k18500 = 75;
k18650 = 76;
k19670 = 77;
k25500 = 78;
k26650 = 79;
k32600 = 80;
}

enum BatFaultEnum : ENUM8 {
kUnspecified = 0;
kOverTemp = 1;
kUnderTemp = 2;
}

enum BatReplaceabilityEnum : ENUM8 {
kUnspecified = 0;
kNotReplaceable = 1;
kUserReplaceable = 2;
kFactoryReplaceable = 3;
}

enum PowerSourceStatusEnum : ENUM8 {
kUnspecified = 0;
kActive = 1;
kStandby = 2;
kUnavailable = 3;
}

enum WiredCurrentTypeEnum : ENUM8 {
kAC = 0;
kDC = 1;
}

enum WiredFaultEnum : ENUM8 {
kUnspecified = 0;
kOverVoltage = 1;
kUnderVoltage = 2;
}

bitmap Feature : BITMAP32 {
kWired = 0x1;
kBattery = 0x2;
kRechargeable = 0x4;
kReplaceable = 0x8;
}

struct BatChargeFaultChangeType {
BatChargeFaultEnum current[] = 0;
BatChargeFaultEnum previous[] = 1;
}

struct BatFaultChangeType {
BatFaultEnum current[] = 0;
BatFaultEnum previous[] = 1;
}

struct WiredFaultChangeType {
WiredFaultEnum current[] = 0;
WiredFaultEnum previous[] = 1;
}

info event WiredFaultChange = 0 {
WiredFaultEnum current[] = 0;
WiredFaultEnum previous[] = 1;
}

info event BatFaultChange = 1 {
BatFaultEnum current[] = 0;
BatFaultEnum previous[] = 1;
}

info event BatChargeFaultChange = 2 {
BatChargeFaultEnum current[] = 0;
BatChargeFaultEnum previous[] = 1;
}

readonly attribute PowerSourceStatusEnum status = 0;
readonly attribute int8u order = 1;
readonly attribute char_string<60> description = 2;
readonly attribute nullable int32u wiredAssessedInputVoltage = 3;
readonly attribute nullable int16u wiredAssessedInputFrequency = 4;
readonly attribute WiredCurrentTypeEnum wiredCurrentType = 5;
readonly attribute nullable int32u wiredAssessedCurrent = 6;
readonly attribute int32u wiredNominalVoltage = 7;
readonly attribute int32u wiredMaximumCurrent = 8;
readonly attribute boolean wiredPresent = 9;
readonly attribute WiredFaultEnum activeWiredFaults[] = 10;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
readonly attribute attrib_id attributeList[] = 65531;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;
}

/** This cluster is used to manage global aspects of the Commissioning flow. */
server cluster GeneralCommissioning = 48 {
enum CommissioningErrorEnum : ENUM8 {
Expand Down Expand Up @@ -1994,6 +2241,8 @@ endpoint 0 {
}

server cluster AccessControl {
emits event AccessControlEntryChanged;
emits event AccessControlExtensionChanged;
callback attribute acl;
callback attribute extension;
callback attribute subjectsPerAccessControlEntry default = 4;
Expand Down Expand Up @@ -2052,6 +2301,16 @@ endpoint 0 {
ram attribute clusterRevision default = 1;
}

server cluster PowerSourceConfiguration {
callback attribute sources;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute eventList;
callback attribute attributeList;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 1;
}

server cluster GeneralCommissioning {
ram attribute breadcrumb default = 0x0000000000000000;
callback attribute basicCommissioningInfo;
Expand Down Expand Up @@ -2081,6 +2340,7 @@ endpoint 0 {
}

server cluster GeneralDiagnostics {
emits event BootReason;
callback attribute networkInterfaces;
callback attribute rebootCount default = 0x0000;
callback attribute upTime default = 0x0000000000000000;
Expand All @@ -2095,6 +2355,7 @@ endpoint 0 {
}

server cluster SoftwareDiagnostics {
emits event SoftwareFault;
callback attribute threadMetrics;
callback attribute currentHeapFree default = 0x0000000000000000;
callback attribute currentHeapUsed default = 0x0000000000000000;
Expand Down Expand Up @@ -2297,6 +2558,26 @@ endpoint 1 {
callback attribute clusterRevision default = 1;
}

server cluster PowerSource {
ram attribute status default = 0;
ram attribute order default = 0;
ram attribute description default = "USB";
ram attribute wiredAssessedInputVoltage;
ram attribute wiredAssessedInputFrequency;
ram attribute wiredCurrentType default = 1;
ram attribute wiredAssessedCurrent;
ram attribute wiredNominalVoltage default = 5000;
ram attribute wiredMaximumCurrent default = 1000;
ram attribute wiredPresent default = 1;
callback attribute activeWiredFaults;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute eventList;
callback attribute attributeList;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 1;
}

server cluster ColorControl {
persist attribute currentHue default = 0x00;
persist attribute currentSaturation default = 0x00;
Expand Down
Loading

0 comments on commit 2811f0a

Please sign in to comment.