Skip to content

Commit

Permalink
Modified Attribute 7 from scene cluster to SceneInfoStruct and added …
Browse files Browse the repository at this point in the history
…support in scenes-server
  • Loading branch information
lpbeliveau-silabs committed Oct 16, 2023
1 parent 553b32b commit 1ad5d9c
Show file tree
Hide file tree
Showing 11 changed files with 98 additions and 44 deletions.
24 changes: 15 additions & 9 deletions examples/lighting-app/silabs/data_model/lighting-thread-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,21 @@ server cluster Scenes = 5 {
AttributeValuePair attributeValueList[] = 1;
}

struct SceneInfoStruct {
int8u sceneCount = 0;
int8u currentScene = 1;
group_id currentGroup = 2;
boolean sceneValid = 3;
int8u remainingCapacity = 4;
}

readonly attribute int8u sceneCount = 0;
readonly attribute int8u currentScene = 1;
readonly attribute group_id currentGroup = 2;
readonly attribute boolean sceneValid = 3;
readonly attribute bitmap8 nameSupport = 4;
readonly attribute nullable node_id lastConfiguredBy = 5;
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 @@ -2489,18 +2496,17 @@ 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 currentScene default = 0x00;
callback attribute currentGroup default = 0x0000;
callback attribute sceneValid default = 0x00;
callback attribute nameSupport default = 0x80;
callback attribute lastConfiguredBy;
callback attribute sceneTableSize default = 16;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute eventList;
callback attribute attributeList;
ram attribute featureMap default = 3;
callback attribute featureMap default = 3;
ram attribute clusterRevision default = 5;

handle command AddScene;
Expand Down
20 changes: 10 additions & 10 deletions examples/lighting-app/silabs/data_model/lighting-thread-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -4078,7 +4078,7 @@
"side": "server",
"type": "int8u",
"included": 1,
"storageOption": "RAM",
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x00",
Expand All @@ -4094,7 +4094,7 @@
"side": "server",
"type": "group_id",
"included": 1,
"storageOption": "RAM",
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x0000",
Expand All @@ -4110,7 +4110,7 @@
"side": "server",
"type": "boolean",
"included": 1,
"storageOption": "RAM",
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x00",
Expand All @@ -4126,7 +4126,7 @@
"side": "server",
"type": "bitmap8",
"included": 1,
"storageOption": "RAM",
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "0x80",
Expand All @@ -4142,7 +4142,7 @@
"side": "server",
"type": "node_id",
"included": 1,
"storageOption": "RAM",
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
Expand All @@ -4158,7 +4158,7 @@
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "RAM",
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "16",
Expand All @@ -4168,16 +4168,16 @@
"reportableChange": 0
},
{
"name": "RemainingCapacity",
"name": "FabricSceneInfo",
"code": 7,
"mfgCode": null,
"side": "server",
"type": "int8u",
"type": "array",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "8",
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down Expand Up @@ -4254,7 +4254,7 @@
"side": "server",
"type": "bitmap32",
"included": 1,
"storageOption": "RAM",
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "3",
Expand Down
2 changes: 1 addition & 1 deletion src/app/tests/suites/certification/PICS.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5707,7 +5707,7 @@ PICS:
- label: "Does the device implement the SceneTableSize attribute?"
id: S.S.A0006

- label: "Does the device implement the RemainingCapacity attribute?"
- label: "Does the device implement the SceneInfoStruct attribute?"
id: S.S.A0007

#
Expand Down
19 changes: 19 additions & 0 deletions src/app/tests/suites/certification/Test_TC_S_1_1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,25 @@ tests:
type: bitmap32
hasMasksSet: [0x1]

- label: "Step 3a: Read FeatureMap (global attribute 65532)"
PICS: (!S.S.F03)
command: "readAttribute"
attribute: "FeatureMap"
response:
constraints:
type: bitmap32

hasMasksClear: [0x8]

- label: "Step 3a: Read FeatureMap (global attribute 65532)"
PICS: S.S.F03
command: "readAttribute"
attribute: "FeatureMap"
response:
constraints:
type: bitmap32
hasMasksSet: [0x8]

- label:
"Step 4: Read Mandatory attributes in AttributeList (global attribute
65531)"
Expand Down
4 changes: 2 additions & 2 deletions src/app/tests/suites/certification/Test_TC_S_2_1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,11 @@ tests:
type: int16u

- label:
"Step 9: TH reads from the DUT the (0x0007) RemainingCapacity
"Step 9: TH reads from the DUT the (0x0007) SceneInfoStruct
attribute"
PICS: S.S.A0007
command: "readAttribute"
attribute: "RemainingCapacity"
attribute: "SceneInfoStruct"
response:
constraints:
type: int8u
24 changes: 12 additions & 12 deletions src/app/tests/suites/certification/Test_TC_S_2_2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -311,18 +311,18 @@ tests:
- name: "expectedValue"
value: "y"

#- label: "Step 3h: TH reads attribute FabricSceneInfo from DUT"
# PICS: S.S.F03 && S.S.F02
# command: "readAttribute"
# attribute: "FabricSceneInfo"
# response:
# value: {
# SceneCount: SceneCountValue,
# CurrentScene: 0x01,
# CurrentGroup: G1,
# SceneValid: true,
# RemainingCapacity: ( SceneTableSizeValue/2 ),
# }
- label: "Step 3h: TH reads attribute FabricSceneInfo from DUT"
PICS: S.S.F03 && S.S.F02
command: "readAttribute"
attribute: "FabricSceneInfo"
response:
value: {
SceneCount: SceneCountValue,
CurrentScene: 0x01,
CurrentGroup: G1,
SceneValid: true,
RemainingCapacity: ( SceneTableSizeValue/2 ),
}

- label: "Step 4a: Reboot target device"
PICS: PICS_SDK_CI_ONLY
Expand Down
12 changes: 6 additions & 6 deletions src/app/tests/suites/certification/ci-pics-values
Original file line number Diff line number Diff line change
Expand Up @@ -657,14 +657,14 @@ I.C.AO-WRITE=0

# Scenes Cluster
S.S=1
S.S.A0000=1
S.S.A0001=1
S.S.A0002=1
S.S.A0003=1
S.S.A0000=0
S.S.A0001=0
S.S.A0002=0
S.S.A0003=0
S.S.A0004=1
S.S.A0005=1
S.S.A0006=1
S.S.A0007=0
S.S.A0007=1
S.S.C00.Rsp=1
S.S.C01.Rsp=1
S.S.C02.Rsp=1
Expand All @@ -680,7 +680,7 @@ S.S.AO=0
S.S.F00=1
S.S.F01=1
S.S.F02=0
S.S.F03=0
S.S.F03=1
PICS_SC_RECALL_SCENE_TRANSITION_TIME=1

S.C=0
Expand Down
11 changes: 10 additions & 1 deletion src/app/zap-templates/zcl/data-model/chip/scene.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,15 @@ limitations under the License.
<field name="CopyAllScenes" mask="0x01"/>
</bitmap>

<struct name="SceneInfoStruct">
<cluster code="0x0005"/>
<item name="SceneCount" type="int8u" optional="false"/>
<item name="CurrentScene" type="int8u" optional="false"/>
<item name="CurrentGroup" type="group_id" optional="false"/>
<item name="SceneValid" type="boolean" optional="false"/>
<item name="RemainingCapacity" type="int8u" optional="false"/>
</struct>

<struct name="AttributeValuePair">
<cluster code="0x0005"/>
<item name="AttributeID" type="attrib_id" optional="false"/>
Expand Down Expand Up @@ -50,7 +59,7 @@ limitations under the License.
<attribute side="server" code="0x0004" define="SCENE_NAME_SUPPORT" type="bitmap8" min="0x00" max="0x80" writable="false" default="0x00" optional="false">NameSupport</attribute>
<attribute side="server" code="0x0005" define="LAST_CONFIGURED_BY" type="node_id" writable="false" isNullable="true" optional="true">LastConfiguredBy</attribute>
<attribute side="server" code="0x0006" define="SCENE_TABLE_SIZE" type="int16u" writable="false" optional="false">SceneTableSize</attribute>
<attribute side="server" code="0x0007" define="REMAINING_CAPACITY" type="int8u" writable="false" optional="false">RemainingCapacity</attribute>
<attribute side="server" code="0x0007" define="FABRIC_SCENE_INFO" type="ARRAY" entryType="SceneInfoStruct" writable="false" optional="false">FabricSceneInfo</attribute>
<command source="client" code="0x00" name="AddScene" response="AddSceneResponse" isFabricScoped="true" optional="false" cli="chip scenes add">
<description>
Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeId": VALUE, "AttributeValue": VALUE}]}'
Expand Down
12 changes: 11 additions & 1 deletion src/app/zap-templates/zcl/zcl-with-test-extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,17 @@
"FeatureMap",
"ThreadMetrics"
],
"Scenes": ["SceneCount", "RemainingCapacity"],
"Scenes": [
"SceneCount",
"CurrentScene",
"CurrentGroup",
"SceneValid",
"NameSupport",
"LastConfiguredBy",
"SceneTableSize",
"FabricSceneInfo",
"FeatureMap"
],
"Unit Testing": [
"struct_attr",
"nullable_struct",
Expand Down
12 changes: 11 additions & 1 deletion src/app/zap-templates/zcl/zcl.json
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,17 @@
"FeatureMap",
"ThreadMetrics"
],
"Scenes": ["SceneCount", "RemainingCapacity"],
"Scenes": [
"SceneCount",
"CurrentScene",
"CurrentGroup",
"SceneValid",
"NameSupport",
"LastConfiguredBy",
"SceneTableSize",
"FabricSceneInfo",
"FeatureMap"
],
"Unit Testing": [
"struct_attr",
"nullable_struct",
Expand Down
2 changes: 1 addition & 1 deletion src/darwin/Framework/CHIP/templates/availability.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7426,7 +7426,7 @@
Scenes:
# New scenes bits not stable yet.
- SceneTableSize
- RemainingCapacity
- SceneInfoStruct
FanControl:
# New Fan Control bits not stable yet.
- AirflowDirection
Expand Down

0 comments on commit 1ad5d9c

Please sign in to comment.