Skip to content

Commit

Permalink
[Scenes] Enabling TableSize feature (#29762)
Browse files Browse the repository at this point in the history
* Added the TableSize bit to the Scenes feature map and ensured the
ScenesTableImpl would get the value from zap

* Updated Fabric capacity rule to apply less than half of SceneTableSize and adapted the tests

* Generated Zap

* Adapted the tests to handle new Capacity in spec and regenerated Darwin tests

* Attempt to fix signedness error on Darwin CI

* Restyled by prettier-yaml

---------

Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
2 people authored and pull[bot] committed Oct 25, 2023
1 parent 0f6e7e5 commit 1009076
Show file tree
Hide file tree
Showing 31 changed files with 555 additions and 1,476 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6236,7 +6236,7 @@ endpoint 1 {
callback attribute acceptedCommandList;
callback attribute eventList;
callback attribute attributeList;
ram attribute featureMap default = 3;
ram attribute featureMap default = 7;
ram attribute clusterRevision default = 5;

handle command AddScene;
Expand Down Expand Up @@ -7379,7 +7379,7 @@ endpoint 2 {
callback attribute acceptedCommandList;
callback attribute eventList;
callback attribute attributeList;
ram attribute featureMap default = 3;
ram attribute featureMap default = 7;
ram attribute clusterRevision default = 5;

handle command AddScene;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6998,7 +6998,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "3",
"defaultValue": "7",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down Expand Up @@ -21300,7 +21300,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "3",
"defaultValue": "7",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4377,7 +4377,7 @@ endpoint 1 {
callback attribute acceptedCommandList;
callback attribute eventList;
callback attribute attributeList;
ram attribute featureMap default = 3;
ram attribute featureMap default = 7;
ram attribute clusterRevision default = 5;

handle command AddScene;
Expand Down Expand Up @@ -4940,7 +4940,7 @@ endpoint 2 {
callback attribute acceptedCommandList;
callback attribute eventList;
callback attribute attributeList;
ram attribute featureMap default = 3;
ram attribute featureMap default = 7;
ram attribute clusterRevision default = 5;

handle command AddScene;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,19 @@
}
],
"package": [
{
"pathRelativity": "relativeToZap",
"path": "../../../src/app/zap-templates/app-templates.json",
"type": "gen-templates-json",
"version": "chip-v1"
},
{
"pathRelativity": "relativeToZap",
"path": "../../../src/app/zap-templates/zcl/zcl.json",
"type": "zcl-properties",
"category": "matter",
"version": 1,
"description": "Matter SDK ZCL data"
},
{
"pathRelativity": "relativeToZap",
"path": "../../../src/app/zap-templates/app-templates.json",
"type": "gen-templates-json",
"version": "chip-v1"
}
],
"endpointTypes": [
Expand Down Expand Up @@ -4802,7 +4802,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "3",
"defaultValue": "7",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down Expand Up @@ -11082,7 +11082,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "3",
"defaultValue": "7",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down
4 changes: 3 additions & 1 deletion examples/darwin-framework-tool/templates/tests/ciTests.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@
"Test_TC_TCTL_2_1",
"Disabled because darwin-framework-tool does not support constraints arithmetic operations",
"Test_TC_FLW_2_1",
"Test_TC_RH_2_1"
"Test_TC_RH_2_1",
"Disabled because darwin-framework-tool does not handle substraction in parameters",
"Test_TC_S_2_3"
]
}
2 changes: 1 addition & 1 deletion examples/lighting-app/lighting-common/lighting-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -2483,7 +2483,7 @@ endpoint 1 {
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute attributeList;
ram attribute featureMap default = 3;
ram attribute featureMap default = 7;
ram attribute clusterRevision default = 5;

handle command AddScene;
Expand Down
4 changes: 2 additions & 2 deletions examples/lighting-app/lighting-common/lighting-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -4701,7 +4701,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "3",
"defaultValue": "7",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down Expand Up @@ -5976,4 +5976,4 @@
"networkId": 0
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2500,7 +2500,7 @@ endpoint 1 {
callback attribute acceptedCommandList;
callback attribute eventList;
callback attribute attributeList;
ram attribute featureMap default = 3;
ram attribute featureMap default = 7;
ram attribute clusterRevision default = 5;

handle command AddScene;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4257,7 +4257,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "3",
"defaultValue": "7",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down Expand Up @@ -5916,4 +5916,4 @@
"networkId": 0
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2340,7 +2340,7 @@ endpoint 1 {
callback attribute acceptedCommandList;
callback attribute eventList;
callback attribute attributeList;
ram attribute featureMap default = 3;
ram attribute featureMap default = 7;
ram attribute clusterRevision default = 5;

handle command AddScene;
Expand Down
4 changes: 2 additions & 2 deletions examples/lighting-app/silabs/data_model/lighting-wifi-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -3433,7 +3433,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "3",
"defaultValue": "7",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down Expand Up @@ -5092,4 +5092,4 @@
"networkId": 0
}
]
}
}
6 changes: 5 additions & 1 deletion examples/placeholder/linux/apps/app1/config.matter
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ provisional server cluster Scenes = 5 {
readonly attribute group_id currentGroup = 2;
readonly attribute boolean sceneValid = 3;
readonly attribute bitmap8 nameSupport = 4;
readonly attribute int16u sceneTableSize = 6;
readonly attribute int8u remainingCapacity = 7;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down Expand Up @@ -7365,10 +7367,12 @@ endpoint 1 {
ram attribute currentGroup default = 0x0000;
ram attribute sceneValid default = 0x00;
ram attribute nameSupport;
ram attribute sceneTableSize default = 16;
callback attribute remainingCapacity default = 8;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute attributeList;
ram attribute featureMap default = 0;
ram attribute featureMap default = 7;
ram attribute clusterRevision default = 5;

handle command AddScene;
Expand Down
34 changes: 33 additions & 1 deletion examples/placeholder/linux/apps/app1/config.zap
Original file line number Diff line number Diff line change
Expand Up @@ -11972,6 +11972,38 @@
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "SceneTableSize",
"code": 6,
"mfgCode": null,
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "16",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "RemainingCapacity",
"code": 7,
"mfgCode": null,
"side": "server",
"type": "int8u",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "8",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "GeneratedCommandList",
"code": 65528,
Expand Down Expand Up @@ -12030,7 +12062,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"defaultValue": "7",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down
6 changes: 5 additions & 1 deletion examples/placeholder/linux/apps/app2/config.matter
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ provisional server cluster Scenes = 5 {
readonly attribute group_id currentGroup = 2;
readonly attribute boolean sceneValid = 3;
readonly attribute bitmap8 nameSupport = 4;
readonly attribute int16u sceneTableSize = 6;
readonly attribute int8u remainingCapacity = 7;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down Expand Up @@ -7329,10 +7331,12 @@ endpoint 1 {
ram attribute currentGroup default = 0x0000;
ram attribute sceneValid default = 0x00;
ram attribute nameSupport;
ram attribute sceneTableSize default = 16;
callback attribute remainingCapacity default = 8;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute attributeList;
ram attribute featureMap default = 0;
ram attribute featureMap default = 7;
ram attribute clusterRevision default = 5;

handle command AddScene;
Expand Down
34 changes: 33 additions & 1 deletion examples/placeholder/linux/apps/app2/config.zap
Original file line number Diff line number Diff line change
Expand Up @@ -12054,6 +12054,38 @@
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "SceneTableSize",
"code": 6,
"mfgCode": null,
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "16",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "RemainingCapacity",
"code": 7,
"mfgCode": null,
"side": "server",
"type": "int8u",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "8",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "GeneratedCommandList",
"code": 65528,
Expand Down Expand Up @@ -12112,7 +12144,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"defaultValue": "7",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down
1 change: 0 additions & 1 deletion examples/pump-app/silabs/src/AppTask.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include "LEDWidget.h"

#include <app/clusters/on-off-server/on-off-server.h>
#include <app/clusters/scenes-server/scenes-server.h>
#include <app/server/OnboardingCodesUtil.h>
#include <app/server/Server.h>
#include <app/util/attribute-storage.h>
Expand Down
14 changes: 7 additions & 7 deletions scripts/tools/zap/tests/inputs/all-clusters-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -6175,7 +6175,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"defaultValue": "16",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand All @@ -6191,7 +6191,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"defaultValue": "8",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down Expand Up @@ -6271,7 +6271,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"defaultValue": "7",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down Expand Up @@ -15419,7 +15419,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"defaultValue": "16",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand All @@ -15435,7 +15435,7 @@
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"defaultValue": "8",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down Expand Up @@ -15515,7 +15515,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"defaultValue": "7",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down Expand Up @@ -16665,4 +16665,4 @@
"networkId": 0
}
]
}
}
Loading

0 comments on commit 1009076

Please sign in to comment.