Skip to content

Commit

Permalink
Generated using ./alchemy zap --attribute="in-progress" ... ZoneManag…
Browse files Browse the repository at this point in the history
…ement.adoc
  • Loading branch information
gmarcosb committed Oct 4, 2024
1 parent 994c390 commit f5aa433
Show file tree
Hide file tree
Showing 6 changed files with 620 additions and 137 deletions.
1 change: 1 addition & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ jobs:
src/app/zap-templates/zcl/data-model/chip/sample-mei-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/electrical-energy-measurement-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/electrical-power-measurement-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/zone-management-cluster.xml \
"
- name: Build Apps
run: |
Expand Down
1 change: 1 addition & 0 deletions scripts/rules.matterlint
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ load "../src/app/zap-templates/zcl/data-model/chip/resource-monitoring-cluster.x
load "../src/app/zap-templates/zcl/data-model/chip/sample-mei-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/electrical-energy-measurement-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/electrical-power-measurement-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/zone-management-cluster.xml";

all endpoints {
// These attributes follow a different code path and do not have to be
Expand Down
155 changes: 155 additions & 0 deletions src/app/zap-templates/zcl/data-model/chip/zone-management-cluster.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
<?xml version="1.0"?>
<!--
Copyright (c) 2024 Project CHIP Authors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!--
XML generated by Alchemy; DO NOT EDIT.
Source: src/app_clusters/ZoneManagement.adoc
Parameters: in-progress
Git: 0.9-fall2024-303-g216988a1d
-->
<configurator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../zcl.xsd">
<domain name="Measurement &amp; Sensing"/>
<enum name="StatusCodeEnum" type="enum8">
<cluster code="0x0550"/>
<item name="ZONE_NOT_FOUND" value="0x02"/>
<item name="ZONE_IN_USE" value="0x03"/>
</enum>

<enum name="ZoneEventStoppedReasonEnum" type="enum8">
<cluster code="0x0550"/>
<item name="ActionStopped" value="0x00"/>
<item name="Timeout" value="0x01"/>
</enum>

<enum name="ZoneEventTriggeredReasonEnum" type="enum8">
<cluster code="0x0550"/>
<item name="Motion" value="0x00"/>
</enum>

<enum name="ZoneSourceEnum" type="enum8">
<cluster code="0x0550"/>
<item name="Mfg" value="0x00"/>
<item name="User" value="0x01"/>
</enum>

<enum name="ZoneTypeEnum" type="enum8">
<cluster code="0x0550"/>
<item name="TwoDCARTZone" value="0x00"/>
</enum>

<enum name="ZoneUseEnum" type="enum8">
<cluster code="0x0550"/>
<item name="Motion" value="0x00"/>
<item name="Privacy" value="0x01"/>
<item name="Focus" value="0x02"/>
</enum>

<struct name="TwoDCartesianVertexStruct" apiMaturity="provisional">
<cluster code="0x0550"/>
<item fieldId="0" name="X" type="int16u" default="0"/>
<item fieldId="1" name="Y" type="int16u" default="0"/>
</struct>

<struct name="TwoDCartesianZoneStruct" apiMaturity="provisional">
<cluster code="0x0550"/>
<item fieldId="0" name="Name" type="char_string" length="16"/>
<item fieldId="1" name="Use" type="ZoneUseEnum" min="0x00" max="0x02"/>
<item fieldId="2" name="Vertices" array="true" type="TwoDCartesianVertexStruct" length="12" minLength="3"/>
<item fieldId="3" name="Color" type="char_string" optional="true" length="9" minLength="7"/>
</struct>

<struct name="ZoneInformationStruct" apiMaturity="provisional">
<cluster code="0x0550"/>
<item fieldId="0" name="ZoneID" type="int16u"/>
<item fieldId="1" name="ZoneType" type="ZoneTypeEnum" min="0x00" max="0x00"/>
<item fieldId="2" name="ZoneSource" type="ZoneSourceEnum" min="0x00" max="0x01"/>
</struct>

<struct name="ZoneTriggeringTimeControlStruct" apiMaturity="provisional">
<cluster code="0x0550"/>
<item fieldId="0" name="InitialDuration" type="int16u" default="10"/>
<item fieldId="1" name="AugmentationDuration" type="int16u" default="5"/>
<item fieldId="2" name="MaxDuration" type="int32u" default="30"/>
<item fieldId="3" name="BlindDuration" type="int16u" default="30"/>
</struct>

<cluster apiMaturity="provisional">
<domain name="Measurement &amp; Sensing"/>
<name>Zone Management</name>
<code>0x0550</code>
<define>ZONE_MANAGEMENT_CLUSTER</define>
<description>This cluster provides an interface to manage regions of interest, or Zones, which can be either manufacturer or user defined.</description>
<client init="false" tick="false">true</client>
<features>
<feature bit="0" code="TWODCART" name="TwoDimensionalCartesianZone" summary="Devices support Two Dimensional Cartesian Zones">
<mandatoryConform/>
</feature>
</features>
<server init="false" tick="false">true</server>
<globalAttribute code="0xFFFD" side="either" value="1"/>
<attribute code="0x0000" side="server" define="SUPPORTED_ZONE_SOURCES" type="array" entryType="ZoneSourceEnum">SupportedZoneSources</attribute>
<attribute code="0x0001" side="server" define="ZONES" type="array" entryType="ZoneInformationStruct" optional="true">Zones</attribute>
<attribute code="0x0002" side="server" define="TIME_CONTROL" type="array" entryType="ZoneTriggeringTimeControlStruct" writable="true">TimeControl</attribute>
<attribute code="0x0003" side="server" define="SENSITIVITY" type="int8u" min="1" max="10" default="5" writable="true">Sensitivity</attribute>
<command code="0x00" source="client" name="CreateTwoDCartesianZone" optional="true">
<description>This command SHALL create and store a TwoD Cartesian Zone.</description>
<access op="invoke" privilege="manage"/>
<arg id="0" name="Zone" type="TwoDCartesianZoneStruct"/>
</command>

<command code="0x01" source="server" name="CreateTwoDCartesianZoneResponse" optional="true">
<description/>
<arg id="0" name="ZoneID" type="int16u"/>
</command>

<command code="0x02" source="client" name="UpdateTwoDCartesianZone" optional="true">
<description>The UpdateTwoDCartesianZone SHALL update a stored TwoD Cartesian Zone.</description>
<access op="invoke" privilege="manage"/>
<arg id="0" name="ZoneID" type="int16u"/>
<arg id="1" name="Zone" type="TwoDCartesianZoneStruct"/>
</command>

<command code="0x03" source="client" name="GetTwoDCartesianZone" optional="true">
<description>The GetTwoDCartesianZone SHALL return the TwoD Cartesian Zone for the passed in ZoneID.</description>
<access op="invoke" privilege="manage"/>
<arg id="0" name="ZoneID" type="int16u" optional="true" isNullable="true"/>
</command>

<command code="0x04" source="server" name="GetTwoDCartesianZoneResponse" optional="true">
<description>This command SHALL be generated in response to a GetTwoDCartesianZone command.</description>
<arg id="0" name="Zones" array="true" type="TwoDCartesianZoneStruct"/>
</command>

<command code="0x05" source="client" name="RemoveZone" optional="false">
<description>This command SHALL remove the Zone mapped to the passed in ZoneID.</description>
<access op="invoke" privilege="manage"/>
<arg id="0" name="ZoneID" type="int16u"/>
</command>

<event code="0x0000" name="ZoneTriggered" priority="info" side="server">
<field id="0" name="Zones" array="true" type="int16u"/>
<field id="1" name="Reason" type="ZoneEventTriggeredReasonEnum" min="0x00" max="0x00"/>
<description>This event SHALL be generated when a Zone is first triggered.</description>
</event>

<event code="0x0001" name="ZoneStopped" priority="info" side="server">
<field id="0" name="Zones" array="true" type="int16u"/>
<field id="1" name="Reason" type="ZoneEventStoppedReasonEnum" min="0x00" max="0x01"/>
<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>
</event>

</cluster>
</configurator>
126 changes: 101 additions & 25 deletions src/app/zap-templates/zcl/zcl-with-test-extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -139,14 +139,21 @@
"sample-mei-cluster.xml",
"types/door-lock.xml",
"types/occupancy-sensing.xml",
"types/thermostat-user-interface-configuration.xml"
"types/thermostat-user-interface-configuration.xml",
"zone-management-cluster.xml"
],
"manufacturersXml": "../../../../src/app/zap-templates/zcl/data-model/manufacturers.xml",
"options": {
"text": {
"defaultResponsePolicy": ["Always", "Conditional", "Never"]
"defaultResponsePolicy": [
"Always",
"Conditional",
"Never"
]
},
"bool": ["commandDiscovery"]
"bool": [
"commandDiscovery"
]
},
"defaults": {
"text": {
Expand Down Expand Up @@ -192,8 +199,13 @@
"SpecificationVersion",
"MaxPathsPerInvoke"
],
"Bridged Device Basic Information": ["ProductAppearance"],
"Descriptor": ["ClusterRevision", "FeatureMap"],
"Bridged Device Basic Information": [
"ProductAppearance"
],
"Descriptor": [
"ClusterRevision",
"FeatureMap"
],
"Device Energy Management": [
"ESAType",
"ESACanGenerate",
Expand Down Expand Up @@ -245,7 +257,11 @@
"SessionEnergyDischarged",
"FeatureMap"
],
"Energy EVSE Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
"Energy EVSE Mode": [
"SupportedModes",
"CurrentMode",
"FeatureMap"
],
"Ethernet Network Diagnostics": [
"PHYRate",
"FullDuplex",
Expand Down Expand Up @@ -289,7 +305,11 @@
"ICDCounter",
"ClientsSupportedPerFabric"
],
"Occupancy Sensing": ["HoldTimeLimits", "HoldTime", "FeatureMap"],
"Occupancy Sensing": [
"HoldTimeLimits",
"HoldTime",
"FeatureMap"
],
"Operational Credentials": [
"SupportedFabrics",
"CommissionedFabrics",
Expand Down Expand Up @@ -396,14 +416,21 @@
"CurrentMaxRate",
"OverrunCount"
],
"Channel": ["Lineup", "CurrentChannel"],
"Channel": [
"Lineup",
"CurrentChannel"
],
"Media Playback": [
"SampledPosition",
"ActiveAudioTrack",
"ActiveTextTrack"
],
"Application Launcher": ["CurrentApp"],
"Application Basic": ["Application"],
"Application Launcher": [
"CurrentApp"
],
"Application Basic": [
"Application"
],
"Time Synchronization": [
"TrustedTimeSource",
"DefaultNTP",
Expand All @@ -415,9 +442,19 @@
"TimeZoneListMaxSize",
"DSTOffsetListMaxSize"
],
"Temperature Control": ["SupportedTemperatureLevels"],
"Dishwasher Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
"Microwave Oven Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
"Temperature Control": [
"SupportedTemperatureLevels"
],
"Dishwasher Mode": [
"SupportedModes",
"CurrentMode",
"FeatureMap"
],
"Microwave Oven Mode": [
"SupportedModes",
"CurrentMode",
"FeatureMap"
],
"Microwave Oven Control": [
"CookTime",
"MaxCookTime",
Expand All @@ -430,14 +467,26 @@
"WattRating",
"FeatureMap"
],
"Laundry Washer Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
"Laundry Washer Mode": [
"SupportedModes",
"CurrentMode",
"FeatureMap"
],
"Refrigerator And Temperature Controlled Cabinet Mode": [
"SupportedModes",
"CurrentMode",
"FeatureMap"
],
"RVC Clean Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
"RVC Run Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
"RVC Clean Mode": [
"SupportedModes",
"CurrentMode",
"FeatureMap"
],
"RVC Run Mode": [
"SupportedModes",
"CurrentMode",
"FeatureMap"
],
"Operational State": [
"OperationalState",
"OperationalError",
Expand Down Expand Up @@ -614,7 +663,10 @@
"LevelValue",
"FeatureMap"
],
"Air Quality": ["AirQuality", "FeatureMap"],
"Air Quality": [
"AirQuality",
"FeatureMap"
],
"Electrical Energy Measurement": [
"Accuracy",
"CumulativeEnergyImported",
Expand Down Expand Up @@ -646,9 +698,15 @@
"NeutralCurrent",
"FeatureMap"
],
"Power Topology": ["FeatureMap"],
"Valve Configuration and Control": ["RemainingDuration"],
"Boolean State Configuration": ["CurrentSensitivityLevel"],
"Power Topology": [
"FeatureMap"
],
"Valve Configuration and Control": [
"RemainingDuration"
],
"Boolean State Configuration": [
"CurrentSensitivityLevel"
],
"Water Heater Management": [
"HeaterTypes",
"HeatDemand",
Expand All @@ -659,18 +717,36 @@
"FeatureMap",
"ClusterRevision"
],
"Water Heater Mode": ["SupportedModes", "CurrentMode", "FeatureMap"],
"Wi-Fi Network Management": ["SSID", "PassphraseSurrogate"],
"Water Heater Mode": [
"SupportedModes",
"CurrentMode",
"FeatureMap"
],
"Wi-Fi Network Management": [
"SSID",
"PassphraseSurrogate"
],
"Thread Network Directory": [
"PreferredExtendedPanID",
"ThreadNetworks",
"ThreadNetworkTableSize"
],
"Service Area": ["CurrentArea", "EstimatedEndTime", "FeatureMap"]
"Service Area": [
"CurrentArea",
"EstimatedEndTime",
"FeatureMap"
]
},
"mandatoryDeviceTypes": "0x0016",
"defaultReportingPolicy": "mandatory",
"ZCLDataTypes": ["ARRAY", "BITMAP", "ENUM", "NUMBER", "STRING", "STRUCT"],
"ZCLDataTypes": [
"ARRAY",
"BITMAP",
"ENUM",
"NUMBER",
"STRING",
"STRUCT"
],
"fabricHandling": {
"automaticallyCreateFields": true,
"indexFieldId": 254,
Expand All @@ -680,4 +756,4 @@
"uiOptions": {
"showProfileId": false
}
}
}
Loading

0 comments on commit f5aa433

Please sign in to comment.