Skip to content

Commit f5aa433

Browse files
committed
Generated using ./alchemy zap --attribute="in-progress" ... ZoneManagement.adoc
1 parent 994c390 commit f5aa433

File tree

6 files changed

+620
-137
lines changed

6 files changed

+620
-137
lines changed

.github/workflows/tests.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ jobs:
209209
src/app/zap-templates/zcl/data-model/chip/sample-mei-cluster.xml \
210210
src/app/zap-templates/zcl/data-model/chip/electrical-energy-measurement-cluster.xml \
211211
src/app/zap-templates/zcl/data-model/chip/electrical-power-measurement-cluster.xml \
212+
src/app/zap-templates/zcl/data-model/chip/zone-management-cluster.xml \
212213
"
213214
- name: Build Apps
214215
run: |

scripts/rules.matterlint

+1
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ load "../src/app/zap-templates/zcl/data-model/chip/resource-monitoring-cluster.x
119119
load "../src/app/zap-templates/zcl/data-model/chip/sample-mei-cluster.xml";
120120
load "../src/app/zap-templates/zcl/data-model/chip/electrical-energy-measurement-cluster.xml";
121121
load "../src/app/zap-templates/zcl/data-model/chip/electrical-power-measurement-cluster.xml";
122+
load "../src/app/zap-templates/zcl/data-model/chip/zone-management-cluster.xml";
122123

123124
all endpoints {
124125
// These attributes follow a different code path and do not have to be
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
Copyright (c) 2024 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/ZoneManagement.adoc
20+
Parameters: in-progress
21+
Git: 0.9-fall2024-303-g216988a1d
22+
-->
23+
<configurator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../zcl.xsd">
24+
<domain name="Measurement &amp; Sensing"/>
25+
<enum name="StatusCodeEnum" type="enum8">
26+
<cluster code="0x0550"/>
27+
<item name="ZONE_NOT_FOUND" value="0x02"/>
28+
<item name="ZONE_IN_USE" value="0x03"/>
29+
</enum>
30+
31+
<enum name="ZoneEventStoppedReasonEnum" type="enum8">
32+
<cluster code="0x0550"/>
33+
<item name="ActionStopped" value="0x00"/>
34+
<item name="Timeout" value="0x01"/>
35+
</enum>
36+
37+
<enum name="ZoneEventTriggeredReasonEnum" type="enum8">
38+
<cluster code="0x0550"/>
39+
<item name="Motion" value="0x00"/>
40+
</enum>
41+
42+
<enum name="ZoneSourceEnum" type="enum8">
43+
<cluster code="0x0550"/>
44+
<item name="Mfg" value="0x00"/>
45+
<item name="User" value="0x01"/>
46+
</enum>
47+
48+
<enum name="ZoneTypeEnum" type="enum8">
49+
<cluster code="0x0550"/>
50+
<item name="TwoDCARTZone" value="0x00"/>
51+
</enum>
52+
53+
<enum name="ZoneUseEnum" type="enum8">
54+
<cluster code="0x0550"/>
55+
<item name="Motion" value="0x00"/>
56+
<item name="Privacy" value="0x01"/>
57+
<item name="Focus" value="0x02"/>
58+
</enum>
59+
60+
<struct name="TwoDCartesianVertexStruct" apiMaturity="provisional">
61+
<cluster code="0x0550"/>
62+
<item fieldId="0" name="X" type="int16u" default="0"/>
63+
<item fieldId="1" name="Y" type="int16u" default="0"/>
64+
</struct>
65+
66+
<struct name="TwoDCartesianZoneStruct" apiMaturity="provisional">
67+
<cluster code="0x0550"/>
68+
<item fieldId="0" name="Name" type="char_string" length="16"/>
69+
<item fieldId="1" name="Use" type="ZoneUseEnum" min="0x00" max="0x02"/>
70+
<item fieldId="2" name="Vertices" array="true" type="TwoDCartesianVertexStruct" length="12" minLength="3"/>
71+
<item fieldId="3" name="Color" type="char_string" optional="true" length="9" minLength="7"/>
72+
</struct>
73+
74+
<struct name="ZoneInformationStruct" apiMaturity="provisional">
75+
<cluster code="0x0550"/>
76+
<item fieldId="0" name="ZoneID" type="int16u"/>
77+
<item fieldId="1" name="ZoneType" type="ZoneTypeEnum" min="0x00" max="0x00"/>
78+
<item fieldId="2" name="ZoneSource" type="ZoneSourceEnum" min="0x00" max="0x01"/>
79+
</struct>
80+
81+
<struct name="ZoneTriggeringTimeControlStruct" apiMaturity="provisional">
82+
<cluster code="0x0550"/>
83+
<item fieldId="0" name="InitialDuration" type="int16u" default="10"/>
84+
<item fieldId="1" name="AugmentationDuration" type="int16u" default="5"/>
85+
<item fieldId="2" name="MaxDuration" type="int32u" default="30"/>
86+
<item fieldId="3" name="BlindDuration" type="int16u" default="30"/>
87+
</struct>
88+
89+
<cluster apiMaturity="provisional">
90+
<domain name="Measurement &amp; Sensing"/>
91+
<name>Zone Management</name>
92+
<code>0x0550</code>
93+
<define>ZONE_MANAGEMENT_CLUSTER</define>
94+
<description>This cluster provides an interface to manage regions of interest, or Zones, which can be either manufacturer or user defined.</description>
95+
<client init="false" tick="false">true</client>
96+
<features>
97+
<feature bit="0" code="TWODCART" name="TwoDimensionalCartesianZone" summary="Devices support Two Dimensional Cartesian Zones">
98+
<mandatoryConform/>
99+
</feature>
100+
</features>
101+
<server init="false" tick="false">true</server>
102+
<globalAttribute code="0xFFFD" side="either" value="1"/>
103+
<attribute code="0x0000" side="server" define="SUPPORTED_ZONE_SOURCES" type="array" entryType="ZoneSourceEnum">SupportedZoneSources</attribute>
104+
<attribute code="0x0001" side="server" define="ZONES" type="array" entryType="ZoneInformationStruct" optional="true">Zones</attribute>
105+
<attribute code="0x0002" side="server" define="TIME_CONTROL" type="array" entryType="ZoneTriggeringTimeControlStruct" writable="true">TimeControl</attribute>
106+
<attribute code="0x0003" side="server" define="SENSITIVITY" type="int8u" min="1" max="10" default="5" writable="true">Sensitivity</attribute>
107+
<command code="0x00" source="client" name="CreateTwoDCartesianZone" optional="true">
108+
<description>This command SHALL create and store a TwoD Cartesian Zone.</description>
109+
<access op="invoke" privilege="manage"/>
110+
<arg id="0" name="Zone" type="TwoDCartesianZoneStruct"/>
111+
</command>
112+
113+
<command code="0x01" source="server" name="CreateTwoDCartesianZoneResponse" optional="true">
114+
<description/>
115+
<arg id="0" name="ZoneID" type="int16u"/>
116+
</command>
117+
118+
<command code="0x02" source="client" name="UpdateTwoDCartesianZone" optional="true">
119+
<description>The UpdateTwoDCartesianZone SHALL update a stored TwoD Cartesian Zone.</description>
120+
<access op="invoke" privilege="manage"/>
121+
<arg id="0" name="ZoneID" type="int16u"/>
122+
<arg id="1" name="Zone" type="TwoDCartesianZoneStruct"/>
123+
</command>
124+
125+
<command code="0x03" source="client" name="GetTwoDCartesianZone" optional="true">
126+
<description>The GetTwoDCartesianZone SHALL return the TwoD Cartesian Zone for the passed in ZoneID.</description>
127+
<access op="invoke" privilege="manage"/>
128+
<arg id="0" name="ZoneID" type="int16u" optional="true" isNullable="true"/>
129+
</command>
130+
131+
<command code="0x04" source="server" name="GetTwoDCartesianZoneResponse" optional="true">
132+
<description>This command SHALL be generated in response to a GetTwoDCartesianZone command.</description>
133+
<arg id="0" name="Zones" array="true" type="TwoDCartesianZoneStruct"/>
134+
</command>
135+
136+
<command code="0x05" source="client" name="RemoveZone" optional="false">
137+
<description>This command SHALL remove the Zone mapped to the passed in ZoneID.</description>
138+
<access op="invoke" privilege="manage"/>
139+
<arg id="0" name="ZoneID" type="int16u"/>
140+
</command>
141+
142+
<event code="0x0000" name="ZoneTriggered" priority="info" side="server">
143+
<field id="0" name="Zones" array="true" type="int16u"/>
144+
<field id="1" name="Reason" type="ZoneEventTriggeredReasonEnum" min="0x00" max="0x00"/>
145+
<description>This event SHALL be generated when a Zone is first triggered.</description>
146+
</event>
147+
148+
<event code="0x0001" name="ZoneStopped" priority="info" side="server">
149+
<field id="0" name="Zones" array="true" type="int16u"/>
150+
<field id="1" name="Reason" type="ZoneEventStoppedReasonEnum" min="0x00" max="0x01"/>
151+
<description>This event SHALL be generated when either when the TriggerDetectedDuration value is exceeded by the TimeSinceInitialTrigger value or when the MaxDuration value is exceeded by the TimeSinceInitialTrigger value as described in ZoneTriggeringTimeControlStruct.</description>
152+
</event>
153+
154+
</cluster>
155+
</configurator>

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

+101-25
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,21 @@
139139
"sample-mei-cluster.xml",
140140
"types/door-lock.xml",
141141
"types/occupancy-sensing.xml",
142-
"types/thermostat-user-interface-configuration.xml"
142+
"types/thermostat-user-interface-configuration.xml",
143+
"zone-management-cluster.xml"
143144
],
144145
"manufacturersXml": "../../../../src/app/zap-templates/zcl/data-model/manufacturers.xml",
145146
"options": {
146147
"text": {
147-
"defaultResponsePolicy": ["Always", "Conditional", "Never"]
148+
"defaultResponsePolicy": [
149+
"Always",
150+
"Conditional",
151+
"Never"
152+
]
148153
},
149-
"bool": ["commandDiscovery"]
154+
"bool": [
155+
"commandDiscovery"
156+
]
150157
},
151158
"defaults": {
152159
"text": {
@@ -192,8 +199,13 @@
192199
"SpecificationVersion",
193200
"MaxPathsPerInvoke"
194201
],
195-
"Bridged Device Basic Information": ["ProductAppearance"],
196-
"Descriptor": ["ClusterRevision", "FeatureMap"],
202+
"Bridged Device Basic Information": [
203+
"ProductAppearance"
204+
],
205+
"Descriptor": [
206+
"ClusterRevision",
207+
"FeatureMap"
208+
],
197209
"Device Energy Management": [
198210
"ESAType",
199211
"ESACanGenerate",
@@ -245,7 +257,11 @@
245257
"SessionEnergyDischarged",
246258
"FeatureMap"
247259
],
248-
"Energy EVSE Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
260+
"Energy EVSE Mode": [
261+
"SupportedModes",
262+
"CurrentMode",
263+
"FeatureMap"
264+
],
249265
"Ethernet Network Diagnostics": [
250266
"PHYRate",
251267
"FullDuplex",
@@ -289,7 +305,11 @@
289305
"ICDCounter",
290306
"ClientsSupportedPerFabric"
291307
],
292-
"Occupancy Sensing": ["HoldTimeLimits", "HoldTime", "FeatureMap"],
308+
"Occupancy Sensing": [
309+
"HoldTimeLimits",
310+
"HoldTime",
311+
"FeatureMap"
312+
],
293313
"Operational Credentials": [
294314
"SupportedFabrics",
295315
"CommissionedFabrics",
@@ -396,14 +416,21 @@
396416
"CurrentMaxRate",
397417
"OverrunCount"
398418
],
399-
"Channel": ["Lineup", "CurrentChannel"],
419+
"Channel": [
420+
"Lineup",
421+
"CurrentChannel"
422+
],
400423
"Media Playback": [
401424
"SampledPosition",
402425
"ActiveAudioTrack",
403426
"ActiveTextTrack"
404427
],
405-
"Application Launcher": ["CurrentApp"],
406-
"Application Basic": ["Application"],
428+
"Application Launcher": [
429+
"CurrentApp"
430+
],
431+
"Application Basic": [
432+
"Application"
433+
],
407434
"Time Synchronization": [
408435
"TrustedTimeSource",
409436
"DefaultNTP",
@@ -415,9 +442,19 @@
415442
"TimeZoneListMaxSize",
416443
"DSTOffsetListMaxSize"
417444
],
418-
"Temperature Control": ["SupportedTemperatureLevels"],
419-
"Dishwasher Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
420-
"Microwave Oven Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
445+
"Temperature Control": [
446+
"SupportedTemperatureLevels"
447+
],
448+
"Dishwasher Mode": [
449+
"SupportedModes",
450+
"CurrentMode",
451+
"FeatureMap"
452+
],
453+
"Microwave Oven Mode": [
454+
"SupportedModes",
455+
"CurrentMode",
456+
"FeatureMap"
457+
],
421458
"Microwave Oven Control": [
422459
"CookTime",
423460
"MaxCookTime",
@@ -430,14 +467,26 @@
430467
"WattRating",
431468
"FeatureMap"
432469
],
433-
"Laundry Washer Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
470+
"Laundry Washer Mode": [
471+
"SupportedModes",
472+
"CurrentMode",
473+
"FeatureMap"
474+
],
434475
"Refrigerator And Temperature Controlled Cabinet Mode": [
435476
"SupportedModes",
436477
"CurrentMode",
437478
"FeatureMap"
438479
],
439-
"RVC Clean Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
440-
"RVC Run Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
480+
"RVC Clean Mode": [
481+
"SupportedModes",
482+
"CurrentMode",
483+
"FeatureMap"
484+
],
485+
"RVC Run Mode": [
486+
"SupportedModes",
487+
"CurrentMode",
488+
"FeatureMap"
489+
],
441490
"Operational State": [
442491
"OperationalState",
443492
"OperationalError",
@@ -614,7 +663,10 @@
614663
"LevelValue",
615664
"FeatureMap"
616665
],
617-
"Air Quality": ["AirQuality", "FeatureMap"],
666+
"Air Quality": [
667+
"AirQuality",
668+
"FeatureMap"
669+
],
618670
"Electrical Energy Measurement": [
619671
"Accuracy",
620672
"CumulativeEnergyImported",
@@ -646,9 +698,15 @@
646698
"NeutralCurrent",
647699
"FeatureMap"
648700
],
649-
"Power Topology": ["FeatureMap"],
650-
"Valve Configuration and Control": ["RemainingDuration"],
651-
"Boolean State Configuration": ["CurrentSensitivityLevel"],
701+
"Power Topology": [
702+
"FeatureMap"
703+
],
704+
"Valve Configuration and Control": [
705+
"RemainingDuration"
706+
],
707+
"Boolean State Configuration": [
708+
"CurrentSensitivityLevel"
709+
],
652710
"Water Heater Management": [
653711
"HeaterTypes",
654712
"HeatDemand",
@@ -659,18 +717,36 @@
659717
"FeatureMap",
660718
"ClusterRevision"
661719
],
662-
"Water Heater Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
663-
"Wi-Fi Network Management": ["SSID", "PassphraseSurrogate"],
720+
"Water Heater Mode": [
721+
"SupportedModes",
722+
"CurrentMode",
723+
"FeatureMap"
724+
],
725+
"Wi-Fi Network Management": [
726+
"SSID",
727+
"PassphraseSurrogate"
728+
],
664729
"Thread Network Directory": [
665730
"PreferredExtendedPanID",
666731
"ThreadNetworks",
667732
"ThreadNetworkTableSize"
668733
],
669-
"Service Area": ["CurrentArea", "EstimatedEndTime", "FeatureMap"]
734+
"Service Area": [
735+
"CurrentArea",
736+
"EstimatedEndTime",
737+
"FeatureMap"
738+
]
670739
},
671740
"mandatoryDeviceTypes": "0x0016",
672741
"defaultReportingPolicy": "mandatory",
673-
"ZCLDataTypes": ["ARRAY", "BITMAP", "ENUM", "NUMBER", "STRING", "STRUCT"],
742+
"ZCLDataTypes": [
743+
"ARRAY",
744+
"BITMAP",
745+
"ENUM",
746+
"NUMBER",
747+
"STRING",
748+
"STRUCT"
749+
],
674750
"fabricHandling": {
675751
"automaticallyCreateFields": true,
676752
"indexFieldId": 254,
@@ -680,4 +756,4 @@
680756
"uiOptions": {
681757
"showProfileId": false
682758
}
683-
}
759+
}

0 commit comments

Comments
 (0)