Skip to content

Commit d96b329

Browse files
senthilkurestyled-commitssabollim-silabs
authored andcommitted
Closures: Closure Control cluster XML generation with Alchemy (project-chip#37555)
* closure control cluster XML genartion with alchemy * closure control cluster zap generated code * Restyled by prettier-json * removing FeatureMap * removing FeatureMap in zcl * generate zap with removed FeatureMap * Added manual description for closure control --------- Co-authored-by: Restyled.io <commits@restyled.io> Co-authored-by: sabollim-silabs <158290810+sabollim-silabs@users.noreply.github.com>
1 parent d3aab2a commit d96b329

File tree

59 files changed

+11428
-0
lines changed

Some content is hidden

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

59 files changed

+11428
-0
lines changed

.github/workflows/tests.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ jobs:
9393
--log-level info \
9494
src/app/zap-templates/zcl/data-model/chip/global-attributes.xml \
9595
src/app/zap-templates/zcl/data-model/chip/chime-cluster.xml \
96+
src/app/zap-templates/zcl/data-model/chip/closure-control-cluster.xml \
9697
src/app/zap-templates/zcl/data-model/chip/global-bitmaps.xml \
9798
src/app/zap-templates/zcl/data-model/chip/global-enums.xml \
9899
src/app/zap-templates/zcl/data-model/chip/global-structs.xml \

docs/ids_and_codes/zap_clusters.md

+1
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ Generally regenerate using one of:
8989
| 159 | 0x9F | DeviceEnergyManagementMode |
9090
| 257 | 0x101 | DoorLock |
9191
| 258 | 0x102 | WindowCovering |
92+
| 260 | 0x104 | ClosureControl |
9293
| 336 | 0x150 | ServiceArea |
9394
| 512 | 0x200 | PumpConfigurationAndControl |
9495
| 513 | 0x201 | Thermostat |

scripts/rules.matterlint

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ load "../src/app/zap-templates/zcl/data-model/chip/channel-cluster.xml";
2020
load "../src/app/zap-templates/zcl/data-model/chip/chime-cluster.xml";
2121
load "../src/app/zap-templates/zcl/data-model/chip/chip-ota.xml";
2222
load "../src/app/zap-templates/zcl/data-model/chip/chip-types.xml";
23+
load "../src/app/zap-templates/zcl/data-model/chip/closure-control-cluster.xml";
2324
load "../src/app/zap-templates/zcl/data-model/chip/clusters-extensions.xml";
2425
load "../src/app/zap-templates/zcl/data-model/chip/color-control-cluster.xml";
2526
load "../src/app/zap-templates/zcl/data-model/chip/commissioner-control-cluster.xml";

scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/gen_config.h

+2
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@
9898
#define MATTER_DM_DEVICE_ENERGY_MANAGEMENT_MODE_CLUSTER_SERVER_ENDPOINT_COUNT (1)
9999
#define MATTER_DM_DOOR_LOCK_CLUSTER_SERVER_ENDPOINT_COUNT (0)
100100
#define MATTER_DM_WINDOW_COVERING_CLUSTER_SERVER_ENDPOINT_COUNT (1)
101+
#define MATTER_DM_CLOSURE_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (0)
101102
#define MATTER_DM_SERVICE_AREA_CLUSTER_SERVER_ENDPOINT_COUNT (0)
102103
#define MATTER_DM_PUMP_CONFIGURATION_AND_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1)
103104
#define MATTER_DM_THERMOSTAT_CLUSTER_SERVER_ENDPOINT_COUNT (1)
@@ -229,6 +230,7 @@
229230
#define MATTER_DM_DEVICE_ENERGY_MANAGEMENT_MODE_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
230231
#define MATTER_DM_DOOR_LOCK_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
231232
#define MATTER_DM_WINDOW_COVERING_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
233+
#define MATTER_DM_CLOSURE_CONTROL_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
232234
#define MATTER_DM_SERVICE_AREA_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
233235
#define MATTER_DM_PUMP_CONFIGURATION_AND_CONTROL_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
234236
#define MATTER_DM_THERMOSTAT_CLUSTER_CLIENT_ENDPOINT_COUNT (0)

scripts/tools/zap/tests/outputs/lighting-app/app-templates/gen_config.h

+2
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@
9898
#define MATTER_DM_DEVICE_ENERGY_MANAGEMENT_MODE_CLUSTER_SERVER_ENDPOINT_COUNT (0)
9999
#define MATTER_DM_DOOR_LOCK_CLUSTER_SERVER_ENDPOINT_COUNT (0)
100100
#define MATTER_DM_WINDOW_COVERING_CLUSTER_SERVER_ENDPOINT_COUNT (0)
101+
#define MATTER_DM_CLOSURE_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (0)
101102
#define MATTER_DM_SERVICE_AREA_CLUSTER_SERVER_ENDPOINT_COUNT (0)
102103
#define MATTER_DM_PUMP_CONFIGURATION_AND_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (0)
103104
#define MATTER_DM_THERMOSTAT_CLUSTER_SERVER_ENDPOINT_COUNT (0)
@@ -229,6 +230,7 @@
229230
#define MATTER_DM_DEVICE_ENERGY_MANAGEMENT_MODE_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
230231
#define MATTER_DM_DOOR_LOCK_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
231232
#define MATTER_DM_WINDOW_COVERING_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
233+
#define MATTER_DM_CLOSURE_CONTROL_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
232234
#define MATTER_DM_SERVICE_AREA_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
233235
#define MATTER_DM_PUMP_CONFIGURATION_AND_CONTROL_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
234236
#define MATTER_DM_THERMOSTAT_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,255 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
Copyright (c) 2025 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+
<!--
18+
XML generated by Alchemy; DO NOT EDIT.
19+
Source: src/app_clusters/ClosureControl.adoc
20+
Parameters: in-progress
21+
Git: 0.7-summer-2025-5-g06c4d5596-dirty
22+
-->
23+
<configurator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../zcl.xsd">
24+
<domain name="Closures"/>
25+
<enum name="ClosureErrorEnum" type="enum8">
26+
<cluster code="0x0104"/>
27+
<item name="Blocked" value="0x00"/>
28+
<item name="TemperatureLimited" value="0x01"/>
29+
<item name="MaintenanceRequired" value="0x02"/>
30+
<item name="InternalInterference" value="0x03"/>
31+
</enum>
32+
33+
<enum name="LatchingEnum" type="enum8">
34+
<cluster code="0x0104"/>
35+
<item name="LatchedAndSecured" value="0x00"/>
36+
<item name="LatchedButNotSecured" value="0x01"/>
37+
<item name="NotLatched" value="0x02"/>
38+
</enum>
39+
40+
<enum name="MainStateEnum" type="enum8">
41+
<cluster code="0x0104"/>
42+
<item name="Stopped" value="0x00"/>
43+
<item name="Moving" value="0x01"/>
44+
<item name="WaitingForMotion" value="0x02"/>
45+
<item name="Error" value="0x03"/>
46+
<item name="Calibrating" value="0x04"/>
47+
<item name="Protected" value="0x05"/>
48+
<item name="Disengaged" value="0x06"/>
49+
<item name="SetupRequired" value="0x07"/>
50+
<item name="PendingFallback" value="0x08"/>
51+
</enum>
52+
53+
<enum name="PositioningEnum" type="enum8">
54+
<cluster code="0x0104"/>
55+
<item name="FullyClosed" value="0x00"/>
56+
<item name="FullyOpened" value="0x01"/>
57+
<item name="PartiallyOpened" value="0x02"/>
58+
<item name="OpenedForPedestrian" value="0x03"/>
59+
<item name="OpenedForVentilation" value="0x04"/>
60+
<item name="OpenedAtSignature" value="0x05"/>
61+
</enum>
62+
63+
<enum name="RestingProcedureEnum" type="enum8">
64+
<cluster code="0x0104"/>
65+
<item name="DoNothing" value="0x00"/>
66+
<item name="ReturnToFullyOpened" value="0x01"/>
67+
<item name="ReturnToFullyClosed" value="0x02"/>
68+
</enum>
69+
70+
<enum name="TagLatchEnum" type="enum8">
71+
<cluster code="0x0104"/>
72+
<item name="Latch" value="0x00"/>
73+
<item name="Unlatch" value="0x01"/>
74+
</enum>
75+
76+
<enum name="TagPositionEnum" type="enum8">
77+
<cluster code="0x0104"/>
78+
<item name="CloseInFull" value="0x00"/>
79+
<item name="OpenInFull" value="0x01"/>
80+
<item name="Pedestrian" value="0x02"/>
81+
<item name="Ventilation" value="0x03"/>
82+
<item name="Signature" value="0x04"/>
83+
<item name="SequenceNextStep" value="0x05"/>
84+
<item name="PedestrianNextStep" value="0x06"/>
85+
</enum>
86+
87+
<enum name="TriggerConditionEnum" type="enum8">
88+
<cluster code="0x0104"/>
89+
<item name="AfterDelay" value="0x00"/>
90+
<item name="AfterApplicativeTrigger" value="0x01"/>
91+
<item name="AfterDelayOrApplicativeTrigger" value="0x02"/>
92+
</enum>
93+
94+
<enum name="TriggerPositionEnum" type="enum8">
95+
<cluster code="0x0104"/>
96+
<item name="AtFullyClosed" value="0x00"/>
97+
<item name="AtFullyOpened" value="0x01"/>
98+
<item name="InBetween" value="0x02"/>
99+
<item name="AtVentilation" value="0x03"/>
100+
<item name="AtPedestrian" value="0x04"/>
101+
</enum>
102+
103+
<struct name="OverallStateStruct" apiMaturity="provisional">
104+
<cluster code="0x0104"/>
105+
<item fieldId="0" name="Positioning" type="PositioningEnum" optional="true" default="0x02" min="0x00" max="0x05"/>
106+
<item fieldId="1" name="Latching" type="LatchingEnum" optional="true" default="0x02" min="0x00" max="0x02"/>
107+
<item fieldId="2" name="Speed" type="ThreeLevelAutoEnum" optional="true" default="0x00" min="0x00" max="0x03"/>
108+
<item fieldId="3" name="ExtraInfo" type="bitmap32" optional="true"/>
109+
</struct>
110+
111+
<struct name="OverallTargetStruct" apiMaturity="provisional">
112+
<cluster code="0x0104"/>
113+
<item fieldId="0" name="TagPosition" type="TagPositionEnum" optional="true" min="0x00" max="0x06"/>
114+
<item fieldId="1" name="TagLatch" type="TagLatchEnum" optional="true" min="0x00" max="0x01"/>
115+
<item fieldId="2" name="Speed" type="ThreeLevelAutoEnum" optional="true" min="0x00" max="0x03"/>
116+
</struct>
117+
118+
<cluster>
119+
<domain>Closures</domain>
120+
<name>Closure Control</name>
121+
<code>0x0104</code>
122+
<define>CLOSURE_CONTROL_CLUSTER</define>
123+
<description>This cluster provides an interface for controlling a Closure device.</description>
124+
<client init="false" tick="false">true</client>
125+
<server init="false" tick="false">true</server>
126+
<globalAttribute code="0xFFFD" side="either" value="1"/>
127+
<attribute code="0x0000" side="server" define="COUNTDOWN_TIME" type="elapsed_s" isNullable="true" max="259200" optional="true">
128+
<description>CountdownTime</description>
129+
<optionalConform/>
130+
</attribute>
131+
<attribute code="0x0001" side="server" define="MAIN_STATE" type="MainStateEnum" min="0x00" max="0x08">MainState</attribute>
132+
<attribute code="0x0002" side="server" define="CURRENT_ERROR_LIST" type="array" entryType="ClosureErrorEnum">CurrentErrorList</attribute>
133+
<attribute code="0x0003" side="server" define="OVERALL_STATE" type="OverallStateStruct" isNullable="true">OverallState</attribute>
134+
<attribute code="0x0004" side="server" define="OVERALL_TARGET" type="OverallTargetStruct" isNullable="true">OverallTarget</attribute>
135+
<attribute code="0x0005" side="server" define="RESTING_PROCEDURE" type="RestingProcedureEnum" min="0x00" max="0x02" optional="true">
136+
<description>RestingProcedure</description>
137+
<mandatoryConform>
138+
<feature name="FB"/>
139+
</mandatoryConform>
140+
</attribute>
141+
<attribute code="0x0006" side="server" define="TRIGGER_CONDITION" type="TriggerConditionEnum" min="0x00" max="0x02" optional="true">
142+
<description>TriggerCondition</description>
143+
<mandatoryConform>
144+
<feature name="FB"/>
145+
</mandatoryConform>
146+
</attribute>
147+
<attribute code="0x0007" side="server" define="TRIGGER_POSITION" type="TriggerPositionEnum" optional="true" min="0x00" max="0x04">
148+
<description>TriggerPosition</description>
149+
<mandatoryConform>
150+
<feature name="FB"/>
151+
</mandatoryConform>
152+
</attribute>
153+
<attribute code="0x0008" side="server" define="WAITING_DELAY" type="elapsed_s" max="86400" default="60" optional="true">
154+
<description>WaitingDelay</description>
155+
<mandatoryConform>
156+
<feature name="FB"/>
157+
</mandatoryConform>
158+
</attribute>
159+
<attribute code="0x0009" side="server" define="KICKOFF_TIMER" type="elapsed_s" max="86400" default="0" optional="true">
160+
<description>KickoffTimer</description>
161+
<mandatoryConform>
162+
<feature name="FB"/>
163+
</mandatoryConform>
164+
</attribute>
165+
<command code="0x00" source="client" name="Stop" optional="true">
166+
<description>On receipt of this command, the device SHALL stop its operation if it is at a position where it is safe to do so and/or permitted.</description>
167+
<mandatoryConform>
168+
<notTerm>
169+
<feature name="IS"/>
170+
</notTerm>
171+
</mandatoryConform>
172+
</command>
173+
174+
<command code="0x01" source="client" name="MoveTo" optional="false">
175+
<description>Upon receipt, this SHALL move the product in the most fitting state following the data as follows: </description>
176+
<arg id="0" name="Tag" type="TagPositionEnum" optional="true" min="0x00" max="0x06"/>
177+
<arg id="1" name="Latch" type="TagLatchEnum" optional="true" min="0x00" max="0x01"/>
178+
<arg id="2" name="Speed" type="ThreeLevelAutoEnum" optional="true" min="0x00" max="0x03"/>
179+
</command>
180+
181+
<command code="0x02" source="client" name="Calibrate" optional="true">
182+
<description>Upon receipt, this SHALL initiate a calibration.</description>
183+
<access op="invoke" privilege="manage"/>
184+
<mandatoryConform>
185+
<feature name="CL"/>
186+
</mandatoryConform>
187+
</command>
188+
189+
<command code="0x03" source="client" name="ConfigureFallback" optional="true">
190+
<description>Upon receipt, this SHALL configure the Fallback feature behavior using the data as follows: </description>
191+
<arg id="0" name="RestingProcedure" type="RestingProcedureEnum" optional="true" min="0x00" max="0x02"/>
192+
<arg id="1" name="TriggerCondition" type="TriggerConditionEnum" optional="true" min="0x00" max="0x02"/>
193+
<arg id="2" name="TriggerPosition" type="TriggerPositionEnum" optional="true" min="0x00" max="0x04"/>
194+
<arg id="3" name="WaitingDelay" type="elapsed_s" optional="true" max="86400"/>
195+
<mandatoryConform>
196+
<feature name="FB"/>
197+
</mandatoryConform>
198+
</command>
199+
200+
<command code="0x04" source="client" name="CancelFallback" optional="true">
201+
<description>Upon receipt, this SHALL cancel the current PendingFallback.</description>
202+
<mandatoryConform>
203+
<feature name="FB"/>
204+
</mandatoryConform>
205+
</command>
206+
207+
<features>
208+
<feature bit="0" code="PS" name="Positioning" summary="Supports positioning with at least Fully Opened (0%) and Fully Closed (100%) discrete position">
209+
<optionalConform choice="a" more="true" min="1"/>
210+
</feature>
211+
<feature bit="1" code="LT" name="MotionLatching" summary="Supports a latch (securing a position, a state ...)">
212+
<optionalConform choice="a" more="true" min="1"/>
213+
</feature>
214+
<feature bit="2" code="IS" name="Instantaneous" summary="Supports the Instantaneous feature">
215+
<optionalConform/>
216+
</feature>
217+
<feature bit="3" code="SP" name="Speed" summary="Supports speed motion throttling">
218+
<optionalConform>
219+
<andTerm>
220+
<feature name="PS"/>
221+
<notTerm>
222+
<feature name="IS"/>
223+
</notTerm>
224+
</andTerm>
225+
</optionalConform>
226+
</feature>
227+
<feature bit="4" code="VT" name="Ventilation" summary="Supports Ventilation discrete state">
228+
<optionalConform>
229+
<feature name="PS"/>
230+
</optionalConform>
231+
</feature>
232+
<feature bit="5" code="PD" name="Pedestrian" summary="Supports Pedestrian discrete state">
233+
<optionalConform>
234+
<feature name="PS"/>
235+
</optionalConform>
236+
</feature>
237+
<feature bit="6" code="CL" name="Calibration" summary="Supports the Calibration feature">
238+
<optionalConform>
239+
<feature name="PS"/>
240+
</optionalConform>
241+
</feature>
242+
<feature bit="7" code="PT" name="Protection" summary="Supports the Protection feature">
243+
<optionalConform/>
244+
</feature>
245+
<feature bit="8" code="MO" name="ManuallyOperable" summary="Supports the manual operation feature">
246+
<optionalConform/>
247+
</feature>
248+
<feature bit="9" code="FB" name="Fallback" summary="Supports the fallback feature">
249+
<optionalConform>
250+
<feature name="PS"/>
251+
</optionalConform>
252+
</feature>
253+
</features>
254+
</cluster>
255+
</configurator>

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

+2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
"chime-cluster.xml",
3333
"chip-ota.xml",
3434
"channel-cluster.xml",
35+
"closure-control-cluster.xml",
3536
"clusters-extensions.xml",
3637
"color-control-cluster.xml",
3738
"commissioner-control-cluster.xml",
@@ -200,6 +201,7 @@
200201
],
201202
"Bridged Device Basic Information": ["ProductAppearance"],
202203
"Chime": ["ActiveChimeID", "Enabled"],
204+
"Closure Control": ["OverallState", "OverallTarget"],
203205
"Descriptor": ["ClusterRevision", "FeatureMap"],
204206
"Device Energy Management": [
205207
"ESAType",

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

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
"chime-cluster.xml",
2828
"chip-ota.xml",
2929
"channel-cluster.xml",
30+
"closure-control-cluster.xml",
3031
"clusters-extensions.xml",
3132
"color-control-cluster.xml",
3233
"commissioner-control-cluster.xml",
@@ -194,6 +195,7 @@
194195
],
195196
"Bridged Device Basic Information": ["ProductAppearance"],
196197
"Chime": ["ActiveChimeID", "Enabled"],
198+
"Closure Control": ["OverallState", "OverallTarget"],
197199
"Descriptor": ["ClusterRevision", "FeatureMap"],
198200
"Device Energy Management": [
199201
"ESAType",

src/app/zap_cluster_list.json

+2
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"CHANNEL_CLUSTER": [],
2424
"CHIME_CLUSTER": [],
2525
"CLIENT_MONITORING_CLUSTER": [],
26+
"CLOSURE_CONTROL_CLUSTER": [],
2627
"COLOR_CONTROL_CLUSTER": [],
2728
"COMMISSIONER_CONTROL_CLUSTER": [],
2829
"COMMISSIONING_CLUSTER": [],
@@ -176,6 +177,7 @@
176177
],
177178
"CHANNEL_CLUSTER": ["channel-server"],
178179
"CHIME_CLUSTER": ["chime-server"],
180+
"CLOSURE_CONTROL_CLUSTER": [],
179181
"COLOR_CONTROL_CLUSTER": ["color-control-server"],
180182
"COMMISSIONER_CONTROL_CLUSTER": ["commissioner-control-server"],
181183
"COMMISSIONING_CLUSTER": [],

0 commit comments

Comments
 (0)