Skip to content

Commit

Permalink
[Scenes] FabricSceneInfo (#30038)
Browse files Browse the repository at this point in the history
* Modified Attribute 7 from scene cluster to SceneInfoStruct and added support in scenes-server

* Applied suggestions in review and created FabricSceneIndo yaml test, still needs Multi fabric testing

* Explicit cast of bool added and regen of Accessors with Zap

* Completed tests for multi fabric multi nodes

* Regenerated Darwin framework commands for new tests

* Change the store scene invalidate to be only for the current fabric

* Update TestScenesMultiFabric for the changes in StoreScenes logic

* Restyled by prettier-yaml

* Moved the other locally used function in an anonymous namespace

---------

Co-authored-by: Restyled.io <[email protected]>
  • Loading branch information
lpbeliveau-silabs and restyled-commits authored Nov 16, 2023
1 parent 9969d44 commit 732d5e7
Show file tree
Hide file tree
Showing 80 changed files with 3,575 additions and 1,388 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,19 @@ provisional server cluster Scenes = 5 {
AttributeValuePair attributeValueList[] = 1;
}

readonly attribute int8u sceneCount = 0;
readonly attribute int8u currentScene = 1;
readonly attribute group_id currentGroup = 2;
readonly attribute boolean sceneValid = 3;
fabric_scoped struct SceneInfoStruct {
int8u sceneCount = 0;
fabric_sensitive int8u currentScene = 1;
fabric_sensitive group_id currentGroup = 2;
fabric_sensitive boolean sceneValid = 3;
int8u remainingCapacity = 4;
fabric_idx fabricIndex = 254;
}

readonly attribute NameSupportBitmap nameSupport = 4;
readonly attribute nullable node_id lastConfiguredBy = 5;
readonly attribute int16u sceneTableSize = 6;
readonly attribute int8u remainingCapacity = 7;
readonly attribute SceneInfoStruct fabricSceneInfo[] = 7;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down Expand Up @@ -5672,19 +5677,15 @@ endpoint 1 {
}

server cluster Scenes {
callback attribute sceneCount default = 0x00;
ram attribute currentScene default = 0x00;
ram attribute currentGroup default = 0x0000;
ram attribute sceneValid default = 0x00;
ram attribute nameSupport default = 0x80;
ram attribute lastConfiguredBy;
ram attribute sceneTableSize default = 16;
callback attribute remainingCapacity default = 8;
callback attribute fabricSceneInfo;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute eventList;
callback attribute attributeList;
ram attribute featureMap default = 7;
ram attribute featureMap default = 15;
ram attribute clusterRevision default = 5;

handle command AddScene;
Expand Down Expand Up @@ -6756,19 +6757,15 @@ endpoint 2 {
}

server cluster Scenes {
callback attribute sceneCount default = 0x00;
ram attribute currentScene default = 0x00;
ram attribute currentGroup default = 0x0000;
ram attribute sceneValid default = 0x00;
ram attribute nameSupport default = 0x80;
ram attribute lastConfiguredBy;
ram attribute sceneTableSize default = 16;
callback attribute remainingCapacity default = 8;
callback attribute fabricSceneInfo;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute eventList;
callback attribute attributeList;
ram attribute featureMap default = 7;
ram attribute featureMap default = 15;
ram attribute clusterRevision default = 5;

handle command AddScene;
Expand Down
155 changes: 14 additions & 141 deletions examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -6626,70 +6626,6 @@
}
],
"attributes": [
{
"name": "SceneCount",
"code": 0,
"mfgCode": null,
"side": "server",
"type": "int8u",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x00",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "CurrentScene",
"code": 1,
"mfgCode": null,
"side": "server",
"type": "int8u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x00",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "CurrentGroup",
"code": 2,
"mfgCode": null,
"side": "server",
"type": "group_id",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x0000",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "SceneValid",
"code": 3,
"mfgCode": null,
"side": "server",
"type": "boolean",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x00",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "NameSupport",
"code": 4,
Expand Down Expand Up @@ -6739,16 +6675,16 @@
"reportableChange": 0
},
{
"name": "RemainingCapacity",
"name": "FabricSceneInfo",
"code": 7,
"mfgCode": null,
"side": "server",
"type": "int8u",
"type": "array",
"included": 1,
"storageOption": "External",
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "8",
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down Expand Up @@ -6828,7 +6764,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "7",
"defaultValue": "15",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down Expand Up @@ -20218,70 +20154,6 @@
}
],
"attributes": [
{
"name": "SceneCount",
"code": 0,
"mfgCode": null,
"side": "server",
"type": "int8u",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x00",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "CurrentScene",
"code": 1,
"mfgCode": null,
"side": "server",
"type": "int8u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x00",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "CurrentGroup",
"code": 2,
"mfgCode": null,
"side": "server",
"type": "group_id",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x0000",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "SceneValid",
"code": 3,
"mfgCode": null,
"side": "server",
"type": "boolean",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x00",
"reportable": 1,
"minInterval": 0,
"maxInterval": 65344,
"reportableChange": 0
},
{
"name": "NameSupport",
"code": 4,
Expand Down Expand Up @@ -20331,16 +20203,16 @@
"reportableChange": 0
},
{
"name": "RemainingCapacity",
"name": "FabricSceneInfo",
"code": 7,
"mfgCode": null,
"side": "server",
"type": "int8u",
"type": "array",
"included": 1,
"storageOption": "External",
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "8",
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down Expand Up @@ -20420,7 +20292,7 @@
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "7",
"defaultValue": "15",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down Expand Up @@ -21713,6 +21585,7 @@
"endpointId": 65534,
"networkId": 0
}
],
"log": []
}
]
}


Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,19 @@ provisional server cluster Scenes = 5 {
AttributeValuePair attributeValueList[] = 1;
}

readonly attribute int8u sceneCount = 0;
readonly attribute int8u currentScene = 1;
readonly attribute group_id currentGroup = 2;
readonly attribute boolean sceneValid = 3;
fabric_scoped struct SceneInfoStruct {
int8u sceneCount = 0;
fabric_sensitive int8u currentScene = 1;
fabric_sensitive group_id currentGroup = 2;
fabric_sensitive boolean sceneValid = 3;
int8u remainingCapacity = 4;
fabric_idx fabricIndex = 254;
}

readonly attribute NameSupportBitmap nameSupport = 4;
readonly attribute nullable node_id lastConfiguredBy = 5;
readonly attribute int16u sceneTableSize = 6;
readonly attribute int8u remainingCapacity = 7;
readonly attribute SceneInfoStruct fabricSceneInfo[] = 7;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down Expand Up @@ -4424,19 +4429,15 @@ endpoint 1 {
}

server cluster Scenes {
callback attribute sceneCount default = 0x00;
ram attribute currentScene default = 0x00;
ram attribute currentGroup default = 0x0000;
ram attribute sceneValid default = 0x00;
ram attribute nameSupport default = 0x80;
ram attribute lastConfiguredBy;
ram attribute sceneTableSize default = 16;
callback attribute remainingCapacity default = 8;
callback attribute nameSupport default = 0x80;
callback attribute lastConfiguredBy;
callback attribute sceneTableSize default = 16;
callback attribute fabricSceneInfo;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute eventList;
callback attribute attributeList;
ram attribute featureMap default = 7;
ram attribute featureMap default = 15;
ram attribute clusterRevision default = 5;

handle command AddScene;
Expand Down Expand Up @@ -4988,18 +4989,14 @@ endpoint 2 {
}

server cluster Scenes {
callback attribute sceneCount default = 0x00;
ram attribute currentScene default = 0x00;
ram attribute currentGroup default = 0x0000;
ram attribute sceneValid default = 0x00;
ram attribute nameSupport default = 0x80;
ram attribute sceneTableSize default = 16;
callback attribute remainingCapacity default = 8;
callback attribute nameSupport default = 0x80;
callback attribute sceneTableSize default = 16;
callback attribute fabricSceneInfo;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute eventList;
callback attribute attributeList;
ram attribute featureMap default = 7;
ram attribute featureMap default = 15;
ram attribute clusterRevision default = 5;

handle command AddScene;
Expand Down
Loading

0 comments on commit 732d5e7

Please sign in to comment.