Skip to content

Commit 47cec4e

Browse files
[LVL control] Return invalid command on move when rate is 0 or rate is null and de… (#33204)
* Return invalid command on move when rate is 0 or rate is null and defaultRate is 0 * Update src/app/clusters/level-control/level-control.cpp Co-authored-by: mkardous-silabs <84793247+mkardous-silabs@users.noreply.github.com> * Add check for stepSize and stepMode and move the parameters validation at function entry * Update level-control-cluster.xml to bump revision to 6 and set the min value of default move rate to 1 per spec * Update level control cluster revision from 5 to 6 in all zap files using it with update_cluster_revisions.py and regen * bump expected cluster revision in test TC_LVL_1_1 and min default Move Rate in TC_LVL_2_1 * rebase and regen all * Zap regen post rebase * address comments --------- Co-authored-by: mkardous-silabs <84793247+mkardous-silabs@users.noreply.github.com>
1 parent 73a25ad commit 47cec4e

File tree

70 files changed

+258
-239
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+258
-239
lines changed

examples/all-clusters-app/all-clusters-common/all-clusters-app.matter

+2-2
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ deprecated cluster OnOffSwitchConfiguration = 7 {
288288

289289
/** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */
290290
cluster LevelControl = 8 {
291-
revision 5;
291+
revision 6;
292292

293293
enum MoveModeEnum : enum8 {
294294
kUp = 0;
@@ -7847,7 +7847,7 @@ endpoint 1 {
78477847
ram attribute defaultMoveRate default = 50;
78487848
persist attribute startUpCurrentLevel default = 255;
78497849
ram attribute featureMap default = 3;
7850-
ram attribute clusterRevision default = 5;
7850+
ram attribute clusterRevision default = 6;
78517851

78527852
handle command MoveToLevel;
78537853
handle command Move;

examples/all-clusters-app/all-clusters-common/all-clusters-app.zap

+1-1
Original file line numberDiff line numberDiff line change
@@ -7303,7 +7303,7 @@
73037303
"storageOption": "RAM",
73047304
"singleton": 0,
73057305
"bounded": 0,
7306-
"defaultValue": "5",
7306+
"defaultValue": "6",
73077307
"reportable": 1,
73087308
"minInterval": 0,
73097309
"maxInterval": 65344,

examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter

+2-2
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ cluster OnOff = 6 {
202202

203203
/** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */
204204
cluster LevelControl = 8 {
205-
revision 5;
205+
revision 6;
206206

207207
enum MoveModeEnum : enum8 {
208208
kUp = 0;
@@ -6340,7 +6340,7 @@ endpoint 1 {
63406340
ram attribute onLevel default = 0xFF;
63416341
persist attribute startUpCurrentLevel default = 255;
63426342
ram attribute featureMap default = 0;
6343-
ram attribute clusterRevision default = 5;
6343+
ram attribute clusterRevision default = 6;
63446344

63456345
handle command MoveToLevel;
63466346
handle command Move;

examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap

+1-1
Original file line numberDiff line numberDiff line change
@@ -5047,7 +5047,7 @@
50475047
"storageOption": "RAM",
50485048
"singleton": 0,
50495049
"bounded": 0,
5050-
"defaultValue": "5",
5050+
"defaultValue": "6",
50515051
"reportable": 1,
50525052
"minInterval": 0,
50535053
"maxInterval": 65344,

examples/bridge-app/bridge-common/bridge-app.matter

+2-2
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ cluster OnOff = 6 {
125125

126126
/** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */
127127
cluster LevelControl = 8 {
128-
revision 5;
128+
revision 6;
129129

130130
enum MoveModeEnum : enum8 {
131131
kUp = 0;
@@ -2330,7 +2330,7 @@ endpoint 2 {
23302330
ram attribute defaultMoveRate;
23312331
persist attribute startUpCurrentLevel default = 255;
23322332
ram attribute featureMap default = 3;
2333-
ram attribute clusterRevision default = 5;
2333+
ram attribute clusterRevision default = 6;
23342334

23352335
handle command MoveToLevel;
23362336
handle command Move;

examples/bridge-app/bridge-common/bridge-app.zap

+1-1
Original file line numberDiff line numberDiff line change
@@ -5387,7 +5387,7 @@
53875387
"storageOption": "RAM",
53885388
"singleton": 0,
53895389
"bounded": 0,
5390-
"defaultValue": "5",
5390+
"defaultValue": "6",
53915391
"reportable": 1,
53925392
"minInterval": 0,
53935393
"maxInterval": 65344,

examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter

+2-2
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ cluster OnOff = 6 {
202202

203203
/** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */
204204
cluster LevelControl = 8 {
205-
revision 5;
205+
revision 6;
206206

207207
enum MoveModeEnum : enum8 {
208208
kUp = 0;
@@ -2041,7 +2041,7 @@ endpoint 1 {
20412041
callback attribute acceptedCommandList;
20422042
callback attribute attributeList;
20432043
ram attribute featureMap default = 0x03;
2044-
ram attribute clusterRevision default = 5;
2044+
ram attribute clusterRevision default = 6;
20452045

20462046
handle command MoveToLevel;
20472047
handle command Move;

examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap

+1-1
Original file line numberDiff line numberDiff line change
@@ -4564,7 +4564,7 @@
45644564
"storageOption": "RAM",
45654565
"singleton": 0,
45664566
"bounded": 0,
4567-
"defaultValue": "5",
4567+
"defaultValue": "6",
45684568
"reportable": 1,
45694569
"minInterval": 1,
45704570
"maxInterval": 65534,

examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter

+2-2
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ cluster OnOff = 6 {
125125

126126
/** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */
127127
cluster LevelControl = 8 {
128-
revision 5;
128+
revision 6;
129129

130130
enum MoveModeEnum : enum8 {
131131
kUp = 0;
@@ -2407,7 +2407,7 @@ endpoint 2 {
24072407
callback attribute eventList;
24082408
callback attribute attributeList;
24092409
ram attribute featureMap default = 0;
2410-
ram attribute clusterRevision default = 5;
2410+
ram attribute clusterRevision default = 6;
24112411

24122412
handle command MoveToLevel;
24132413
handle command Move;

examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.zap

+1-1
Original file line numberDiff line numberDiff line change
@@ -4666,7 +4666,7 @@
46664666
"storageOption": "RAM",
46674667
"singleton": 0,
46684668
"bounded": 0,
4669-
"defaultValue": "5",
4669+
"defaultValue": "6",
46704670
"reportable": 1,
46714671
"minInterval": 1,
46724672
"maxInterval": 65534,

examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter

+2-2
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ cluster OnOff = 6 {
202202

203203
/** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */
204204
cluster LevelControl = 8 {
205-
revision 5;
205+
revision 6;
206206

207207
enum MoveModeEnum : enum8 {
208208
kUp = 0;
@@ -1988,7 +1988,7 @@ endpoint 1 {
19881988
callback attribute acceptedCommandList;
19891989
callback attribute attributeList;
19901990
ram attribute featureMap default = 0;
1991-
ram attribute clusterRevision default = 5;
1991+
ram attribute clusterRevision default = 6;
19921992

19931993
handle command MoveToLevel;
19941994
handle command Move;

examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap

+1-1
Original file line numberDiff line numberDiff line change
@@ -3047,7 +3047,7 @@
30473047
"storageOption": "RAM",
30483048
"singleton": 0,
30493049
"bounded": 0,
3050-
"defaultValue": "5",
3050+
"defaultValue": "6",
30513051
"reportable": 1,
30523052
"minInterval": 1,
30533053
"maxInterval": 65534,

examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter

+2-2
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ cluster OnOff = 6 {
202202

203203
/** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */
204204
cluster LevelControl = 8 {
205-
revision 5;
205+
revision 6;
206206

207207
enum MoveModeEnum : enum8 {
208208
kUp = 0;
@@ -1852,7 +1852,7 @@ endpoint 1 {
18521852
callback attribute acceptedCommandList;
18531853
callback attribute attributeList;
18541854
ram attribute featureMap default = 0x03;
1855-
ram attribute clusterRevision default = 5;
1855+
ram attribute clusterRevision default = 6;
18561856

18571857
handle command MoveToLevel;
18581858
handle command Move;

examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap

+1-1
Original file line numberDiff line numberDiff line change
@@ -3301,7 +3301,7 @@
33013301
"storageOption": "RAM",
33023302
"singleton": 0,
33033303
"bounded": 0,
3304-
"defaultValue": "5",
3304+
"defaultValue": "6",
33053305
"reportable": 1,
33063306
"minInterval": 1,
33073307
"maxInterval": 65534,

examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter

+1-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ cluster OnOff = 6 {
202202

203203
/** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */
204204
cluster LevelControl = 8 {
205-
revision 5;
205+
revision 6;
206206

207207
enum MoveModeEnum : enum8 {
208208
kUp = 0;

examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter

+2-2
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ cluster OnOff = 6 {
202202

203203
/** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */
204204
cluster LevelControl = 8 {
205-
revision 5;
205+
revision 6;
206206

207207
enum MoveModeEnum : enum8 {
208208
kUp = 0;
@@ -2109,7 +2109,7 @@ endpoint 1 {
21092109
callback attribute acceptedCommandList;
21102110
callback attribute attributeList;
21112111
ram attribute featureMap default = 0x03;
2112-
ram attribute clusterRevision default = 5;
2112+
ram attribute clusterRevision default = 6;
21132113

21142114
handle command MoveToLevel;
21152115
handle command Move;

examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap

+1-1
Original file line numberDiff line numberDiff line change
@@ -3269,7 +3269,7 @@
32693269
"storageOption": "RAM",
32703270
"singleton": 0,
32713271
"bounded": 0,
3272-
"defaultValue": "5",
3272+
"defaultValue": "6",
32733273
"reportable": 1,
32743274
"minInterval": 1,
32753275
"maxInterval": 65534,

examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter

+2-2
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ cluster OnOff = 6 {
202202

203203
/** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */
204204
cluster LevelControl = 8 {
205-
revision 5;
205+
revision 6;
206206

207207
enum MoveModeEnum : enum8 {
208208
kUp = 0;
@@ -2237,7 +2237,7 @@ endpoint 1 {
22372237
callback attribute acceptedCommandList;
22382238
callback attribute attributeList;
22392239
ram attribute featureMap default = 1;
2240-
ram attribute clusterRevision default = 5;
2240+
ram attribute clusterRevision default = 6;
22412241

22422242
handle command MoveToLevel;
22432243
handle command Move;

examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap

+8-8
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,18 @@
1919
"package": [
2020
{
2121
"pathRelativity": "relativeToZap",
22-
"path": "../../../src/app/zap-templates/zcl/zcl.json",
23-
"type": "zcl-properties",
22+
"path": "../../../src/app/zap-templates/app-templates.json",
23+
"type": "gen-templates-json",
2424
"category": "matter",
25-
"version": 1,
26-
"description": "Matter SDK ZCL data"
25+
"version": "chip-v1"
2726
},
2827
{
2928
"pathRelativity": "relativeToZap",
30-
"path": "../../../src/app/zap-templates/app-templates.json",
31-
"type": "gen-templates-json",
29+
"path": "../../../src/app/zap-templates/zcl/zcl.json",
30+
"type": "zcl-properties",
3231
"category": "matter",
33-
"version": "chip-v1"
32+
"version": 1,
33+
"description": "Matter SDK ZCL data"
3434
}
3535
],
3636
"endpointTypes": [
@@ -3173,7 +3173,7 @@
31733173
"storageOption": "RAM",
31743174
"singleton": 0,
31753175
"bounded": 0,
3176-
"defaultValue": "5",
3176+
"defaultValue": "6",
31773177
"reportable": 1,
31783178
"minInterval": 1,
31793179
"maxInterval": 65534,

examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter

+2-2
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ cluster OnOff = 6 {
202202

203203
/** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */
204204
cluster LevelControl = 8 {
205-
revision 5;
205+
revision 6;
206206

207207
enum MoveModeEnum : enum8 {
208208
kUp = 0;
@@ -1789,7 +1789,7 @@ endpoint 1 {
17891789
callback attribute acceptedCommandList;
17901790
callback attribute attributeList;
17911791
ram attribute featureMap default = 3;
1792-
ram attribute clusterRevision default = 5;
1792+
ram attribute clusterRevision default = 6;
17931793

17941794
handle command MoveToLevel;
17951795
handle command Move;

examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap

+1-1
Original file line numberDiff line numberDiff line change
@@ -3269,7 +3269,7 @@
32693269
"storageOption": "RAM",
32703270
"singleton": 0,
32713271
"bounded": 0,
3272-
"defaultValue": "5",
3272+
"defaultValue": "6",
32733273
"reportable": 1,
32743274
"minInterval": 1,
32753275
"maxInterval": 65534,

examples/chef/devices/rootnode_onofflight_samplemei.matter

+2-2
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ cluster OnOff = 6 {
202202

203203
/** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */
204204
cluster LevelControl = 8 {
205-
revision 5;
205+
revision 6;
206206

207207
enum MoveModeEnum : enum8 {
208208
kUp = 0;
@@ -1821,7 +1821,7 @@ endpoint 1 {
18211821
callback attribute acceptedCommandList;
18221822
callback attribute attributeList;
18231823
ram attribute featureMap default = 3;
1824-
ram attribute clusterRevision default = 5;
1824+
ram attribute clusterRevision default = 6;
18251825

18261826
handle command MoveToLevel;
18271827
handle command Move;

examples/chef/devices/rootnode_onofflight_samplemei.zap

+1-1
Original file line numberDiff line numberDiff line change
@@ -3269,7 +3269,7 @@
32693269
"storageOption": "RAM",
32703270
"singleton": 0,
32713271
"bounded": 0,
3272-
"defaultValue": "5",
3272+
"defaultValue": "6",
32733273
"reportable": 1,
32743274
"minInterval": 1,
32753275
"maxInterval": 65534,

examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap

-7
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,6 @@
2424
"category": "matter",
2525
"version": 1,
2626
"description": "Matter SDK ZCL data"
27-
},
28-
{
29-
"pathRelativity": "relativeToZap",
30-
"path": "../../../src/app/zap-templates/app-templates.json",
31-
"type": "gen-templates-json",
32-
"category": "matter",
33-
"version": "chip-v1"
3427
}
3528
],
3629
"endpointTypes": [

examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter

+2-2
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ cluster OnOff = 6 {
125125

126126
/** Attributes and commands for controlling devices that can be set to a level between fully 'On' and fully 'Off.' */
127127
cluster LevelControl = 8 {
128-
revision 5;
128+
revision 6;
129129

130130
enum MoveModeEnum : enum8 {
131131
kUp = 0;
@@ -1686,7 +1686,7 @@ endpoint 1 {
16861686
callback attribute acceptedCommandList;
16871687
callback attribute attributeList;
16881688
ram attribute featureMap default = 0x1;
1689-
ram attribute clusterRevision default = 5;
1689+
ram attribute clusterRevision default = 6;
16901690

16911691
handle command MoveToLevel;
16921692
handle command Move;

examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap

+1-1
Original file line numberDiff line numberDiff line change
@@ -2985,7 +2985,7 @@
29852985
"storageOption": "RAM",
29862986
"singleton": 0,
29872987
"bounded": 0,
2988-
"defaultValue": "5",
2988+
"defaultValue": "6",
29892989
"reportable": 1,
29902990
"minInterval": 1,
29912991
"maxInterval": 65534,

examples/chef/sample_app_util/test_files/sample_zap_file.zap

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"fileFormat": 2,
3-
"featureLevel": 100,
3+
"featureLevel": 102,
44
"creator": "zap",
55
"keyValuePairs": [
66
{
@@ -29,6 +29,7 @@
2929
"pathRelativity": "relativeToZap",
3030
"path": "../../../../src/app/zap-templates/app-templates.json",
3131
"type": "gen-templates-json",
32+
"category": "matter",
3233
"version": "chip-v1"
3334
}
3435
],
@@ -4925,7 +4926,7 @@
49254926
"storageOption": "RAM",
49264927
"singleton": 0,
49274928
"bounded": 0,
4928-
"defaultValue": "5",
4929+
"defaultValue": "6",
49294930
"reportable": 1,
49304931
"minInterval": 0,
49314932
"maxInterval": 65344,

0 commit comments

Comments
 (0)