Skip to content

Commit 20abc2f

Browse files
committedMar 12, 2025
Updated the closure control cluster XML and ZAP code to align with the latest spec
1 parent 0bae36f commit 20abc2f

Some content is hidden

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

42 files changed

+458
-3744
lines changed
 

‎examples/closure-app/closure-common/closure-app.matter

+11-51
Original file line numberDiff line numberDiff line change
@@ -2217,7 +2217,7 @@ cluster IcdManagement = 70 {
22172217
}
22182218

22192219
/** This cluster provides an interface for controlling a Closure device. */
2220-
cluster ClosureControl = 260 {
2220+
provisional cluster ClosureControl = 260 {
22212221
revision 1;
22222222

22232223
enum ClosureErrorEnum : enum8 {
@@ -2242,7 +2242,6 @@ cluster ClosureControl = 260 {
22422242
kProtected = 5;
22432243
kDisengaged = 6;
22442244
kSetupRequired = 7;
2245-
kPendingFallback = 8;
22462245
}
22472246

22482247
enum PositioningEnum : enum8 {
@@ -2254,39 +2253,17 @@ cluster ClosureControl = 260 {
22542253
kOpenedAtSignature = 5;
22552254
}
22562255

2257-
enum RestingProcedureEnum : enum8 {
2258-
kDoNothing = 0;
2259-
kReturnToFullyOpened = 1;
2260-
kReturnToFullyClosed = 2;
2261-
}
2262-
2263-
enum TagLatchEnum : enum8 {
2256+
enum TargetLatchEnum : enum8 {
22642257
kLatch = 0;
22652258
kUnlatch = 1;
22662259
}
22672260

2268-
enum TagPositionEnum : enum8 {
2261+
enum TargetPositionEnum : enum8 {
22692262
kCloseInFull = 0;
22702263
kOpenInFull = 1;
22712264
kPedestrian = 2;
22722265
kVentilation = 3;
22732266
kSignature = 4;
2274-
kSequenceNextStep = 5;
2275-
kPedestrianNextStep = 6;
2276-
}
2277-
2278-
enum TriggerConditionEnum : enum8 {
2279-
kAfterDelay = 0;
2280-
kAfterApplicativeTrigger = 1;
2281-
kAfterDelayOrApplicativeTrigger = 2;
2282-
}
2283-
2284-
enum TriggerPositionEnum : enum8 {
2285-
kAtFullyClosed = 0;
2286-
kAtFullyOpened = 1;
2287-
kInBetween = 2;
2288-
kAtVentilation = 3;
2289-
kAtPedestrian = 4;
22902267
}
22912268

22922269
bitmap Feature : bitmap32 {
@@ -2299,19 +2276,18 @@ cluster ClosureControl = 260 {
22992276
kCalibration = 0x40;
23002277
kProtection = 0x80;
23012278
kManuallyOperable = 0x100;
2302-
kFallback = 0x200;
23032279
}
23042280

23052281
struct OverallStateStruct {
2306-
optional PositioningEnum positioning = 0;
2307-
optional LatchingEnum latching = 1;
2308-
optional ThreeLevelAutoEnum speed = 2;
2309-
optional bitmap32 extraInfo = 3;
2282+
optional nullable PositioningEnum positioning = 0;
2283+
optional nullable LatchingEnum latching = 1;
2284+
optional nullable ThreeLevelAutoEnum speed = 2;
2285+
optional nullable bitmap32 extraInfo = 3;
23102286
}
23112287

23122288
struct OverallTargetStruct {
2313-
optional TagPositionEnum tagPosition = 0;
2314-
optional TagLatchEnum tagLatch = 1;
2289+
optional TargetPositionEnum position = 0;
2290+
optional TargetLatchEnum latch = 1;
23152291
optional ThreeLevelAutoEnum speed = 2;
23162292
}
23172293

@@ -2320,11 +2296,6 @@ cluster ClosureControl = 260 {
23202296
readonly attribute ClosureErrorEnum currentErrorList[] = 2;
23212297
readonly attribute nullable OverallStateStruct overallState = 3;
23222298
readonly attribute nullable OverallTargetStruct overallTarget = 4;
2323-
readonly attribute optional RestingProcedureEnum restingProcedure = 5;
2324-
readonly attribute optional TriggerConditionEnum triggerCondition = 6;
2325-
readonly attribute optional TriggerPositionEnum triggerPosition = 7;
2326-
readonly attribute optional elapsed_s waitingDelay = 8;
2327-
readonly attribute optional elapsed_s kickoffTimer = 9;
23282299
readonly attribute command_id generatedCommandList[] = 65528;
23292300
readonly attribute command_id acceptedCommandList[] = 65529;
23302301
readonly attribute event_id eventList[] = 65530;
@@ -2333,28 +2304,17 @@ cluster ClosureControl = 260 {
23332304
readonly attribute int16u clusterRevision = 65533;
23342305

23352306
request struct MoveToRequest {
2336-
optional TagPositionEnum tag = 0;
2337-
optional TagLatchEnum latch = 1;
2307+
optional TargetPositionEnum position = 0;
2308+
optional TargetLatchEnum latch = 1;
23382309
optional ThreeLevelAutoEnum speed = 2;
23392310
}
23402311

2341-
request struct ConfigureFallbackRequest {
2342-
optional RestingProcedureEnum restingProcedure = 0;
2343-
optional TriggerConditionEnum triggerCondition = 1;
2344-
optional TriggerPositionEnum triggerPosition = 2;
2345-
optional elapsed_s waitingDelay = 3;
2346-
}
2347-
23482312
/** 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. */
23492313
command Stop(): DefaultSuccess = 0;
23502314
/** Upon receipt, this SHALL move the product in the most fitting state following the data as follows: */
23512315
command MoveTo(MoveToRequest): DefaultSuccess = 1;
23522316
/** Upon receipt, this SHALL initiate a calibration. */
23532317
command access(invoke: manage) Calibrate(): DefaultSuccess = 2;
2354-
/** Upon receipt, this SHALL configure the Fallback feature behavior using the data as follows: */
2355-
command ConfigureFallback(ConfigureFallbackRequest): DefaultSuccess = 3;
2356-
/** Upon receipt, this SHALL cancel the current PendingFallback. */
2357-
command CancelFallback(): DefaultSuccess = 4;
23582318
}
23592319

23602320
endpoint 0 {

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

+13-92
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ limitations under the License.
1818
XML generated by Alchemy; DO NOT EDIT.
1919
Source: src/app_clusters/ClosureControl.adoc
2020
Parameters: in-progress
21-
Git: 0.7-summer-2025-5-g06c4d5596-dirty
21+
Git: 0.7-summer-2025-508-gf2136a278-dirty
2222
-->
2323
<configurator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../zcl.xsd">
2424
<domain name="Closures"/>
@@ -47,7 +47,6 @@ Git: 0.7-summer-2025-5-g06c4d5596-dirty
4747
<item name="Protected" value="0x05"/>
4848
<item name="Disengaged" value="0x06"/>
4949
<item name="SetupRequired" value="0x07"/>
50-
<item name="PendingFallback" value="0x08"/>
5150
</enum>
5251

5352
<enum name="PositioningEnum" type="enum8">
@@ -60,62 +59,37 @@ Git: 0.7-summer-2025-5-g06c4d5596-dirty
6059
<item name="OpenedAtSignature" value="0x05"/>
6160
</enum>
6261

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">
62+
<enum name="TargetLatchEnum" type="enum8">
7163
<cluster code="0x0104"/>
7264
<item name="Latch" value="0x00"/>
7365
<item name="Unlatch" value="0x01"/>
7466
</enum>
7567

76-
<enum name="TagPositionEnum" type="enum8">
68+
<enum name="TargetPositionEnum" type="enum8">
7769
<cluster code="0x0104"/>
7870
<item name="CloseInFull" value="0x00"/>
7971
<item name="OpenInFull" value="0x01"/>
8072
<item name="Pedestrian" value="0x02"/>
8173
<item name="Ventilation" value="0x03"/>
8274
<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"/>
10175
</enum>
10276

10377
<struct name="OverallStateStruct" apiMaturity="provisional">
10478
<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"/>
79+
<item fieldId="0" name="Positioning" type="PositioningEnum" optional="true" default="0x02" min="0x00" max="0x05" isNullable="true"/>
80+
<item fieldId="1" name="Latching" type="LatchingEnum" optional="true" default="0x02" min="0x00" max="0x02" isNullable="true"/>
81+
<item fieldId="2" name="Speed" type="ThreeLevelAutoEnum" optional="true" default="0x00" min="0x00" max="0x03" isNullable="true"/>
82+
<item fieldId="3" name="ExtraInfo" type="bitmap32" optional="true" isNullable="true"/>
10983
</struct>
11084

11185
<struct name="OverallTargetStruct" apiMaturity="provisional">
11286
<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"/>
87+
<item fieldId="0" name="Position" type="TargetPositionEnum" optional="true" min="0x00" max="0x04"/>
88+
<item fieldId="1" name="Latch" type="TargetLatchEnum" optional="true" min="0x00" max="0x01"/>
11589
<item fieldId="2" name="Speed" type="ThreeLevelAutoEnum" optional="true" min="0x00" max="0x03"/>
11690
</struct>
11791

118-
<cluster>
92+
<cluster apiMaturity="provisional">
11993
<domain>Closures</domain>
12094
<name>Closure Control</name>
12195
<code>0x0104</code>
@@ -128,40 +102,10 @@ Git: 0.7-summer-2025-5-g06c4d5596-dirty
128102
<description>CountdownTime</description>
129103
<optionalConform/>
130104
</attribute>
131-
<attribute code="0x0001" side="server" define="MAIN_STATE" type="MainStateEnum" min="0x00" max="0x08">MainState</attribute>
105+
<attribute code="0x0001" side="server" define="MAIN_STATE" type="MainStateEnum" min="0x00" max="0x07">MainState</attribute>
132106
<attribute code="0x0002" side="server" define="CURRENT_ERROR_LIST" type="array" entryType="ClosureErrorEnum">CurrentErrorList</attribute>
133107
<attribute code="0x0003" side="server" define="OVERALL_STATE" type="OverallStateStruct" isNullable="true">OverallState</attribute>
134108
<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>
165109
<command code="0x00" source="client" name="Stop" optional="true">
166110
<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>
167111
<mandatoryConform>
@@ -173,8 +117,8 @@ Git: 0.7-summer-2025-5-g06c4d5596-dirty
173117

174118
<command code="0x01" source="client" name="MoveTo" optional="false">
175119
<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"/>
120+
<arg id="0" name="Position" type="TargetPositionEnum" optional="true" min="0x00" max="0x04"/>
121+
<arg id="1" name="Latch" type="TargetLatchEnum" optional="true" min="0x00" max="0x01"/>
178122
<arg id="2" name="Speed" type="ThreeLevelAutoEnum" optional="true" min="0x00" max="0x03"/>
179123
</command>
180124

@@ -186,24 +130,6 @@ Git: 0.7-summer-2025-5-g06c4d5596-dirty
186130
</mandatoryConform>
187131
</command>
188132

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-
207133
<features>
208134
<feature bit="0" code="PS" name="Positioning" summary="Supports positioning with at least Fully Opened (0%) and Fully Closed (100%) discrete position">
209135
<optionalConform choice="a" more="true" min="1"/>
@@ -245,11 +171,6 @@ Git: 0.7-summer-2025-5-g06c4d5596-dirty
245171
<feature bit="8" code="MO" name="ManuallyOperable" summary="Supports the manual operation feature">
246172
<optionalConform/>
247173
</feature>
248-
<feature bit="9" code="FB" name="Fallback" summary="Supports the fallback feature">
249-
<optionalConform>
250-
<feature name="PS"/>
251-
</optionalConform>
252-
</feature>
253174
</features>
254175
</cluster>
255176
</configurator>

0 commit comments

Comments
 (0)