Skip to content

Commit

Permalink
Add event list information in .matter files (#24991)
Browse files Browse the repository at this point in the history
* Update matter idl to report emmited events

* Parsing support for emitted clusters

* Restyle

* zap regen all

* zap regen all

* Dummy bootstrap force version
  • Loading branch information
andy31415 authored and pull[bot] committed Jan 17, 2024
1 parent ad128b5 commit 2384258
Show file tree
Hide file tree
Showing 13 changed files with 180 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4297,6 +4297,8 @@ endpoint 0 {
}

server cluster AccessControl {
emits event AccessControlEntryChanged;
emits event AccessControlExtensionChanged;
callback attribute acl;
callback attribute extension;
callback attribute subjectsPerAccessControlEntry default = 4;
Expand All @@ -4307,6 +4309,9 @@ endpoint 0 {
}

server cluster BasicInformation {
emits event StartUp;
emits event ShutDown;
emits event Leave;
callback attribute dataModelRevision default = 10;
callback attribute vendorName;
callback attribute vendorID;
Expand All @@ -4332,6 +4337,9 @@ endpoint 0 {
}

server cluster OtaSoftwareUpdateRequestor {
emits event StateTransition;
emits event VersionApplied;
emits event DownloadError;
callback attribute defaultOTAProviders;
ram attribute updatePossible default = 1;
ram attribute updateState;
Expand Down Expand Up @@ -4410,6 +4418,10 @@ endpoint 0 {
}

server cluster GeneralDiagnostics {
emits event HardwareFaultChange;
emits event RadioFaultChange;
emits event NetworkFaultChange;
emits event BootReason;
callback attribute networkInterfaces;
callback attribute rebootCount;
callback attribute upTime;
Expand All @@ -4427,6 +4439,7 @@ endpoint 0 {
}

server cluster SoftwareDiagnostics {
emits event SoftwareFault;
callback attribute threadMetrics;
callback attribute currentHeapFree;
callback attribute currentHeapUsed;
Expand All @@ -4436,6 +4449,8 @@ endpoint 0 {
}

server cluster ThreadNetworkDiagnostics {
emits event ConnectionStatus;
emits event NetworkFaultChange;
callback attribute channel;
callback attribute routingRole;
callback attribute networkName;
Expand Down Expand Up @@ -4504,6 +4519,9 @@ endpoint 0 {
}

server cluster WiFiNetworkDiagnostics {
emits event Disconnection;
emits event AssociationFailure;
emits event ConnectionStatus;
callback attribute bssid;
callback attribute securityType;
callback attribute wiFiVersion;
Expand Down Expand Up @@ -4690,6 +4708,8 @@ endpoint 1 {
}

server cluster Actions {
emits event StateChanged;
emits event ActionFailed;
callback attribute actionList;
callback attribute endpointLists;
callback attribute setupURL;
Expand All @@ -4698,6 +4718,7 @@ endpoint 1 {
}

server cluster PowerSource {
emits event BatFaultChange;
ram attribute status;
ram attribute order default = 2;
ram attribute description default = "B2";
Expand All @@ -4709,6 +4730,7 @@ endpoint 1 {
}

server cluster Switch {
emits event SwitchLatched;
ram attribute numberOfPositions default = 2;
ram attribute currentPosition;
ram attribute multiPressMax default = 2;
Expand All @@ -4729,6 +4751,7 @@ endpoint 1 {
}

server cluster BooleanState {
emits event StateChange;
ram attribute stateValue;
ram attribute featureMap;
ram attribute clusterRevision default = 1;
Expand All @@ -4750,6 +4773,10 @@ endpoint 1 {
}

server cluster DoorLock {
emits event DoorLockAlarm;
emits event LockOperation;
emits event LockOperationError;
emits event LockUserChange;
ram attribute lockState default = 2;
ram attribute lockType;
ram attribute actuatorEnabled;
Expand Down Expand Up @@ -4825,6 +4852,18 @@ endpoint 1 {
}

server cluster PumpConfigurationAndControl {
emits event SupplyVoltageLow;
emits event SupplyVoltageHigh;
emits event PowerMissingPhase;
emits event SystemPressureLow;
emits event SystemPressureHigh;
emits event DryRunning;
emits event MotorTemperatureHigh;
emits event PumpMotorFatalFailure;
emits event ElectronicTemperatureHigh;
emits event PumpBlocked;
emits event SensorFailure;
emits event ElectronicNonFatalFailure;
ram attribute maxPressure;
ram attribute maxSpeed;
ram attribute maxFlow;
Expand Down Expand Up @@ -5131,6 +5170,8 @@ endpoint 1 {
}

server cluster UnitTesting {
emits event TestEvent;
emits event TestFabricScopedEvent;
ram attribute boolean;
ram attribute bitmap8;
ram attribute bitmap16;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3582,6 +3582,7 @@ endpoint 0 {
}

server cluster AccessControl {
emits event AccessControlEntryChanged;
callback attribute acl;
callback attribute subjectsPerAccessControlEntry default = 4;
callback attribute targetsPerAccessControlEntry default = 3;
Expand All @@ -3591,6 +3592,7 @@ endpoint 0 {
}

server cluster BasicInformation {
emits event StartUp;
callback attribute dataModelRevision default = 10;
callback attribute vendorName;
callback attribute vendorID;
Expand All @@ -3608,6 +3610,9 @@ endpoint 0 {
}

server cluster OtaSoftwareUpdateRequestor {
emits event StateTransition;
emits event VersionApplied;
emits event DownloadError;
callback attribute defaultOTAProviders;
ram attribute updatePossible default = 1;
ram attribute updateState;
Expand Down Expand Up @@ -3845,6 +3850,8 @@ endpoint 1 {
}

server cluster Actions {
emits event StateChanged;
emits event ActionFailed;
callback attribute actionList;
callback attribute endpointLists;
ram attribute featureMap;
Expand All @@ -3860,6 +3867,7 @@ endpoint 1 {
}

server cluster Switch {
emits event SwitchLatched;
ram attribute numberOfPositions default = 2;
ram attribute currentPosition;
ram attribute featureMap default = 1;
Expand All @@ -3879,6 +3887,7 @@ endpoint 1 {
}

server cluster BooleanState {
emits event StateChange;
ram attribute stateValue;
ram attribute featureMap;
ram attribute clusterRevision default = 1;
Expand All @@ -3897,6 +3906,9 @@ endpoint 1 {
}

server cluster DoorLock {
emits event DoorLockAlarm;
emits event LockOperation;
emits event LockOperationError;
ram attribute lockState default = 2;
ram attribute lockType;
ram attribute actuatorEnabled;
Expand Down Expand Up @@ -4102,6 +4114,8 @@ endpoint 1 {
}

server cluster UnitTesting {
emits event TestEvent;
emits event TestFabricScopedEvent;
ram attribute boolean;
ram attribute bitmap8;
ram attribute bitmap16;
Expand Down
10 changes: 10 additions & 0 deletions examples/bridge-app/bridge-common/bridge-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1533,6 +1533,7 @@ endpoint 0 {
}

server cluster AccessControl {
emits event AccessControlEntryChanged;
callback attribute acl;
callback attribute extension;
callback attribute subjectsPerAccessControlEntry default = 4;
Expand All @@ -1546,6 +1547,9 @@ endpoint 0 {
}

server cluster BasicInformation {
emits event StartUp;
emits event ShutDown;
emits event Leave;
callback attribute dataModelRevision default = 10;
callback attribute vendorName;
callback attribute vendorID;
Expand Down Expand Up @@ -1638,6 +1642,7 @@ endpoint 0 {
}

server cluster GeneralDiagnostics {
emits event BootReason;
callback attribute networkInterfaces;
callback attribute rebootCount;
callback attribute upTime;
Expand All @@ -1655,6 +1660,7 @@ endpoint 0 {
}

server cluster SoftwareDiagnostics {
emits event SoftwareFault;
callback attribute threadMetrics;
callback attribute currentHeapFree;
callback attribute currentHeapUsed;
Expand Down Expand Up @@ -1732,6 +1738,9 @@ endpoint 0 {
}

server cluster WiFiNetworkDiagnostics {
emits event Disconnection;
emits event AssociationFailure;
emits event ConnectionStatus;
callback attribute bssid;
callback attribute securityType;
callback attribute wiFiVersion;
Expand Down Expand Up @@ -1833,6 +1842,7 @@ endpoint 1 {
}

server cluster Actions {
emits event StateChanged;
callback attribute actionList;
callback attribute endpointLists;
ram attribute setupURL default = "https://example.com";
Expand Down
9 changes: 9 additions & 0 deletions examples/lighting-app/nxp/zap/lighting-on-off.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1256,6 +1256,8 @@ endpoint 0 {
}

server cluster AccessControl {
emits event AccessControlEntryChanged;
emits event AccessControlExtensionChanged;
callback attribute acl;
callback attribute subjectsPerAccessControlEntry default = 4;
callback attribute targetsPerAccessControlEntry default = 3;
Expand All @@ -1266,6 +1268,9 @@ endpoint 0 {
}

server cluster BasicInformation {
emits event StartUp;
emits event ShutDown;
emits event Leave;
callback attribute dataModelRevision default = 10;
callback attribute vendorName;
callback attribute vendorID;
Expand All @@ -1283,6 +1288,9 @@ endpoint 0 {
}

server cluster OtaSoftwareUpdateRequestor {
emits event StateTransition;
emits event VersionApplied;
emits event DownloadError;
callback attribute defaultOTAProviders;
ram attribute updatePossible default = 1;
ram attribute updateState;
Expand Down Expand Up @@ -1315,6 +1323,7 @@ endpoint 0 {
}

server cluster GeneralDiagnostics {
emits event BootReason;
callback attribute networkInterfaces;
callback attribute rebootCount;
callback attribute testEventTriggersEnabled;
Expand Down
24 changes: 24 additions & 0 deletions examples/lock-app/lock-common/lock-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -2008,6 +2008,8 @@ endpoint 0 {
}

server cluster AccessControl {
emits event AccessControlEntryChanged;
emits event AccessControlExtensionChanged;
callback attribute acl;
callback attribute extension;
callback attribute subjectsPerAccessControlEntry default = 4;
Expand All @@ -2019,6 +2021,9 @@ endpoint 0 {
}

server cluster BasicInformation {
emits event StartUp;
emits event ShutDown;
emits event Leave;
callback attribute dataModelRevision default = 10;
callback attribute vendorName;
callback attribute vendorID;
Expand All @@ -2044,6 +2049,9 @@ endpoint 0 {
}

server cluster OtaSoftwareUpdateRequestor {
emits event StateTransition;
emits event VersionApplied;
emits event DownloadError;
callback attribute defaultOTAProviders;
ram attribute updatePossible default = 1;
ram attribute updateState;
Expand Down Expand Up @@ -2074,6 +2082,7 @@ endpoint 0 {
}

server cluster PowerSource {
emits event WiredFaultChange;
ram attribute status default = 1;
ram attribute order;
ram attribute description default = "USB";
Expand Down Expand Up @@ -2111,6 +2120,10 @@ endpoint 0 {
}

server cluster GeneralDiagnostics {
emits event HardwareFaultChange;
emits event RadioFaultChange;
emits event NetworkFaultChange;
emits event BootReason;
callback attribute networkInterfaces;
callback attribute rebootCount;
callback attribute upTime;
Expand All @@ -2125,6 +2138,7 @@ endpoint 0 {
}

server cluster SoftwareDiagnostics {
emits event SoftwareFault;
callback attribute threadMetrics;
callback attribute currentHeapFree;
callback attribute currentHeapUsed;
Expand All @@ -2134,6 +2148,8 @@ endpoint 0 {
}

server cluster ThreadNetworkDiagnostics {
emits event ConnectionStatus;
emits event NetworkFaultChange;
callback attribute channel;
callback attribute routingRole;
callback attribute networkName;
Expand Down Expand Up @@ -2202,6 +2218,9 @@ endpoint 0 {
}

server cluster WiFiNetworkDiagnostics {
emits event Disconnection;
emits event AssociationFailure;
emits event ConnectionStatus;
callback attribute bssid;
callback attribute securityType;
callback attribute wiFiVersion;
Expand Down Expand Up @@ -2315,6 +2334,11 @@ endpoint 1 {
}

server cluster DoorLock {
emits event DoorLockAlarm;
emits event DoorStateChange;
emits event LockOperation;
emits event LockOperationError;
emits event LockUserChange;
persist attribute lockState default = 1;
ram attribute lockType;
ram attribute actuatorEnabled;
Expand Down
Loading

0 comments on commit 2384258

Please sign in to comment.