Skip to content

Commit e2d3ea5

Browse files
authored
Generate occupancySensing cluster with Alchemy (project-chip#37913)
* Generate occupancySensing cluster with Alchemy * Generate XML using latest Alchemy version
1 parent 1114858 commit e2d3ea5

File tree

1 file changed

+49
-79
lines changed

1 file changed

+49
-79
lines changed

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

+49-79
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0"?>
22
<!--
3-
Copyright (c) 2023 Project CHIP Authors
3+
Copyright (c) 2023-2025 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.
@@ -14,9 +14,14 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1414
See the License for the specific language governing permissions and
1515
limitations under the License.
1616
-->
17-
<configurator>
17+
<!--
18+
XML generated by Alchemy; DO NOT EDIT.
19+
Source: src/app_clusters/OccupancySensing.adoc
20+
Parameters: in-progress
21+
Git:
22+
-->
23+
<configurator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../zcl.xsd">
1824
<domain name="Measurement &amp; Sensing"/>
19-
2025
<bitmap name="OccupancyBitmap" type="bitmap8">
2126
<cluster code="0x0406"/>
2227
<field name="Occupied" mask="0x1"/>
@@ -38,10 +43,11 @@ limitations under the License.
3843
</bitmap>
3944

4045
<struct apiMaturity="provisional" name="HoldTimeLimitsStruct">
41-
<cluster code="0x0406"/> <!-- Occupancy Sensing Cluster -->
42-
<item name="HoldTimeMin" fieldId="0" type="int16u" optional="false"/>
43-
<item name="HoldTimeMax" fieldId="1" type="int16u" optional="false"/>
44-
<item name="HoldTimeDefault" fieldId="2" type="int16u" optional="false"/>
46+
<cluster code="0x0406"/>
47+
<!-- Occupancy Sensing Cluster -->
48+
<item fieldId="0" name="HoldTimeMin" type="int16u" min="1"/>
49+
<item fieldId="1" name="HoldTimeMax" type="int16u" min="1" max="1"/>
50+
<item fieldId="2" name="HoldTimeDefault" type="int16u" min="1" max="1"/>
4551
</struct>
4652

4753
<cluster>
@@ -50,68 +56,48 @@ limitations under the License.
5056
<description>The server cluster provides an interface to occupancy sensing functionality based on one or more sensing modalities, including configuration and provision of notifications of occupancy status.</description>
5157
<code>0x0406</code>
5258
<define>OCCUPANCY_SENSING_CLUSTER</define>
53-
5459
<features>
55-
<feature apiMaturity="provisional" bit="0" code="OTHER" name="Other" summary="Supports sensing using a modality not listed in the other bits">
56-
<optionalConform choice="a" more="true"/>
57-
</feature>
58-
<feature apiMaturity="provisional" bit="1" code="PIR" name="PassiveInfrared" summary="Supports sensing using PIR (Passive InfraRed)">
59-
<optionalConform choice="a" more="true"/>
60-
</feature>
61-
<feature apiMaturity="provisional" bit="2" code="US" name="Ultrasonic" summary="Supports sensing using UltraSound">
62-
<optionalConform choice="a" more="true"/>
63-
</feature>
64-
<feature apiMaturity="provisional" bit="3" code="PHY" name="PhysicalContact" summary="Supports sensing using a physical contact">
65-
<optionalConform choice="a" more="true"/>
66-
</feature>
67-
<feature apiMaturity="provisional" bit="4" code="AIR" name="ActiveInfrared" summary="Supports sensing using Active InfraRed measurement (e.g. time-of-flight or transflective/reflective IR sensing)">
68-
<optionalConform choice="a" more="true"/>
69-
</feature>
70-
<feature apiMaturity="provisional" bit="5" code="RAD" name="Radar" summary="Supports sensing using radar waves (microwave)">
71-
<optionalConform choice="a" more="true"/>
72-
</feature>
73-
<feature apiMaturity="provisional" bit="6" code="RFS" name="RFSensing" summary="Supports sensing based on RF signal analysis">
74-
<optionalConform choice="a" more="true"/>
75-
</feature>
76-
<feature apiMaturity="provisional" bit="7" code="VIS" name="Vision" summary="Supports sensing based on analyzing images">
77-
<optionalConform choice="a" more="true"/>
78-
</feature>
60+
<feature bit="0" code="OTHER" name="Other" summary="Supports sensing using a modality not listed in the other bits">
61+
<optionalConform choice="a" more="true" min="1"/>
62+
</feature>
63+
<feature bit="1" code="PIR" name="PassiveInfrared" summary="Supports sensing using PIR (Passive InfraRed)">
64+
<optionalConform choice="a" more="true" min="1"/>
65+
</feature>
66+
<feature bit="2" code="US" name="Ultrasonic" summary="Supports sensing using UltraSound">
67+
<optionalConform choice="a" more="true" min="1"/>
68+
</feature>
69+
<feature bit="3" code="PHY" name="PhysicalContact" summary="Supports sensing using a physical contact">
70+
<optionalConform choice="a" more="true" min="1"/>
71+
</feature>
72+
<feature bit="4" code="AIR" name="ActiveInfrared" summary="Supports sensing using Active InfraRed measurement (e.g. time-of-flight or transflective/reflective IR sensing)">
73+
<optionalConform choice="a" more="true" min="1"/>
74+
</feature>
75+
<feature bit="5" code="RAD" name="Radar" summary="Supports sensing using radar waves (microwave)">
76+
<optionalConform choice="a" more="true" min="1"/>
77+
</feature>
78+
<feature bit="6" code="RFS" name="RFSensing" summary="Supports sensing based on RF signal analysis">
79+
<optionalConform choice="a" more="true" min="1"/>
80+
</feature>
81+
<feature bit="7" code="VIS" name="Vision" summary="Supports sensing based on analyzing images">
82+
<optionalConform choice="a" more="true" min="1"/>
83+
</feature>
7984
</features>
80-
8185
<client tick="false" init="false">true</client>
8286
<server tick="false" tickFrequency="half" init="false">true</server>
83-
8487
<globalAttribute side="either" code="0xFFFD" value="5"/>
85-
86-
<attribute side="server" code="0x0000" name="Occupancy" define="OCCUPANCY" type="OccupancyBitmap" min="0x00" max="0x01" reportable="true">
87-
<mandatoryConform/>
88-
</attribute>
89-
<attribute side="server" code="0x0001" name="OccupancySensorType" define="OCCUPANCY_SENSOR_TYPE" type="OccupancySensorTypeEnum" min="0x00" max="0xFE">
90-
<otherwiseConform>
91-
<mandatoryConform/>
92-
<deprecateConform/>
93-
</otherwiseConform>
94-
</attribute>
95-
<attribute side="server" code="0x0002" name="OccupancySensorTypeBitmap" define="OCCUPANCY_SENSOR_TYPE_BITMAP" type="OccupancySensorTypeBitmap" min="0x00" max="0x07">
96-
<otherwiseConform>
97-
<mandatoryConform/>
98-
<deprecateConform/>
99-
</otherwiseConform>
100-
</attribute>
101-
102-
<attribute side="server" code="0x0003" name="HoldTime" define="HOLD_TIME" type="int16u" writable="true" optional="true">
88+
<attribute side="server" code="0x0000" name="Occupancy" define="OCCUPANCY" type="OccupancyBitmap" min="0x00" max="0x01"/>
89+
<attribute side="server" code="0x0001" name="OccupancySensorType" define="OCCUPANCY_SENSOR_TYPE" type="OccupancySensorTypeEnum" min="0x00" max="0x03"/>
90+
<attribute side="server" code="0x0002" name="OccupancySensorTypeBitmap" define="OCCUPANCY_SENSOR_TYPE_BITMAP" type="OccupancySensorTypeBitmap" min="0x00" max="0x07"/>
91+
<attribute side="server" code="0x0003" name="HoldTime" define="HOLD_TIME" type="int16u" writable="true" optional="true" min="0" max="65535">
10392
<access op="write" privilege="manage"/>
10493
<optionalConform/>
10594
</attribute>
106-
10795
<attribute side="server" code="0x0004" name="HoldTimeLimits" define="HOLD_TIME_LIMITS" type="HoldTimeLimitsStruct" optional="true">
10896
<mandatoryConform>
10997
<attribute name="HoldTime"/>
11098
</mandatoryConform>
11199
</attribute>
112-
113-
<attribute side="server" code="0x0010" name="PIROccupiedToUnoccupiedDelay" define="PIR_OCCUPIED_TO_UNOCCUPIED_DELAY" type="int16u" writable="true" default="0x0000" optional="true">
114-
<access op="read" role="view"/>
100+
<attribute side="server" code="0x0010" name="PIROccupiedToUnoccupiedDelay" define="PIR_OCCUPIED_TO_UNOCCUPIED_DELAY" type="int16u" writable="true" default="0x0000" optional="true" min="0" max="65535">
115101
<access op="write" role="manage"/>
116102
<otherwiseConform>
117103
<optionalConform>
@@ -136,9 +122,7 @@ limitations under the License.
136122
<deprecateConform/>
137123
</otherwiseConform>
138124
</attribute>
139-
140-
<attribute side="server" code="0x0011" name="PIRUnoccupiedToOccupiedDelay" define="PIR_UNOCCUPIED_TO_OCCUPIED_DELAY" type="int16u" writable="true" default="0x0000" optional="true">
141-
<access op="read" role="view"/>
125+
<attribute side="server" code="0x0011" name="PIRUnoccupiedToOccupiedDelay" define="PIR_UNOCCUPIED_TO_OCCUPIED_DELAY" type="int16u" writable="true" default="0x0000" optional="true" min="0" max="65535">
142126
<access op="write" role="manage"/>
143127
<otherwiseConform>
144128
<mandatoryConform>
@@ -185,9 +169,7 @@ limitations under the License.
185169
<deprecateConform/>
186170
</otherwiseConform>
187171
</attribute>
188-
189172
<attribute side="server" code="0x0012" name="PIRUnoccupiedToOccupiedThreshold" define="PIR_UNOCCUPIED_TO_OCCUPIED_THRESHOLD" type="int8u" min="0x01" max="0xFE" writable="true" default="0x01" optional="true">
190-
<access op="read" role="view"/>
191173
<access op="write" role="manage"/>
192174
<otherwiseConform>
193175
<mandatoryConform>
@@ -234,9 +216,7 @@ limitations under the License.
234216
<deprecateConform/>
235217
</otherwiseConform>
236218
</attribute>
237-
238-
<attribute side="server" code="0x0020" name="UltrasonicOccupiedToUnoccupiedDelay" define="ULTRASONIC_OCCUPIED_TO_UNOCCUPIED_DELAY" type="int16u" writable="true" default="0x0000" optional="true">
239-
<access op="read" role="view"/>
219+
<attribute side="server" code="0x0020" name="UltrasonicOccupiedToUnoccupiedDelay" define="ULTRASONIC_OCCUPIED_TO_UNOCCUPIED_DELAY" type="int16u" writable="true" default="0x0000" optional="true" min="0" max="65535">
240220
<access op="write" role="manage"/>
241221
<otherwiseConform>
242222
<optionalConform>
@@ -248,9 +228,7 @@ limitations under the License.
248228
<deprecateConform/>
249229
</otherwiseConform>
250230
</attribute>
251-
252-
<attribute side="server" code="0x0021" name="UltrasonicUnoccupiedToOccupiedDelay" define="ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_DELAY" type="int16u" writable="true" default="0x0000" optional="true">
253-
<access op="read" role="view"/>
231+
<attribute side="server" code="0x0021" name="UltrasonicUnoccupiedToOccupiedDelay" define="ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_DELAY" type="int16u" writable="true" default="0x0000" optional="true" min="0" max="65535">
254232
<access op="write" role="manage"/>
255233
<otherwiseConform>
256234
<mandatoryConform>
@@ -269,9 +247,7 @@ limitations under the License.
269247
<deprecateConform/>
270248
</otherwiseConform>
271249
</attribute>
272-
273250
<attribute side="server" code="0x0022" name="UltrasonicUnoccupiedToOccupiedThreshold" define="ULTRASONIC_UNOCCUPIED_TO_OCCUPIED_THRESHOLD" type="int8u" min="0x01" max="0xFE" writable="true" default="0x01" optional="true">
274-
<access op="read" role="view"/>
275251
<access op="write" role="manage"/>
276252
<otherwiseConform>
277253
<mandatoryConform>
@@ -290,9 +266,7 @@ limitations under the License.
290266
<deprecateConform/>
291267
</otherwiseConform>
292268
</attribute>
293-
294-
<attribute side="server" code="0x0030" name="PhysicalContactOccupiedToUnoccupiedDelay" define="PHYSICAL_CONTACT_OCCUPIED_TO_UNOCCUPIED_DELAY" type="int16u" writable="true" default="0x0000" optional="true">
295-
<access op="read" role="view"/>
269+
<attribute side="server" code="0x0030" name="PhysicalContactOccupiedToUnoccupiedDelay" define="PHYSICAL_CONTACT_OCCUPIED_TO_UNOCCUPIED_DELAY" type="int16u" writable="true" default="0x0000" optional="true" min="0" max="65535">
296270
<access op="write" role="manage"/>
297271
<otherwiseConform>
298272
<optionalConform>
@@ -304,9 +278,7 @@ limitations under the License.
304278
<deprecateConform/>
305279
</otherwiseConform>
306280
</attribute>
307-
308-
<attribute side="server" code="0x0031" name="PhysicalContactUnoccupiedToOccupiedDelay" define="PHYSICAL_CONTACT_UNOCCUPIED_TO_OCCUPIED_DELAY" type="int16u" writable="true" default="0x0000" optional="true">
309-
<access op="read" role="view"/>
281+
<attribute side="server" code="0x0031" name="PhysicalContactUnoccupiedToOccupiedDelay" define="PHYSICAL_CONTACT_UNOCCUPIED_TO_OCCUPIED_DELAY" type="int16u" writable="true" default="0x0000" optional="true" min="0" max="65535">
310282
<access op="write" role="manage"/>
311283
<otherwiseConform>
312284
<mandatoryConform>
@@ -325,9 +297,7 @@ limitations under the License.
325297
<deprecateConform/>
326298
</otherwiseConform>
327299
</attribute>
328-
329300
<attribute side="server" code="0x0032" name="PhysicalContactUnoccupiedToOccupiedThreshold" define="PHYSICAL_CONTACT_UNOCCUPIED_TO_OCCUPIED_THRESHOLD" type="int8u" min="0x01" max="0xFE" writable="true" default="0x01" optional="true">
330-
<access op="read" role="view"/>
331301
<access op="write" role="manage"/>
332302
<otherwiseConform>
333303
<mandatoryConform>
@@ -346,11 +316,11 @@ limitations under the License.
346316
<deprecateConform/>
347317
</otherwiseConform>
348318
</attribute>
349-
350319
<event side="server" code="0x00" priority="info" name="OccupancyChanged" optional="true">
351320
<description>If this event is supported, it SHALL be generated when the Occupancy attribute changes.</description>
352-
<field id="0" name="Occupancy" type="OccupancyBitmap"/>
321+
<field id="0" name="Occupancy" type="OccupancyBitmap" min="0x00" max="0x01"/>
353322
<optionalConform/>
354323
</event>
324+
355325
</cluster>
356326
</configurator>

0 commit comments

Comments
 (0)