Skip to content

Commit e7902af

Browse files
committed
closure control cluster XML genartion with alchemy
1 parent 92f9f0b commit e7902af

File tree

6 files changed

+256
-0
lines changed

6 files changed

+256
-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 \

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";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,250 @@
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+
</enum>
97+
98+
<struct name="OverallStateStruct" apiMaturity="provisional">
99+
<cluster code="0x0104"/>
100+
<item fieldId="0" name="Positioning" type="PositioningEnum" optional="true" default="0x02" min="0x00" max="0x05"/>
101+
<item fieldId="1" name="Latching" type="LatchingEnum" optional="true" default="0x02" min="0x00" max="0x02"/>
102+
<item fieldId="2" name="Speed" type="ThreeLevelAutoEnum" optional="true" default="0x00" min="0x00" max="0x03"/>
103+
<item fieldId="3" name="ExtraInfo" type="bitmap32" optional="true"/>
104+
</struct>
105+
106+
<struct name="OverallTargetStruct" apiMaturity="provisional">
107+
<cluster code="0x0104"/>
108+
<item fieldId="0" name="TagPosition" type="TagPositionEnum" optional="true" min="0x00" max="0x06"/>
109+
<item fieldId="1" name="TagLatch" type="TagLatchEnum" optional="true" min="0x00" max="0x01"/>
110+
<item fieldId="2" name="Speed" type="ThreeLevelAutoEnum" optional="true" min="0x00" max="0x03"/>
111+
</struct>
112+
113+
<cluster>
114+
<domain>Closures</domain>
115+
<name>Closure Control</name>
116+
<code>0x0104</code>
117+
<define>CLOSURE_CONTROL_CLUSTER</define>
118+
<description/>
119+
<client init="false" tick="false">true</client>
120+
<server init="false" tick="false">true</server>
121+
<globalAttribute code="0xFFFD" side="either" value="1"/>
122+
<attribute code="0x0000" side="server" define="COUNTDOWN_TIME" type="elapsed_s" isNullable="true" max="259200" optional="true">
123+
<description>CountdownTime</description>
124+
<optionalConform/>
125+
</attribute>
126+
<attribute code="0x0001" side="server" define="MAIN_STATE" type="MainStateEnum" min="0x00" max="0x08">MainState</attribute>
127+
<attribute code="0x0002" side="server" define="CURRENT_ERROR_LIST" type="array" entryType="ClosureErrorEnum">CurrentErrorList</attribute>
128+
<attribute code="0x0003" side="server" define="OVERALL_STATE" type="OverallStateStruct" isNullable="true">OverallState</attribute>
129+
<attribute code="0x0004" side="server" define="OVERALL_TARGET" type="OverallTargetStruct" isNullable="true">OverallTarget</attribute>
130+
<attribute code="0x0005" side="server" define="RESTING_PROCEDURE" type="RestingProcedureEnum" min="0x00" max="0x02" optional="true">
131+
<description>RestingProcedure</description>
132+
<mandatoryConform>
133+
<feature name="FB"/>
134+
</mandatoryConform>
135+
</attribute>
136+
<attribute code="0x0006" side="server" define="TRIGGER_CONDITION" type="TriggerConditionEnum" min="0x00" max="0x02" optional="true">
137+
<description>TriggerCondition</description>
138+
<mandatoryConform>
139+
<feature name="FB"/>
140+
</mandatoryConform>
141+
</attribute>
142+
<attribute code="0x0007" side="server" define="TRIGGER_POSITION" type="TriggerPositionEnum" optional="true">
143+
<description>TriggerPosition</description>
144+
<mandatoryConform>
145+
<feature name="FB"/>
146+
</mandatoryConform>
147+
</attribute>
148+
<attribute code="0x0008" side="server" define="WAITING_DELAY" type="elapsed_s" max="86400" default="60" optional="true">
149+
<description>WaitingDelay</description>
150+
<mandatoryConform>
151+
<feature name="FB"/>
152+
</mandatoryConform>
153+
</attribute>
154+
<attribute code="0x0009" side="server" define="KICKOFF_TIMER" type="elapsed_s" max="86400" default="0" optional="true">
155+
<description>KickoffTimer</description>
156+
<mandatoryConform>
157+
<feature name="FB"/>
158+
</mandatoryConform>
159+
</attribute>
160+
<command code="0x00" source="client" name="Stop" optional="true">
161+
<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>
162+
<mandatoryConform>
163+
<notTerm>
164+
<feature name="IS"/>
165+
</notTerm>
166+
</mandatoryConform>
167+
</command>
168+
169+
<command code="0x01" source="client" name="MoveTo" optional="false">
170+
<description>Upon receipt, this SHALL move the product in the most fitting state following the data as follows: </description>
171+
<arg id="0" name="Tag" type="TagPositionEnum" optional="true" min="0x00" max="0x06"/>
172+
<arg id="1" name="Latch" type="TagLatchEnum" optional="true" min="0x00" max="0x01"/>
173+
<arg id="2" name="Speed" type="ThreeLevelAutoEnum" optional="true" min="0x00" max="0x03"/>
174+
</command>
175+
176+
<command code="0x02" source="client" name="Calibrate" optional="true">
177+
<description>Upon receipt, this SHALL initiate a calibration.</description>
178+
<access op="invoke" privilege="manage"/>
179+
<mandatoryConform>
180+
<feature name="CL"/>
181+
</mandatoryConform>
182+
</command>
183+
184+
<command code="0x03" source="client" name="ConfigureFallback" optional="true">
185+
<description>Upon receipt, this SHALL configure the Fallback feature behavior using the data as follows: </description>
186+
<arg id="0" name="RestingProcedure" type="RestingProcedureEnum" optional="true" min="0x00" max="0x02"/>
187+
<arg id="1" name="TriggerCondition" type="TriggerConditionEnum" optional="true" min="0x00" max="0x02"/>
188+
<arg id="2" name="TriggerPosition" type="TriggerPositionEnum" optional="true"/>
189+
<arg id="3" name="WaitingDelay" type="elapsed_s" optional="true" max="86400"/>
190+
<mandatoryConform>
191+
<feature name="FB"/>
192+
</mandatoryConform>
193+
</command>
194+
195+
<command code="0x04" source="client" name="CancelFallback" optional="true">
196+
<description>Upon receipt, this SHALL cancel the current PendingFallback.</description>
197+
<mandatoryConform>
198+
<feature name="FB"/>
199+
</mandatoryConform>
200+
</command>
201+
202+
<features>
203+
<feature bit="0" code="PS" name="Positioning" summary="Supports positioning with at least Fully Opened (0%) and Fully Closed (100%) discrete position">
204+
<optionalConform choice="a" more="true" min="1"/>
205+
</feature>
206+
<feature bit="1" code="LT" name="MotionLatching" summary="Supports a latch (securing a position, a state ...)">
207+
<optionalConform choice="a" more="true" min="1"/>
208+
</feature>
209+
<feature bit="2" code="IS" name="Instantaneous" summary="Supports the Instantaneous feature">
210+
<optionalConform/>
211+
</feature>
212+
<feature bit="3" code="SP" name="Speed" summary="Supports speed motion throttling">
213+
<optionalConform>
214+
<andTerm>
215+
<feature name="PS"/>
216+
<notTerm>
217+
<feature name="IS"/>
218+
</notTerm>
219+
</andTerm>
220+
</optionalConform>
221+
</feature>
222+
<feature bit="4" code="VT" name="Ventilation" summary="Supports Ventilation discrete state">
223+
<optionalConform>
224+
<feature name="PS"/>
225+
</optionalConform>
226+
</feature>
227+
<feature bit="5" code="PD" name="Pedestrian" summary="Supports Pedestrian discrete state">
228+
<optionalConform>
229+
<feature name="PS"/>
230+
</optionalConform>
231+
</feature>
232+
<feature bit="6" code="CL" name="Calibration" summary="Supports the Calibration feature">
233+
<optionalConform>
234+
<feature name="PS"/>
235+
</optionalConform>
236+
</feature>
237+
<feature bit="7" code="PT" name="Protection" summary="Supports the Protection feature">
238+
<optionalConform/>
239+
</feature>
240+
<feature bit="8" code="MO" name="ManuallyOperable" summary="Supports the manual operation feature">
241+
<optionalConform/>
242+
</feature>
243+
<feature bit="9" code="FB" name="Fallback" summary="Supports the fallback feature">
244+
<optionalConform>
245+
<feature name="PS"/>
246+
</optionalConform>
247+
</feature>
248+
</features>
249+
</cluster>
250+
</configurator>

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

+1
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",

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

+1
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",

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)