Skip to content

Commit

Permalink
Remove illegal Identify clusters from examples (#35575)
Browse files Browse the repository at this point in the history
* Remove illegal Identify clusters from examples

Problem:
- Many examples have the Identify cluster on endpoint 0
  and this is not useful or legal. The Identify cluster
  has to be on a simple endpoint.

This PR:
- Removes the identify clusters in the wrong places
  (verified they are elsewhere where required)
- Adds a lint rule that EP0 can't have Identify
- Fixes YAML test that expected Identify on EP0
  to use EP1 available in all examples.

Testing done:
- Integration tests still pass
- New lint rule failed before PR, passes now

* Fix CI

* Update PairOnNetworkLongImInvokeCommand.kt

* Update PairOnNetworkLongImInvokeCommand.kt

* Update PairOnNetworkLongImInvokeCommand.kt

* Update PairOnNetworkLongImInvokeCommand.kt

* fix java/kotlin style

---------

Co-authored-by: yunhanw-google <[email protected]>
  • Loading branch information
tcarmelveilleux and yunhanw-google authored Sep 16, 2024
1 parent ba9faf2 commit 9de3c6b
Show file tree
Hide file tree
Showing 37 changed files with 317 additions and 2,034 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7798,16 +7798,6 @@ endpoint 0 {

binding cluster OtaSoftwareUpdateProvider;

server cluster Identify {
ram attribute identifyTime default = 0x0000;
ram attribute identifyType default = 0x0;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 4;

handle command Identify;
handle command TriggerEffect;
}

server cluster Groups {
ram attribute nameSupport;
ram attribute featureMap default = 0;
Expand Down
92 changes: 0 additions & 92 deletions examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -69,98 +69,6 @@
"deviceTypeCode": 17,
"deviceTypeProfileId": 259,
"clusters": [
{
"name": "Identify",
"code": 3,
"mfgCode": null,
"define": "IDENTIFY_CLUSTER",
"side": "server",
"enabled": 1,
"commands": [
{
"name": "Identify",
"code": 0,
"mfgCode": null,
"source": "client",
"isIncoming": 1,
"isEnabled": 1
},
{
"name": "TriggerEffect",
"code": 64,
"mfgCode": null,
"source": "client",
"isIncoming": 1,
"isEnabled": 1
}
],
"attributes": [
{
"name": "IdentifyTime",
"code": 0,
"mfgCode": null,
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x0000",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "IdentifyType",
"code": 1,
"mfgCode": null,
"side": "server",
"type": "IdentifyTypeEnum",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x0",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "FeatureMap",
"code": 65532,
"mfgCode": null,
"side": "server",
"type": "bitmap32",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ClusterRevision",
"code": 65533,
"mfgCode": null,
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "4",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
}
]
},
{
"name": "Groups",
"code": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6242,15 +6242,6 @@ endpoint 0 {

binding cluster OtaSoftwareUpdateProvider;

server cluster Identify {
ram attribute identifyTime default = 0x0000;
ram attribute identifyType default = 0x0;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 4;

handle command Identify;
}

server cluster Groups {
ram attribute nameSupport;
ram attribute featureMap default = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,90 +69,6 @@
"deviceTypeCode": 17,
"deviceTypeProfileId": 259,
"clusters": [
{
"name": "Identify",
"code": 3,
"mfgCode": null,
"define": "IDENTIFY_CLUSTER",
"side": "server",
"enabled": 1,
"commands": [
{
"name": "Identify",
"code": 0,
"mfgCode": null,
"source": "client",
"isIncoming": 1,
"isEnabled": 1
}
],
"attributes": [
{
"name": "IdentifyTime",
"code": 0,
"mfgCode": null,
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x0000",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "IdentifyType",
"code": 1,
"mfgCode": null,
"side": "server",
"type": "IdentifyTypeEnum",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x0",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "FeatureMap",
"code": 65532,
"mfgCode": null,
"side": "server",
"type": "bitmap32",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ClusterRevision",
"code": 65533,
"mfgCode": null,
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "4",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
}
]
},
{
"name": "Groups",
"code": 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3594,4 +3594,4 @@
"parentEndpointIdentifier": null
}
]
}
}
10 changes: 0 additions & 10 deletions examples/chef/devices/rootnode_dishwasher_cc105034fe.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1368,16 +1368,6 @@ endpoint 0 {
device type ma_rootdevice = 22, version 1;


server cluster Identify {
ram attribute identifyTime default = 0x0000;
ram attribute identifyType default = 0x00;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 4;

handle command Identify;
handle command TriggerEffect;
}

server cluster Descriptor {
callback attribute deviceTypeList;
callback attribute serverList;
Expand Down
92 changes: 0 additions & 92 deletions examples/chef/devices/rootnode_dishwasher_cc105034fe.zap
Original file line number Diff line number Diff line change
Expand Up @@ -61,98 +61,6 @@
"deviceTypeCode": 22,
"deviceTypeProfileId": 259,
"clusters": [
{
"name": "Identify",
"code": 3,
"mfgCode": null,
"define": "IDENTIFY_CLUSTER",
"side": "server",
"enabled": 1,
"commands": [
{
"name": "Identify",
"code": 0,
"mfgCode": null,
"source": "client",
"isIncoming": 1,
"isEnabled": 1
},
{
"name": "TriggerEffect",
"code": 64,
"mfgCode": null,
"source": "client",
"isIncoming": 1,
"isEnabled": 1
}
],
"attributes": [
{
"name": "IdentifyTime",
"code": 0,
"mfgCode": null,
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x0000",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "IdentifyType",
"code": 1,
"mfgCode": null,
"side": "server",
"type": "IdentifyTypeEnum",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x00",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "FeatureMap",
"code": 65532,
"mfgCode": null,
"side": "server",
"type": "bitmap32",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ClusterRevision",
"code": 65533,
"mfgCode": null,
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "4",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
}
]
},
{
"name": "Descriptor",
"code": 29,
Expand Down
Loading

0 comments on commit 9de3c6b

Please sign in to comment.