Skip to content

Commit

Permalink
Update zapfile_formatter to also check for mandatory commands (#19005)
Browse files Browse the repository at this point in the history
* Update zapfile_formatter to also check for manditory commands

Check for TestEventTriggersEnabled attribute exists, and check for
TestEventTrigger command.

* regen files from zap

* Update TestEventTrigger command to be server instead of client

* Minor fix to zapfile_formatter

* regen from zap file
  • Loading branch information
tehampson authored Jun 1, 2022
1 parent 76089ee commit 9179d31
Show file tree
Hide file tree
Showing 56 changed files with 1,978 additions and 829 deletions.
22 changes: 11 additions & 11 deletions examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -3339,16 +3339,7 @@
"define": "GENERAL_DIAGNOSTICS_CLUSTER",
"side": "client",
"enabled": 0,
"commands": [
{
"name": "TestEventTrigger",
"code": 0,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 0
}
],
"commands": [],
"attributes": [
{
"name": "ClusterRevision",
Expand All @@ -3375,7 +3366,16 @@
"define": "GENERAL_DIAGNOSTICS_CLUSTER",
"side": "server",
"enabled": 1,
"commands": [],
"commands": [
{
"name": "TestEventTrigger",
"code": 0,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 0
}
],
"attributes": [
{
"name": "NetworkInterfaces",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3339,16 +3339,7 @@
"define": "GENERAL_DIAGNOSTICS_CLUSTER",
"side": "client",
"enabled": 0,
"commands": [
{
"name": "TestEventTrigger",
"code": 0,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 0
}
],
"commands": [],
"attributes": [
{
"name": "ClusterRevision",
Expand All @@ -3375,7 +3366,16 @@
"define": "GENERAL_DIAGNOSTICS_CLUSTER",
"side": "server",
"enabled": 1,
"commands": [],
"commands": [
{
"name": "TestEventTrigger",
"code": 0,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 0
}
],
"attributes": [
{
"name": "NetworkInterfaces",
Expand Down
9 changes: 9 additions & 0 deletions examples/bridge-app/bridge-common/bridge-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -443,8 +443,16 @@ server cluster GeneralDiagnostics = 51 {
readonly attribute ENUM8 activeHardwareFaults[] = 5;
readonly attribute ENUM8 activeRadioFaults[] = 6;
readonly attribute ENUM8 activeNetworkFaults[] = 7;
readonly attribute boolean testEventTriggersEnabled = 8;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

request struct TestEventTriggerRequest {
OCTET_STRING enableKey = 0;
INT64U eventTrigger = 1;
}

command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0;
}

server cluster LevelControl = 8 {
Expand Down Expand Up @@ -1252,6 +1260,7 @@ endpoint 0 {
callback attribute activeHardwareFaults;
callback attribute activeRadioFaults;
callback attribute activeNetworkFaults;
callback attribute testEventTriggersEnabled;
ram attribute featureMap;
ram attribute clusterRevision default = 1;
}
Expand Down
27 changes: 26 additions & 1 deletion examples/bridge-app/bridge-common/bridge-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -1555,7 +1555,16 @@
"define": "GENERAL_DIAGNOSTICS_CLUSTER",
"side": "server",
"enabled": 1,
"commands": [],
"commands": [
{
"name": "TestEventTrigger",
"code": 0,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 0
}
],
"attributes": [
{
"name": "NetworkInterfaces",
Expand Down Expand Up @@ -1685,6 +1694,22 @@
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "TestEventTriggersEnabled",
"code": 8,
"mfgCode": null,
"side": "server",
"type": "boolean",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "false",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "FeatureMap",
"code": 65532,
Expand Down
27 changes: 26 additions & 1 deletion examples/chef/devices/lighting-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -2613,7 +2613,16 @@
"define": "GENERAL_DIAGNOSTICS_CLUSTER",
"side": "server",
"enabled": 1,
"commands": [],
"commands": [
{
"name": "TestEventTrigger",
"code": 0,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 0
}
],
"attributes": [
{
"name": "NetworkInterfaces",
Expand Down Expand Up @@ -2743,6 +2752,22 @@
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "TestEventTriggersEnabled",
"code": 8,
"mfgCode": null,
"side": "server",
"type": "boolean",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "false",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "FeatureMap",
"code": 65532,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -629,8 +629,16 @@ server cluster GeneralDiagnostics = 51 {
readonly attribute ENUM8 activeHardwareFaults[] = 5;
readonly attribute ENUM8 activeRadioFaults[] = 6;
readonly attribute ENUM8 activeNetworkFaults[] = 7;
readonly attribute boolean testEventTriggersEnabled = 8;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

request struct TestEventTriggerRequest {
OCTET_STRING enableKey = 0;
INT64U eventTrigger = 1;
}

command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0;
}

server cluster GroupKeyManagement = 63 {
Expand Down Expand Up @@ -1790,6 +1798,7 @@ endpoint 0 {
callback attribute activeHardwareFaults;
callback attribute activeRadioFaults;
callback attribute activeNetworkFaults;
callback attribute testEventTriggersEnabled;
ram attribute featureMap;
ram attribute clusterRevision default = 1;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2612,7 +2612,16 @@
"define": "GENERAL_DIAGNOSTICS_CLUSTER",
"side": "server",
"enabled": 1,
"commands": [],
"commands": [
{
"name": "TestEventTrigger",
"code": 0,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 0
}
],
"attributes": [
{
"name": "NetworkInterfaces",
Expand Down Expand Up @@ -2742,6 +2751,22 @@
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "TestEventTriggersEnabled",
"code": 8,
"mfgCode": null,
"side": "server",
"type": "boolean",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "false",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "FeatureMap",
"code": 65532,
Expand Down
9 changes: 9 additions & 0 deletions examples/lighting-app/lighting-common/lighting-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -642,8 +642,16 @@ server cluster GeneralDiagnostics = 51 {
readonly attribute ENUM8 activeHardwareFaults[] = 5;
readonly attribute ENUM8 activeRadioFaults[] = 6;
readonly attribute ENUM8 activeNetworkFaults[] = 7;
readonly attribute boolean testEventTriggersEnabled = 8;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

request struct TestEventTriggerRequest {
OCTET_STRING enableKey = 0;
INT64U eventTrigger = 1;
}

command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0;
}

server cluster GroupKeyManagement = 63 {
Expand Down Expand Up @@ -1772,6 +1780,7 @@ endpoint 0 {
callback attribute activeHardwareFaults;
callback attribute activeRadioFaults;
callback attribute activeNetworkFaults;
callback attribute testEventTriggersEnabled;
ram attribute featureMap;
ram attribute clusterRevision default = 1;
}
Expand Down
27 changes: 26 additions & 1 deletion examples/lighting-app/lighting-common/lighting-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -2629,7 +2629,16 @@
"define": "GENERAL_DIAGNOSTICS_CLUSTER",
"side": "server",
"enabled": 1,
"commands": [],
"commands": [
{
"name": "TestEventTrigger",
"code": 0,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 0
}
],
"attributes": [
{
"name": "NetworkInterfaces",
Expand Down Expand Up @@ -2759,6 +2768,22 @@
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "TestEventTriggersEnabled",
"code": 8,
"mfgCode": null,
"side": "server",
"type": "boolean",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "false",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "FeatureMap",
"code": 65532,
Expand Down
9 changes: 9 additions & 0 deletions examples/lock-app/lock-common/lock-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -962,8 +962,16 @@ server cluster GeneralDiagnostics = 51 {
readonly attribute ENUM8 activeHardwareFaults[] = 5;
readonly attribute ENUM8 activeRadioFaults[] = 6;
readonly attribute ENUM8 activeNetworkFaults[] = 7;
readonly attribute boolean testEventTriggersEnabled = 8;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;

request struct TestEventTriggerRequest {
OCTET_STRING enableKey = 0;
INT64U eventTrigger = 1;
}

command TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0;
}

server cluster Groups = 4 {
Expand Down Expand Up @@ -1967,6 +1975,7 @@ endpoint 0 {
callback attribute activeHardwareFaults;
callback attribute activeRadioFaults;
callback attribute activeNetworkFaults;
callback attribute testEventTriggersEnabled;
ram attribute featureMap;
ram attribute clusterRevision default = 1;
}
Expand Down
27 changes: 26 additions & 1 deletion examples/lock-app/lock-common/lock-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -2797,7 +2797,16 @@
"define": "GENERAL_DIAGNOSTICS_CLUSTER",
"side": "server",
"enabled": 1,
"commands": [],
"commands": [
{
"name": "TestEventTrigger",
"code": 0,
"mfgCode": null,
"source": "client",
"incoming": 1,
"outgoing": 0
}
],
"attributes": [
{
"name": "NetworkInterfaces",
Expand Down Expand Up @@ -2927,6 +2936,22 @@
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "TestEventTriggersEnabled",
"code": 8,
"mfgCode": null,
"side": "server",
"type": "boolean",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "false",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "FeatureMap",
"code": 65532,
Expand Down
Loading

0 comments on commit 9179d31

Please sign in to comment.