Skip to content

Commit

Permalink
Fix linter errors for mandatory attributes in chef zap files (#26396)
Browse files Browse the repository at this point in the history
* Fix contactsensor

* Fix onoffplug

* Automated fix for all the other zap files + manual fix for heatingcooling and extendedcolorlight

---------

Co-authored-by: Andrei Litvin <andreilitvin@google.com>
  • Loading branch information
2 people authored and pull[bot] committed Jul 18, 2023
1 parent 0060047 commit 1090188
Show file tree
Hide file tree
Showing 33 changed files with 2,321 additions and 26 deletions.
16 changes: 0 additions & 16 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,22 +79,6 @@ jobs:
# https://github.com/project-chip/connectedhomeip/issues/19169
# https://github.com/project-chip/connectedhomeip/issues/22640
if [ "$idl_file" = './examples/all-clusters-app/all-clusters-common/all-clusters-app.matter' ]; then continue; fi
if [ "$idl_file" = './examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter' ]; then continue; fi
if [ "$idl_file" = './examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter' ]; then continue; fi
if [ "$idl_file" = './examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter' ]; then continue; fi
if [ "$idl_file" = './examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter' ]; then continue; fi
if [ "$idl_file" = './examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter' ]; then continue; fi
if [ "$idl_file" = './examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter' ]; then continue; fi
if [ "$idl_file" = './examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter' ]; then continue; fi
if [ "$idl_file" = './examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter' ]; then continue; fi
if [ "$idl_file" = './examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter' ]; then continue; fi
if [ "$idl_file" = './examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter' ]; then continue; fi
if [ "$idl_file" = './examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter' ]; then continue; fi
if [ "$idl_file" = './examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter' ]; then continue; fi
if [ "$idl_file" = './examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter' ]; then continue; fi
if [ "$idl_file" = './examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter' ]; then continue; fi
if [ "$idl_file" = './examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter' ]; then continue; fi
if [ "$idl_file" = './examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter' ]; then continue; fi
if [ "$idl_file" = './examples/log-source-app/log-source-common/log-source-app.matter' ]; then continue; fi
if [ "$idl_file" = './examples/placeholder/linux/apps/app1/config.matter' ]; then continue; fi
if [ "$idl_file" = './examples/placeholder/linux/apps/app2/config.matter' ]; then continue; fi
Expand Down
16 changes: 16 additions & 0 deletions examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,9 @@ server cluster AccessControl = 31 {

attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0;
attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1;
readonly attribute int16u subjectsPerAccessControlEntry = 2;
readonly attribute int16u targetsPerAccessControlEntry = 3;
readonly attribute int16u accessControlEntriesPerFabric = 4;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down Expand Up @@ -305,6 +308,7 @@ server cluster BasicInformation = 40 {
attribute access(write: manage) boolean localConfigDisabled = 16;
readonly attribute boolean reachable = 17;
readonly attribute char_string<32> uniqueID = 18;
readonly attribute CapabilityMinimaStruct capabilityMinima = 19;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down Expand Up @@ -467,6 +471,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 {
standards. As such, Nodes that visually or audibly convey information need a mechanism by which
they can be configured to use a user’s preferred language, units, etc */
server cluster LocalizationConfiguration = 43 {
attribute char_string<35> activeLocale = 0;
readonly attribute CHAR_STRING supportedLocales[] = 1;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
Expand Down Expand Up @@ -537,6 +542,7 @@ server cluster GeneralCommissioning = 48 {
readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1;
readonly attribute RegulatoryLocationType regulatoryConfig = 2;
readonly attribute RegulatoryLocationType locationCapability = 3;
readonly attribute boolean supportsConcurrentConnection = 4;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down Expand Up @@ -932,6 +938,8 @@ server cluster Switch = 59 {
INT8U totalNumberOfPressesCounted = 1;
}

readonly attribute int8u numberOfPositions = 0;
readonly attribute int8u currentPosition = 1;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down Expand Up @@ -1225,6 +1233,9 @@ endpoint 0 {
emits event AccessControlExtensionChanged;
callback attribute acl;
callback attribute extension;
callback attribute subjectsPerAccessControlEntry;
callback attribute targetsPerAccessControlEntry;
callback attribute accessControlEntriesPerFabric;
callback attribute attributeList;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 1;
Expand Down Expand Up @@ -1253,6 +1264,7 @@ endpoint 0 {
persist attribute localConfigDisabled default = 0;
ram attribute reachable default = 1;
callback attribute uniqueID;
callback attribute capabilityMinima;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 1;
}
Expand All @@ -1270,6 +1282,7 @@ endpoint 0 {
}

server cluster LocalizationConfiguration {
ram attribute activeLocale;
callback attribute supportedLocales;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 1;
Expand All @@ -1288,6 +1301,7 @@ endpoint 0 {
callback attribute basicCommissioningInfo;
callback attribute regulatoryConfig default = 0;
callback attribute locationCapability default = 0;
callback attribute supportsConcurrentConnection default = 1;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 0x0001;
}
Expand Down Expand Up @@ -1335,6 +1349,8 @@ endpoint 0 {
}

server cluster Switch {
ram attribute numberOfPositions default = 2;
ram attribute currentPosition;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 1;
}
Expand Down
133 changes: 131 additions & 2 deletions examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"featureLevel": 92,
"featureLevel": 96,
"creator": "zap",
"keyValuePairs": [
{
Expand Down Expand Up @@ -1034,6 +1034,54 @@
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "SubjectsPerAccessControlEntry",
"code": 2,
"mfgCode": null,
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "TargetsPerAccessControlEntry",
"code": 3,
"mfgCode": null,
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "AccessControlEntriesPerFabric",
"code": 4,
"mfgCode": null,
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "AttributeList",
"code": 65531,
Expand Down Expand Up @@ -1438,6 +1486,22 @@
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "CapabilityMinima",
"code": 19,
"mfgCode": null,
"side": "server",
"type": "CapabilityMinimaStruct",
"included": 1,
"storageOption": "RAM",
"singleton": 1,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "FeatureMap",
"code": 65532,
Expand Down Expand Up @@ -1820,6 +1884,22 @@
"side": "server",
"enabled": 1,
"attributes": [
{
"name": "ActiveLocale",
"code": 0,
"mfgCode": null,
"side": "server",
"type": "char_string",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "SupportedLocales",
"code": 1,
Expand Down Expand Up @@ -2184,6 +2264,22 @@
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "SupportsConcurrentConnection",
"code": 4,
"mfgCode": null,
"side": "server",
"type": "boolean",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "1",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "FeatureMap",
"code": 65532,
Expand Down Expand Up @@ -4525,6 +4621,38 @@
"side": "server",
"enabled": 1,
"attributes": [
{
"name": "NumberOfPositions",
"code": 0,
"mfgCode": null,
"side": "server",
"type": "int8u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "2",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "CurrentPosition",
"code": 1,
"mfgCode": null,
"side": "server",
"type": "int8u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "FeatureMap",
"code": 65532,
Expand Down Expand Up @@ -6191,5 +6319,6 @@
"endpointVersion": 1,
"deviceIdentifier": 21
}
]
],
"log": []
}
16 changes: 16 additions & 0 deletions examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,9 @@ server cluster AccessControl = 31 {

attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0;
attribute access(read: administer, write: administer) AccessControlExtensionStruct extension[] = 1;
readonly attribute int16u subjectsPerAccessControlEntry = 2;
readonly attribute int16u targetsPerAccessControlEntry = 3;
readonly attribute int16u accessControlEntriesPerFabric = 4;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down Expand Up @@ -305,6 +308,7 @@ server cluster BasicInformation = 40 {
attribute access(write: manage) boolean localConfigDisabled = 16;
readonly attribute boolean reachable = 17;
readonly attribute char_string<32> uniqueID = 18;
readonly attribute CapabilityMinimaStruct capabilityMinima = 19;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down Expand Up @@ -467,6 +471,7 @@ server cluster OtaSoftwareUpdateRequestor = 42 {
standards. As such, Nodes that visually or audibly convey information need a mechanism by which
they can be configured to use a user’s preferred language, units, etc */
server cluster LocalizationConfiguration = 43 {
attribute char_string<35> activeLocale = 0;
readonly attribute CHAR_STRING supportedLocales[] = 1;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
Expand Down Expand Up @@ -537,6 +542,7 @@ server cluster GeneralCommissioning = 48 {
readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1;
readonly attribute RegulatoryLocationType regulatoryConfig = 2;
readonly attribute RegulatoryLocationType locationCapability = 3;
readonly attribute boolean supportsConcurrentConnection = 4;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down Expand Up @@ -932,6 +938,8 @@ server cluster Switch = 59 {
INT8U totalNumberOfPressesCounted = 1;
}

readonly attribute int8u numberOfPositions = 0;
readonly attribute int8u currentPosition = 1;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down Expand Up @@ -1693,6 +1701,9 @@ endpoint 0 {
emits event AccessControlExtensionChanged;
callback attribute acl;
callback attribute extension;
callback attribute subjectsPerAccessControlEntry;
callback attribute targetsPerAccessControlEntry;
callback attribute accessControlEntriesPerFabric;
callback attribute attributeList;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 1;
Expand Down Expand Up @@ -1721,6 +1732,7 @@ endpoint 0 {
persist attribute localConfigDisabled default = 0;
ram attribute reachable default = 1;
callback attribute uniqueID;
callback attribute capabilityMinima;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 1;
}
Expand All @@ -1738,6 +1750,7 @@ endpoint 0 {
}

server cluster LocalizationConfiguration {
ram attribute activeLocale;
callback attribute supportedLocales;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 1;
Expand All @@ -1756,6 +1769,7 @@ endpoint 0 {
callback attribute basicCommissioningInfo;
callback attribute regulatoryConfig default = 0;
callback attribute locationCapability default = 0;
callback attribute supportsConcurrentConnection default = 1;
ram attribute featureMap default = 6;
ram attribute clusterRevision default = 0x0001;
}
Expand Down Expand Up @@ -1803,6 +1817,8 @@ endpoint 0 {
}

server cluster Switch {
ram attribute numberOfPositions default = 2;
ram attribute currentPosition;
ram attribute featureMap default = 0;
ram attribute clusterRevision default = 1;
}
Expand Down
Loading

0 comments on commit 1090188

Please sign in to comment.