Skip to content

Commit

Permalink
Updated Lighting App ZAP Files with Supported Events (project-chip#25025
Browse files Browse the repository at this point in the history
)

* Updated Lighting App ZAP Files with Supported Events

Fixed Test Script ZAP file:
  - Removed SoftwareFault event from the Software Diagnostics Cluster, which is
    not implemented for this app.
  - Removed all Thread Network Diagnostics Cluster events, which are currently
    not implemented in the SDK at all.

Added Supported Events to the Lighting App ZAP Example File

* ZAP REGEN
  • Loading branch information
emargolis authored and David Lechner committed Mar 22, 2023
1 parent 7bb4289 commit 888aad0
Show file tree
Hide file tree
Showing 4 changed files with 138 additions and 40 deletions.
15 changes: 15 additions & 0 deletions examples/lighting-app/lighting-common/lighting-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1846,6 +1846,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 @@ -1857,6 +1859,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 @@ -1882,6 +1887,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 @@ -1934,6 +1942,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 Down Expand Up @@ -2025,6 +2037,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
117 changes: 116 additions & 1 deletion examples/lighting-app/lighting-common/lighting-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -1130,6 +1130,22 @@
"maxInterval": 65534,
"reportableChange": 0
}
],
"events": [
{
"name": "AccessControlEntryChanged",
"code": 0,
"mfgCode": null,
"side": "server",
"included": 1
},
{
"name": "AccessControlExtensionChanged",
"code": 1,
"mfgCode": null,
"side": "server",
"included": 1
}
]
},
{
Expand Down Expand Up @@ -1518,6 +1534,29 @@
"maxInterval": 65344,
"reportableChange": 0
}
],
"events": [
{
"name": "StartUp",
"code": 0,
"mfgCode": null,
"side": "server",
"included": 1
},
{
"name": "ShutDown",
"code": 1,
"mfgCode": null,
"side": "server",
"included": 1
},
{
"name": "Leave",
"code": 2,
"mfgCode": null,
"side": "server",
"included": 1
}
]
},
{
Expand Down Expand Up @@ -1804,6 +1843,29 @@
"maxInterval": 65344,
"reportableChange": 0
}
],
"events": [
{
"name": "StateTransition",
"code": 0,
"mfgCode": null,
"side": "server",
"included": 1
},
{
"name": "VersionApplied",
"code": 1,
"mfgCode": null,
"side": "server",
"included": 1
},
{
"name": "DownloadError",
"code": 2,
"mfgCode": null,
"side": "server",
"included": 1
}
]
},
{
Expand Down Expand Up @@ -2796,6 +2858,36 @@
"maxInterval": 65344,
"reportableChange": 0
}
],
"events": [
{
"name": "HardwareFaultChange",
"code": 0,
"mfgCode": null,
"side": "server",
"included": 1
},
{
"name": "RadioFaultChange",
"code": 1,
"mfgCode": null,
"side": "server",
"included": 1
},
{
"name": "NetworkFaultChange",
"code": 2,
"mfgCode": null,
"side": "server",
"included": 1
},
{
"name": "BootReason",
"code": 3,
"mfgCode": null,
"side": "server",
"included": 1
}
]
},
{
Expand Down Expand Up @@ -4310,6 +4402,29 @@
"maxInterval": 65344,
"reportableChange": 0
}
],
"events": [
{
"name": "Disconnection",
"code": 0,
"mfgCode": null,
"side": "server",
"included": 1
},
{
"name": "AssociationFailure",
"code": 1,
"mfgCode": null,
"side": "server",
"included": 1
},
{
"name": "ConnectionStatus",
"code": 2,
"mfgCode": null,
"side": "server",
"included": 1
}
]
},
{
Expand Down Expand Up @@ -8228,4 +8343,4 @@
}
],
"log": []
}
}
25 changes: 0 additions & 25 deletions scripts/tools/zap/tests/inputs/lighting-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -3030,15 +3030,6 @@
"maxInterval": 65344,
"reportableChange": 0
}
],
"events": [
{
"name": "SoftwareFault",
"code": 0,
"mfgCode": null,
"side": "server",
"included": 1
}
]
},
{
Expand Down Expand Up @@ -4125,22 +4116,6 @@
"maxInterval": 65344,
"reportableChange": 0
}
],
"events": [
{
"name": "ConnectionStatus",
"code": 0,
"mfgCode": null,
"side": "server",
"included": 1
},
{
"name": "NetworkFaultChange",
"code": 1,
"mfgCode": null,
"side": "server",
"included": 1
}
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@
#define ZAP_GENERATED_COMMANDS_INDEX(index) (&generatedCommands[index])

// clang-format off
#define GENERATED_EVENT_COUNT 18
#define GENERATED_EVENT_COUNT 15
#define GENERATED_EVENTS { \
/* Endpoint: 0, Cluster: Access Control (server) */ \
/* EventList (index=0) */ \
Expand All @@ -571,15 +571,8 @@
0x00000001, /* RadioFaultChange */ \
0x00000002, /* NetworkFaultChange */ \
0x00000003, /* BootReason */ \
/* Endpoint: 0, Cluster: Software Diagnostics (server) */ \
/* EventList (index=12) */ \
0x00000000, /* SoftwareFault */ \
/* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \
/* EventList (index=13) */ \
0x00000000, /* ConnectionStatus */ \
0x00000001, /* NetworkFaultChange */ \
/* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \
/* EventList (index=15) */ \
/* EventList (index=12) */ \
0x00000000, /* Disconnection */ \
0x00000001, /* AssociationFailure */ \
0x00000002, /* ConnectionStatus */ \
Expand Down Expand Up @@ -963,8 +956,8 @@
.functions = NULL, \
.acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 39 ) ,\
.generatedCommandList = nullptr ,\
.eventList = ZAP_GENERATED_EVENTS_INDEX( 12 ), \
.eventCount = 1, \
.eventList = nullptr, \
.eventCount = 0, \
},\
{ \
/* Endpoint: 0, Cluster: Thread Network Diagnostics (server) */ \
Expand All @@ -976,8 +969,8 @@
.functions = NULL, \
.acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 41 ) ,\
.generatedCommandList = nullptr ,\
.eventList = ZAP_GENERATED_EVENTS_INDEX( 13 ), \
.eventCount = 2, \
.eventList = nullptr, \
.eventCount = 0, \
},\
{ \
/* Endpoint: 0, Cluster: WiFi Network Diagnostics (server) */ \
Expand All @@ -989,7 +982,7 @@
.functions = NULL, \
.acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 43 ) ,\
.generatedCommandList = nullptr ,\
.eventList = ZAP_GENERATED_EVENTS_INDEX( 15 ), \
.eventList = ZAP_GENERATED_EVENTS_INDEX( 12 ), \
.eventCount = 3, \
},\
{ \
Expand Down

0 comments on commit 888aad0

Please sign in to comment.