Skip to content

Commit cb5346a

Browse files
vivien-applepull[bot]
authored andcommitted
[cluster] Move BinaryInput and OnOffSwitchConfiguration clusters to dedicated files (#24728)
1 parent 85f2dfd commit cb5346a

10 files changed

+62
-38
lines changed

.github/workflows/tests.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,8 @@ jobs:
177177
src/app/zap-templates/zcl/data-model/chip/window-covering.xml \
178178
src/app/zap-templates/zcl/data-model/chip/matter-devices.xml \
179179
src/app/zap-templates/zcl/data-model/draft/barrier-control-cluster.xml \
180-
src/app/zap-templates/zcl/data-model/silabs/general.xml \
180+
src/app/zap-templates/zcl/data-model/draft/input-output-value-clusters.xml \
181+
src/app/zap-templates/zcl/data-model/draft/onoff-switch-configuration-cluster.xml \
181182
src/app/zap-templates/zcl/data-model/silabs/ha-devices.xml \
182183
src/app/zap-templates/zcl/data-model/silabs/ha.xml \
183184
src/app/zap-templates/zcl/data-model/silabs/lo-devices.xml \

scripts/rules.matterlint

+3
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,9 @@ load "../src/app/zap-templates/zcl/data-model/chip/user-label-cluster.xml";
6767
load "../src/app/zap-templates/zcl/data-model/chip/wake-on-lan-cluster.xml";
6868
load "../src/app/zap-templates/zcl/data-model/chip/wifi-network-diagnostics-cluster.xml";
6969
load "../src/app/zap-templates/zcl/data-model/chip/window-covering.xml";
70+
load "../src/app/zap-templates/zcl/data-model/draft/barrier-control-cluster.xml";
71+
load "../src/app/zap-templates/zcl/data-model/draft/input-output-value-clusters.xml";
72+
load "../src/app/zap-templates/zcl/data-model/draft/onoff-switch-configuration-cluster.xml";
7073

7174
all endpoints {
7275
// These attributes follow a different code path and do not have to be

scripts/tests/chiptest/yamltest_with_chip_repl_tester.py

-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ def _StackShutDown():
9999

100100
# Some still-silabs clusters
101101
_CLUSTER_XML_DIRECTORY_PATH + '/silabs/ha.xml', # For fan control
102-
_CLUSTER_XML_DIRECTORY_PATH + '/silabs/general.xml', # For LevelControl cluster
103102
])
104103

105104
# Parsing YAML test and setting up chip-repl yamltests runner.

src/app/zap-templates/zcl/data-model/all.xml

+3-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,9 @@
6767
<xi:include href="chip/wifi-network-diagnostics-cluster.xml" />
6868
<xi:include href="chip/window-covering.xml" />
6969
<xi:include href="chip/matter-devices.xml" />
70-
<xi:include href="silabs/general.xml" />
70+
<xi:include href="draft/barrier-control.xml" />
71+
<xi:include href="draft/input-output-value-clusters.xml" />
72+
<xi:include href="draft/onoff-switch-configuration-cluster.xml" />
7173
<xi:include href="silabs/ha-devices.xml" />
7274
<xi:include href="silabs/ha.xml" />
7375
<xi:include href="silabs/lo-devices.xml" />

src/app/zap-templates/zcl/data-model/chip/groups-cluster.xml

+5
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@ limitations under the License.
1717
<configurator>
1818
<domain name="General"/>
1919

20+
<bitmap name="GroupClusterFeature" type="BITMAP32">
21+
<cluster code="0x0004"/>
22+
<field name="GroupNames" mask="0x1"/>
23+
</bitmap>
24+
2025
<cluster>
2126
<name>Groups</name>
2227
<domain>General</domain>

src/app/zap-templates/zcl/data-model/chip/level-control-cluster.xml

+7
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@ limitations under the License.
1717
<configurator>
1818
<domain name="General"/>
1919

20+
<bitmap name="LevelControlFeature" type="BITMAP32">
21+
<cluster code="0x0008"/>
22+
<field name="OnOff" mask="0x1"/>
23+
<field name="Lighting" mask="0x2"/>
24+
<field name="Frequency" mask="0x4"/>
25+
</bitmap>
26+
2027
<enum name="MoveMode" type="ENUM8">
2128
<cluster code="0x0008"/>
2229
<item name="Up" value="0x0"/>
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0"?>
22
<!--
3-
Copyright (c) 2008,2020 Silicon Labs.
3+
Copyright (c) 2023 Project CHIP Authors
44
55
Licensed under the Apache License, Version 2.0 (the "License");
66
you may not use this file except in compliance with the License.
@@ -15,36 +15,18 @@ See the License for the specific language governing permissions and
1515
limitations under the License.
1616
-->
1717
<configurator>
18-
<domain name="General" spec="zcl-8.0-07-5123-08" certifiable="true">
19-
<older spec="zcl-7.0-07-5123-07" certifiable="true"/>
20-
<older spec="zcl6-errata-14-0129-15"/>
21-
<older spec="zcl-6.0-15-02017-001"/>
22-
<older spec="zcl-1.0-07-5123-03"/>
23-
</domain>
24-
<domain name="Lighting &amp; Occupancy" spec="l&amp;o-1.0-15-0014-04" certifiable="false"/>
25-
<domain name="HA" spec="ha-1.2.1-05-3520-30" dependsOn="zcl-1.0-07-5123-03" certifiable="false">
26-
<older spec="ha-1.2-05-3520-29" dependsOn="zcl-1.0-07-5123-03" certifiable="true"/>
27-
<older spec="ha-1.1-05-3520-27" dependsOn="zcl-1.0-07-5123-03" certifiable="true"/>
28-
</domain>
29-
<cluster>
30-
<name>On/off Switch Configuration</name>
31-
<domain>General</domain>
32-
<description>Attributes and commands for configuring On/Off switching devices.</description>
33-
<code>0x0007</code>
34-
<define>ON_OFF_SWITCH_CONFIGURATION_CLUSTER</define>
35-
<client tick="false" init="false">true</client>
36-
<server tick="false" init="false">true</server>
37-
<attribute side="server" code="0x0000" define="SWITCH_TYPE" type="ENUM8" min="0x00" max="0x01" writable="false" optional="false">switch type</attribute>
38-
<attribute side="server" code="0x0010" define="SWITCH_ACTIONS" type="ENUM8" min="0x00" max="0x02" writable="true" default="0x00" optional="false">switch actions</attribute>
39-
</cluster>
18+
<domain name="General"/>
19+
4020
<cluster>
4121
<name>Binary Input (Basic)</name>
4222
<domain>General</domain>
4323
<description>An interface for reading the value of a binary measurement and accessing various characteristics of that measurement. </description>
4424
<code>0x000F</code>
4525
<define>BINARY_INPUT_BASIC_CLUSTER</define>
26+
4627
<client tick="false" init="false">true</client>
4728
<server tick="false" init="false">true</server>
29+
4830
<attribute side="server" code="0x0004" define="ACTIVE_TEXT" type="CHAR_STRING" length="16" writable="true" default="" optional="true">active text</attribute>
4931
<attribute side="server" code="0x001C" define="DESCRIPTION" type="CHAR_STRING" length="16" writable="true" default="" optional="true">description</attribute>
5032
<attribute side="server" code="0x002E" define="INACTIVE_TEXT" type="CHAR_STRING" length="16" writable="true" default="" optional="true">inactive text</attribute>
@@ -55,14 +37,4 @@ limitations under the License.
5537
<attribute side="server" code="0x006F" define="STATUS_FLAGS" type="BITMAP8" min="0x00" max="0x0F" writable="false" default="0x00" reportable="true" optional="false">status flags</attribute>
5638
<attribute side="server" code="0x0100" define="APPLICATION_TYPE" type="INT32U" min="0x00000000" max="0xFFFFFFFF" writable="false" optional="true">application type</attribute>
5739
</cluster>
58-
<bitmap name="LevelControlFeature" type="BITMAP32">
59-
<cluster code="0x0008"/>
60-
<field name="OnOff" mask="0x1"/>
61-
<field name="Lighting" mask="0x2"/>
62-
<field name="Frequency" mask="0x4"/>
63-
</bitmap>
64-
<bitmap name="GroupClusterFeature" type="BITMAP32">
65-
<cluster code="0x0004"/>
66-
<field name="GroupNames" mask="0x1"/>
67-
</bitmap>
6840
</configurator>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
Copyright (c) 2023 Project CHIP Authors
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
<configurator>
18+
<domain name="General"/>
19+
20+
<cluster>
21+
<name>On/off Switch Configuration</name>
22+
<domain>General</domain>
23+
<description>Attributes and commands for configuring On/Off switching devices.</description>
24+
<code>0x0007</code>
25+
<define>ON_OFF_SWITCH_CONFIGURATION_CLUSTER</define>
26+
27+
<client tick="false" init="false">true</client>
28+
<server tick="false" init="false">true</server>
29+
30+
<attribute side="server" code="0x0000" define="SWITCH_TYPE" type="ENUM8" min="0x00" max="0x01" writable="false" optional="false">switch type</attribute>
31+
<attribute side="server" code="0x0010" define="SWITCH_ACTIONS" type="ENUM8" min="0x00" max="0x02" writable="true" default="0x00" optional="false">switch actions</attribute>
32+
</cluster>
33+
</configurator>

src/app/zap-templates/zcl/zcl-with-test-extensions.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"group-key-mgmt-cluster.xml",
4747
"identify-cluster.xml",
4848
"illuminance-measurement-cluster.xml",
49+
"input-output-value-clusters.xml",
4950
"keypad-input-cluster.xml",
5051
"level-control-cluster.xml",
5152
"localization-configuration-cluster.xml",
@@ -56,6 +57,7 @@
5657
"mode-select-extensions.xml",
5758
"network-commissioning-cluster.xml",
5859
"onoff-cluster.xml",
60+
"onoff-switch-configuration-cluster.xml",
5961
"operational-credentials-cluster.xml",
6062
"pressure-measurement-cluster.xml",
6163
"power-source-cluster.xml",
@@ -82,7 +84,6 @@
8284
"wifi-network-diagnostics-cluster.xml",
8385
"window-covering.xml",
8486
"matter-devices.xml",
85-
"general.xml",
8687
"ha-devices.xml",
8788
"ha.xml",
8889
"lo-devices.xml",

src/app/zap-templates/zcl/zcl.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
"group-key-mgmt-cluster.xml",
4646
"identify-cluster.xml",
4747
"illuminance-measurement-cluster.xml",
48+
"input-output-value-clusters.xml",
4849
"keypad-input-cluster.xml",
4950
"level-control-cluster.xml",
5051
"localization-configuration-cluster.xml",
@@ -54,6 +55,7 @@
5455
"mode-select-cluster.xml",
5556
"network-commissioning-cluster.xml",
5657
"onoff-cluster.xml",
58+
"onoff-switch-configuration-cluster.xml",
5759
"operational-credentials-cluster.xml",
5860
"pressure-measurement-cluster.xml",
5961
"power-source-cluster.xml",
@@ -80,7 +82,6 @@
8082
"wifi-network-diagnostics-cluster.xml",
8183
"window-covering.xml",
8284
"matter-devices.xml",
83-
"general.xml",
8485
"ha-devices.xml",
8586
"ha.xml",
8687
"lo-devices.xml",

0 commit comments

Comments
 (0)