Skip to content

Commit

Permalink
RVC App: enable the RVC Clean StartUpMode attribute (#29248)
Browse files Browse the repository at this point in the history
* Enabled the RvcClean StartUpMode attribute in the zap and mettar files.

* Updated the PICS files to note that this device supports testing the StartUpMode attribute for the RVC Clean cluster.

* Refactored the run_all_yaml script.

* Updated the testing section of the readme to include the test case related to the RvcClean StartUpMode.

* Restyled by prettier-markdown

* Restyled by shfmt

---------

Co-authored-by: Restyled.io <commits@restyled.io>
  • Loading branch information
hicklin and restyled-commits authored Sep 20, 2023
1 parent a190015 commit 0f620c0
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 28 deletions.
9 changes: 6 additions & 3 deletions examples/rvc-app/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Example command:
PIXIT:
`PIXIT_ENDPOINT:1 PIXIT.RVCCLEANM.MODE_CHANGE_FAIL:1 PIXIT.RVCCLEANM.MODE_CHANGE_OK:2`
Example command:
`/scripts/tests/run_python_test.py --script src/python_testing/TC_RVCCLEANM_2_1.py --script-args "--storage-path admin_storage.json --PICS examples/rvc-app/rvc-common/pics/RVC_App_Test_Plan.txt --int-arg PIXIT_ENDPOINT:1 PIXIT.RVCCLEANM.MODE_CHANGE_FAIL:1 PIXIT.RVCCLEANM.MODE_CHANGE_OK:2"`
`./scripts/tests/run_python_test.py --script src/python_testing/TC_RVCCLEANM_2_1.py --script-args "--storage-path admin_storage.json --PICS examples/rvc-app/rvc-common/pics/RVC_App_Test_Plan.txt --int-arg PIXIT_ENDPOINT:1 PIXIT.RVCCLEANM.MODE_CHANGE_FAIL:1 PIXIT.RVCCLEANM.MODE_CHANGE_OK:2"`

When asked "Manually put the device in a state from which it will FAIL to
transition to mode 1", set the `RvcRunMode` to 1.
Expand All @@ -69,8 +69,11 @@ transition to mode 2", set the `RvcRunMode` to 0.

#### TC 3.2

This is not applicable because this RVC device does not support the
`StartUpMode` attribute.
PIXIT: `PIXIT_ENDPOINT:1`
Example command:
`./scripts/tests/run_python_test.py --script src/python_testing/TC_RVCCLEANM_3_2.py --script-args "--storage-path admin_storage.json --PICS examples/rvc-app/rvc-common/pics/RVC_App_Test_Plan.txt --int-arg PIXIT_ENDPOINT:1"`

When asked "Physically power cycle the device", do so.

### RVC Run Mode cluster

Expand Down
13 changes: 5 additions & 8 deletions examples/rvc-app/run_all_yaml_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,20 @@

NODEID=$1
RVC_DEVICE_ENDPOINT=1

PICS_RUN="examples/rvc-app/rvc-common/pics/RVC_App_Test_Plan.txt"
PICS_CLEAN="examples/rvc-app/rvc-common/pics/RVC_App_Test_Plan.txt"
PICS_OP_STATE="examples/rvc-app/rvc-common/pics/RVC_App_Test_Plan.txt"
RVC_DEVICE_PICS="examples/rvc-app/rvc-common/pics/RVC_App_Test_Plan.txt"

if [ -z "$NODEID" ]; then
echo "Usage: run_all_yaml_tests [Node ID]"
exit
fi

# RVC Clean Mode cluster
./scripts/tests/yaml/chiptool.py tests Test_TC_RVCCLEANM_1_1 --PICS "$PICS_CLEAN" --nodeId "$NODEID" --endpoint "$RVC_DEVICE_ENDPOINT" &&
./scripts/tests/yaml/chiptool.py tests Test_TC_RVCCLEANM_1_1 --PICS "$RVC_DEVICE_PICS" --nodeId "$NODEID" --endpoint "$RVC_DEVICE_ENDPOINT" &&

# RVC Operational State cluster
./scripts/tests/yaml/chiptool.py tests Test_TC_RVCOPSTATE_1_1 --PICS "$PICS_OP_STATE" --nodeId "$NODEID" --endpoint "$RVC_DEVICE_ENDPOINT" &&
./scripts/tests/yaml/chiptool.py tests Test_TC_RVCOPSTATE_2_2 --PICS "$PICS_OP_STATE" --nodeId "$NODEID" --endpoint "$RVC_DEVICE_ENDPOINT" &&
./scripts/tests/yaml/chiptool.py tests Test_TC_RVCOPSTATE_1_1 --PICS "$RVC_DEVICE_PICS" --nodeId "$NODEID" --endpoint "$RVC_DEVICE_ENDPOINT" &&
./scripts/tests/yaml/chiptool.py tests Test_TC_RVCOPSTATE_2_2 --PICS "$RVC_DEVICE_PICS" --nodeId "$NODEID" --endpoint "$RVC_DEVICE_ENDPOINT" &&

# RVC Run Mode cluster
./scripts/tests/yaml/chiptool.py tests Test_TC_RVCRUNM_1_1 --PICS "$PICS_RUN" --nodeId "$NODEID" --endpoint "$RVC_DEVICE_ENDPOINT" &&
./scripts/tests/yaml/chiptool.py tests Test_TC_RVCRUNM_1_1 --PICS "$RVC_DEVICE_PICS" --nodeId "$NODEID" --endpoint "$RVC_DEVICE_ENDPOINT" &&
echo done
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Draft
<feature>Does the device implement the StartUpMode attribute?</feature>
<reference>89.2.2. Attributes - allclusters.html[pdf]</reference>
<status cond="RVCCLEANM.S">O</status>
<support>false</support>
<support>true</support>
</picsItem>
<picsItem>
<itemNumber>RVCCLEANM.S.A0003</itemNumber>
Expand Down
2 changes: 1 addition & 1 deletion examples/rvc-app/rvc-common/pics/RVC_App_Test_Plan.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
RVCCLEANM.S=1
RVCCLEANM.S.A0000=1
RVCCLEANM.S.A0001=1
RVCCLEANM.S.A0002=0
RVCCLEANM.S.A0002=1
RVCCLEANM.S.A0003=0
RVCCLEANM.S.C01.Tx=1
RVCCLEANM.S.C00.Rsp=1
Expand Down
2 changes: 2 additions & 0 deletions examples/rvc-app/rvc-common/rvc-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -929,6 +929,7 @@ server cluster RvcCleanMode = 85 {

readonly attribute ModeOptionStruct supportedModes[] = 0;
readonly attribute int8u currentMode = 1;
attribute nullable int8u startUpMode = 2;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand Down Expand Up @@ -1174,6 +1175,7 @@ endpoint 1 {
server cluster RvcCleanMode {
callback attribute supportedModes;
callback attribute currentMode;
callback attribute startUpMode;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute eventList;
Expand Down
20 changes: 5 additions & 15 deletions examples/rvc-app/rvc-common/rvc-app.zap
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"featureLevel": 97,
"featureLevel": 98,
"creator": "zap",
"keyValuePairs": [
{
Expand Down Expand Up @@ -33,27 +33,22 @@
],
"endpointTypes": [
{
"id": 12,
"id": 1,
"name": "MA-rootdevice",
"deviceTypeRef": {
"id": 177,
"code": 22,
"profileId": 259,
"label": "MA-rootdevice",
"name": "MA-rootdevice"
},
"deviceTypes": [
{
"id": 177,
"code": 22,
"profileId": 259,
"label": "MA-rootdevice",
"name": "MA-rootdevice"
}
],
"deviceTypeRefs": [
177
],
"deviceVersions": [
1
],
Expand Down Expand Up @@ -5420,27 +5415,22 @@
]
},
{
"id": 11,
"id": 2,
"name": "Anonymous Endpoint Type",
"deviceTypeRef": {
"id": 225,
"code": 116,
"profileId": 259,
"label": "MA-robotic-vacuum-cleaner",
"name": "MA-robotic-vacuum-cleaner"
},
"deviceTypes": [
{
"id": 225,
"code": 116,
"profileId": 259,
"label": "MA-robotic-vacuum-cleaner",
"name": "MA-robotic-vacuum-cleaner"
}
],
"deviceTypeRefs": [
225
],
"deviceVersions": [
1
],
Expand Down Expand Up @@ -7705,11 +7695,11 @@
"mfgCode": null,
"side": "server",
"type": "int8u",
"included": 0,
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"defaultValue": null,
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
Expand Down

0 comments on commit 0f620c0

Please sign in to comment.