Skip to content

Commit 81b3d7b

Browse files
committed
generate xml and zap code for closure dimension cluster
1 parent 5adee57 commit 81b3d7b

File tree

6 files changed

+267
-0
lines changed

6 files changed

+267
-0
lines changed

.github/workflows/tests.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ jobs:
9494
src/app/zap-templates/zcl/data-model/chip/global-attributes.xml \
9595
src/app/zap-templates/zcl/data-model/chip/chime-cluster.xml \
9696
src/app/zap-templates/zcl/data-model/chip/closure-control-cluster.xml \
97+
src/app/zap-templates/zcl/data-model/chip/closure-dimension-cluster.xml \
9798
src/app/zap-templates/zcl/data-model/chip/global-bitmaps.xml \
9899
src/app/zap-templates/zcl/data-model/chip/global-enums.xml \
99100
src/app/zap-templates/zcl/data-model/chip/global-structs.xml \

scripts/rules.matterlint

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ 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";
2323
load "../src/app/zap-templates/zcl/data-model/chip/closure-control-cluster.xml";
24+
load "../src/app/zap-templates/zcl/data-model/chip/closure-dimension-cluster.xml";
2425
load "../src/app/zap-templates/zcl/data-model/chip/clusters-extensions.xml";
2526
load "../src/app/zap-templates/zcl/data-model/chip/color-control-cluster.xml";
2627
load "../src/app/zap-templates/zcl/data-model/chip/commissioner-control-cluster.xml";
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,261 @@
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/ClosureDimension.adoc
20+
Parameters: in-progress
21+
Git: 0.7-summer-2025-513-g8ca88d0f5
22+
-->
23+
<configurator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../zcl.xsd">
24+
<domain name="Closures"/>
25+
<enum name="ClosureUnitEnum" type="enum8">
26+
<cluster code="0x0105"/>
27+
<item name="Millimeter" value="0x00"/>
28+
<item name="Degree" value="0x01"/>
29+
</enum>
30+
31+
<enum name="LatchingEnum" type="enum8">
32+
<cluster code="0x0105"/>
33+
<item name="LatchedAndSecured" value="0x00"/>
34+
<item name="LatchedButNotSecured" value="0x01"/>
35+
<item name="NotLatched" value="0x02"/>
36+
</enum>
37+
38+
<enum name="ModulationTypeEnum" type="enum8">
39+
<cluster code="0x0105"/>
40+
<item name="SlatsOrientation" value="0x00"/>
41+
<item name="SlatsOpenwork" value="0x01"/>
42+
<item name="StripesAlignment" value="0x02"/>
43+
<item name="Opacity" value="0x03"/>
44+
<item name="Ventilation" value="0x04"/>
45+
</enum>
46+
47+
<enum name="OverflowEnum" type="enum8">
48+
<cluster code="0x0105"/>
49+
<item name="NoOverflow" value="0x00"/>
50+
<item name="Inside" value="0x01"/>
51+
<item name="Outside" value="0x02"/>
52+
<item name="TopInside" value="0x03"/>
53+
<item name="TopOutside" value="0x04"/>
54+
<item name="BottomInside" value="0x05"/>
55+
<item name="BottomOutside" value="0x06"/>
56+
<item name="LeftInside" value="0x07"/>
57+
<item name="LeftOutside" value="0x08"/>
58+
<item name="RightInside" value="0x09"/>
59+
<item name="RightOutside" value="0x0A"/>
60+
</enum>
61+
62+
<enum name="RotationAxisEnum" type="enum8">
63+
<cluster code="0x0105"/>
64+
<item name="Left" value="0x00"/>
65+
<item name="CenteredVertical" value="0x01"/>
66+
<item name="LeftAndRight" value="0x02"/>
67+
<item name="Right" value="0x03"/>
68+
<item name="Top" value="0x04"/>
69+
<item name="CenteredHorizontal" value="0x05"/>
70+
<item name="TopAndBottom" value="0x06"/>
71+
<item name="Bottom" value="0x07"/>
72+
<item name="LeftBarrier" value="0x08"/>
73+
<item name="LeftAndRightBarriers" value="0x09"/>
74+
<item name="RightBarrier" value="0x0A"/>
75+
</enum>
76+
77+
<enum name="StepDirectionEnum" type="enum8">
78+
<cluster code="0x0105"/>
79+
<item name="Decrease" value="0x00"/>
80+
<item name="Increase" value="0x01"/>
81+
</enum>
82+
83+
<enum name="TargetLatchEnum" type="enum8">
84+
<cluster code="0x0105"/>
85+
<item name="Latch" value="0x00"/>
86+
<item name="Unlatch" value="0x01"/>
87+
</enum>
88+
89+
<enum name="TranslationDirectionEnum" type="enum8">
90+
<cluster code="0x0105"/>
91+
<item name="Downward" value="0x00"/>
92+
<item name="Upward" value="0x01"/>
93+
<item name="VerticalMask" value="0x02"/>
94+
<item name="VerticalSymmetry" value="0x03"/>
95+
<item name="Leftward" value="0x04"/>
96+
<item name="Rightward" value="0x05"/>
97+
<item name="HorizontalMask" value="0x06"/>
98+
<item name="HorizontalSymmetry" value="0x07"/>
99+
<item name="Forward" value="0x08"/>
100+
<item name="Backward" value="0x09"/>
101+
<item name="DepthMask" value="0x0A"/>
102+
<item name="DepthSymmetry" value="0x0B"/>
103+
<item name="CeilingSimple" value="0x0C"/>
104+
<item name="CeilingMask" value="0x0D"/>
105+
<item name="CeilingSidedSymmetry" value="0x0E"/>
106+
<item name="CeilingCenteredSymmetry" value="0x0F"/>
107+
</enum>
108+
109+
<struct name="CurrentStruct" apiMaturity="provisional">
110+
<cluster code="0x0105"/>
111+
<item fieldId="0" name="Position" type="percent100ths" optional="true"/>
112+
<item fieldId="1" name="Latching" type="LatchingEnum" optional="true" default="0x02" min="0x00" max="0x02"/>
113+
<item fieldId="2" name="Speed" type="ThreeLevelAutoEnum" optional="true" default="0x00" min="0x00" max="0x03"/>
114+
</struct>
115+
116+
<struct name="RangePercent100thsStruct" apiMaturity="provisional">
117+
<cluster code="0x0105"/>
118+
<item fieldId="0" name="Min" type="percent100ths"/>
119+
<item fieldId="1" name="Max" type="percent100ths" max="10000"/>
120+
</struct>
121+
122+
<struct name="TargetStruct" apiMaturity="provisional">
123+
<cluster code="0x0105"/>
124+
<item fieldId="0" name="Position" type="percent100ths" optional="true"/>
125+
<item fieldId="1" name="Latch" type="TargetLatchEnum" optional="true" default="0x01" min="0x00" max="0x01"/>
126+
<item fieldId="2" name="Speed" type="ThreeLevelAutoEnum" optional="true" default="0x00" min="0x00" max="0x03"/>
127+
</struct>
128+
129+
<struct name="UnitRangeStruct" apiMaturity="provisional">
130+
<cluster code="0x0105"/>
131+
<item fieldId="0" name="Min" type="int16s"/>
132+
<item fieldId="1" name="Max" type="int16s" max="32767"/>
133+
</struct>
134+
135+
<cluster apiMaturity="provisional">
136+
<domain>Closures</domain>
137+
<name>Closure Dimension</name>
138+
<code>0x0105</code>
139+
<define>CLOSURE_DIMENSION_CLUSTER</define>
140+
<description>Ceiling values are dedicated for closures that close a ceiling, such as horizontal awnings, pergolas, etc.</description>
141+
<client init="false" tick="false">true</client>
142+
<server init="false" tick="false">true</server>
143+
<globalAttribute code="0xFFFD" side="either" value="1"/>
144+
<attribute code="0x0000" side="server" define="CURRENT" type="CurrentStruct" isNullable="true">Current</attribute>
145+
<attribute code="0x0001" side="server" define="TARGET" type="TargetStruct" isNullable="true">Target</attribute>
146+
<attribute code="0x0002" side="server" define="RESOLUTION" type="percent100ths" min="0" optional="true">
147+
<description>Resolution</description>
148+
<mandatoryConform>
149+
<feature name="PS"/>
150+
</mandatoryConform>
151+
</attribute>
152+
<attribute code="0x0003" side="server" define="STEP_VALUE" type="percent100ths" optional="true">
153+
<description>StepValue</description>
154+
<mandatoryConform>
155+
<feature name="PS"/>
156+
</mandatoryConform>
157+
</attribute>
158+
<attribute code="0x0004" side="server" define="UNIT" type="ClosureUnitEnum" min="0x00" max="0x01" optional="true">
159+
<description>Unit</description>
160+
<mandatoryConform>
161+
<feature name="UT"/>
162+
</mandatoryConform>
163+
</attribute>
164+
<attribute code="0x0005" side="server" define="UNIT_RANGE" type="UnitRangeStruct" isNullable="true" optional="true">
165+
<description>UnitRange</description>
166+
<mandatoryConform>
167+
<feature name="UT"/>
168+
</mandatoryConform>
169+
</attribute>
170+
<attribute code="0x0006" side="server" define="LIMIT_RANGE" type="RangePercent100thsStruct" optional="true">
171+
<description>LimitRange</description>
172+
<mandatoryConform>
173+
<feature name="LM"/>
174+
</mandatoryConform>
175+
</attribute>
176+
<attribute code="0x0007" side="server" define="TRANSLATION_DIRECTION" type="TranslationDirectionEnum" min="0x00" max="0x0F" optional="true">
177+
<description>TranslationDirection</description>
178+
<mandatoryConform>
179+
<feature name="TR"/>
180+
</mandatoryConform>
181+
</attribute>
182+
<attribute code="0x0008" side="server" define="ROTATION_AXIS" type="RotationAxisEnum" min="0x00" max="0x0A" optional="true">
183+
<description>RotationAxis</description>
184+
<mandatoryConform>
185+
<feature name="RO"/>
186+
</mandatoryConform>
187+
</attribute>
188+
<attribute code="0x0009" side="server" define="OVERFLOW" type="OverflowEnum" min="0x00" max="0x0A" optional="true">
189+
<description>Overflow</description>
190+
<otherwiseConform>
191+
<mandatoryConform>
192+
<feature name="RO"/>
193+
</mandatoryConform>
194+
<optionalConform>
195+
<feature name="LT"/>
196+
</optionalConform>
197+
</otherwiseConform>
198+
</attribute>
199+
<attribute code="0x000A" side="server" define="MODULATION_TYPE" type="ModulationTypeEnum" min="0x00" max="0x04" optional="true">
200+
<description>ModulationType</description>
201+
<mandatoryConform>
202+
<feature name="MD"/>
203+
</mandatoryConform>
204+
</attribute>
205+
<command code="0x00" source="client" name="SetTarget" optional="false">
206+
<description>Upon receipt, this SHALL move the product&apos;s dimension in the most fitting state following the data as follows: </description>
207+
<arg id="0" name="Position" type="percent100ths" optional="true"/>
208+
<arg id="1" name="Latch" type="TargetLatchEnum" optional="true" min="0x00" max="0x01"/>
209+
<arg id="2" name="Speed" type="ThreeLevelAutoEnum" optional="true" min="0x00" max="0x03"/>
210+
</command>
211+
212+
<command code="0x01" source="client" name="Step" optional="true">
213+
<description>Upon receipt, this SHALL update the Target.Position attribute value e.g. by sending multiple commands with short step by step or a single command with multiple steps.</description>
214+
<arg id="0" name="Direction" type="StepDirectionEnum" min="0x00" max="0x01"/>
215+
<arg id="1" name="NumberOfSteps" type="int16u" min="1"/>
216+
<arg id="2" name="Speed" type="ThreeLevelAutoEnum" optional="true" min="0x00" max="0x03"/>
217+
<mandatoryConform>
218+
<feature name="PS"/>
219+
</mandatoryConform>
220+
</command>
221+
222+
<features>
223+
<feature bit="0" code="PS" name="Positioning" summary="Supports positioning in the range from 0.00% to 100.00%">
224+
<optionalConform choice="a" more="true" min="1"/>
225+
</feature>
226+
<feature bit="1" code="LT" name="MotionLatching" summary="Supports a latch (securing a position, a state ...)">
227+
<optionalConform choice="a" more="true" min="1"/>
228+
</feature>
229+
<feature bit="2" code="UT" name="Unit" summary="Supports additional data (in mm, degrees ...) to enhance control">
230+
<optionalConform>
231+
<feature name="PS"/>
232+
</optionalConform>
233+
</feature>
234+
<feature bit="3" code="LM" name="Limitation" summary="Supports the limitation of the operating range">
235+
<optionalConform>
236+
<feature name="PS"/>
237+
</optionalConform>
238+
</feature>
239+
<feature bit="4" code="SP" name="Speed" summary="Supports speed motion throttling.">
240+
<optionalConform>
241+
<feature name="PS"/>
242+
</optionalConform>
243+
</feature>
244+
<feature bit="5" code="TR" name="Translation" summary="Drives a translation motion">
245+
<optionalConform choice="b">
246+
<feature name="PS"/>
247+
</optionalConform>
248+
</feature>
249+
<feature bit="6" code="RO" name="Rotation" summary="Drives a rotation motion">
250+
<optionalConform choice="b">
251+
<feature name="PS"/>
252+
</optionalConform>
253+
</feature>
254+
<feature bit="7" code="MD" name="Modulation" summary="Modulates a particular flow level (light, air, privacy ...)">
255+
<optionalConform choice="b">
256+
<feature name="PS"/>
257+
</optionalConform>
258+
</feature>
259+
</features>
260+
</cluster>
261+
</configurator>

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

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"chip-ota.xml",
3434
"channel-cluster.xml",
3535
"closure-control-cluster.xml",
36+
"closure-dimension-cluster.xml",
3637
"clusters-extensions.xml",
3738
"color-control-cluster.xml",
3839
"commissioner-control-cluster.xml",

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

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"chip-ota.xml",
2929
"channel-cluster.xml",
3030
"closure-control-cluster.xml",
31+
"closure-dimension-cluster.xml",
3132
"clusters-extensions.xml",
3233
"color-control-cluster.xml",
3334
"commissioner-control-cluster.xml",

src/app/zap_cluster_list.json

+2
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"CHIME_CLUSTER": [],
2525
"CLIENT_MONITORING_CLUSTER": [],
2626
"CLOSURE_CONTROL_CLUSTER": [],
27+
"CLOSURE_DIMENSION_CLUSTER": [],
2728
"COLOR_CONTROL_CLUSTER": [],
2829
"COMMISSIONER_CONTROL_CLUSTER": [],
2930
"COMMISSIONING_CLUSTER": [],
@@ -179,6 +180,7 @@
179180
"CHANNEL_CLUSTER": ["channel-server"],
180181
"CHIME_CLUSTER": ["chime-server"],
181182
"CLOSURE_CONTROL_CLUSTER": ["closure-control-server"],
183+
"CLOSURE_DIMENSION_CLUSTER": [],
182184
"COLOR_CONTROL_CLUSTER": ["color-control-server"],
183185
"COMMISSIONER_CONTROL_CLUSTER": ["commissioner-control-server"],
184186
"COMMISSIONING_CLUSTER": [],

0 commit comments

Comments
 (0)