Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closures: Closure Control cluster XML generation with Alchemy #37555

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ jobs:
--log-level info \
src/app/zap-templates/zcl/data-model/chip/global-attributes.xml \
src/app/zap-templates/zcl/data-model/chip/chime-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/closure-control-cluster.xml \
src/app/zap-templates/zcl/data-model/chip/global-bitmaps.xml \
src/app/zap-templates/zcl/data-model/chip/global-enums.xml \
src/app/zap-templates/zcl/data-model/chip/global-structs.xml \
Expand Down
1 change: 1 addition & 0 deletions docs/ids_and_codes/zap_clusters.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ Generally regenerate using one of:
| 159 | 0x9F | DeviceEnergyManagementMode |
| 257 | 0x101 | DoorLock |
| 258 | 0x102 | WindowCovering |
| 260 | 0x104 | ClosureControl |
| 336 | 0x150 | ServiceArea |
| 512 | 0x200 | PumpConfigurationAndControl |
| 513 | 0x201 | Thermostat |
Expand Down
1 change: 1 addition & 0 deletions scripts/rules.matterlint
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ load "../src/app/zap-templates/zcl/data-model/chip/channel-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/chime-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/chip-ota.xml";
load "../src/app/zap-templates/zcl/data-model/chip/chip-types.xml";
load "../src/app/zap-templates/zcl/data-model/chip/closure-control-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/clusters-extensions.xml";
load "../src/app/zap-templates/zcl/data-model/chip/color-control-cluster.xml";
load "../src/app/zap-templates/zcl/data-model/chip/commissioner-control-cluster.xml";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
#define MATTER_DM_DEVICE_ENERGY_MANAGEMENT_MODE_CLUSTER_SERVER_ENDPOINT_COUNT (1)
#define MATTER_DM_DOOR_LOCK_CLUSTER_SERVER_ENDPOINT_COUNT (0)
#define MATTER_DM_WINDOW_COVERING_CLUSTER_SERVER_ENDPOINT_COUNT (1)
#define MATTER_DM_CLOSURE_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (0)
#define MATTER_DM_SERVICE_AREA_CLUSTER_SERVER_ENDPOINT_COUNT (0)
#define MATTER_DM_PUMP_CONFIGURATION_AND_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1)
#define MATTER_DM_THERMOSTAT_CLUSTER_SERVER_ENDPOINT_COUNT (1)
Expand Down Expand Up @@ -229,6 +230,7 @@
#define MATTER_DM_DEVICE_ENERGY_MANAGEMENT_MODE_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
#define MATTER_DM_DOOR_LOCK_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
#define MATTER_DM_WINDOW_COVERING_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
#define MATTER_DM_CLOSURE_CONTROL_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
#define MATTER_DM_SERVICE_AREA_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
#define MATTER_DM_PUMP_CONFIGURATION_AND_CONTROL_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
#define MATTER_DM_THERMOSTAT_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
#define MATTER_DM_DEVICE_ENERGY_MANAGEMENT_MODE_CLUSTER_SERVER_ENDPOINT_COUNT (0)
#define MATTER_DM_DOOR_LOCK_CLUSTER_SERVER_ENDPOINT_COUNT (0)
#define MATTER_DM_WINDOW_COVERING_CLUSTER_SERVER_ENDPOINT_COUNT (0)
#define MATTER_DM_CLOSURE_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (0)
#define MATTER_DM_SERVICE_AREA_CLUSTER_SERVER_ENDPOINT_COUNT (0)
#define MATTER_DM_PUMP_CONFIGURATION_AND_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (0)
#define MATTER_DM_THERMOSTAT_CLUSTER_SERVER_ENDPOINT_COUNT (0)
Expand Down Expand Up @@ -229,6 +230,7 @@
#define MATTER_DM_DEVICE_ENERGY_MANAGEMENT_MODE_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
#define MATTER_DM_DOOR_LOCK_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
#define MATTER_DM_WINDOW_COVERING_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
#define MATTER_DM_CLOSURE_CONTROL_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
#define MATTER_DM_SERVICE_AREA_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
#define MATTER_DM_PUMP_CONFIGURATION_AND_CONTROL_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
#define MATTER_DM_THERMOSTAT_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
Expand Down
255 changes: 255 additions & 0 deletions src/app/zap-templates/zcl/data-model/chip/closure-control-cluster.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,255 @@
<?xml version="1.0"?>
<!--
Copyright (c) 2025 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/ClosureControl.adoc
Parameters: in-progress
Git: 0.7-summer-2025-5-g06c4d5596-dirty
-->
<configurator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../zcl.xsd">
<domain name="Closures"/>
<enum name="ClosureErrorEnum" type="enum8">
<cluster code="0x0104"/>
<item name="Blocked" value="0x00"/>
<item name="TemperatureLimited" value="0x01"/>
<item name="MaintenanceRequired" value="0x02"/>
<item name="InternalInterference" value="0x03"/>
</enum>

<enum name="LatchingEnum" type="enum8">
<cluster code="0x0104"/>
<item name="LatchedAndSecured" value="0x00"/>
<item name="LatchedButNotSecured" value="0x01"/>
<item name="NotLatched" value="0x02"/>
</enum>

<enum name="MainStateEnum" type="enum8">
<cluster code="0x0104"/>
<item name="Stopped" value="0x00"/>
<item name="Moving" value="0x01"/>
<item name="WaitingForMotion" value="0x02"/>
<item name="Error" value="0x03"/>
<item name="Calibrating" value="0x04"/>
<item name="Protected" value="0x05"/>
<item name="Disengaged" value="0x06"/>
<item name="SetupRequired" value="0x07"/>
<item name="PendingFallback" value="0x08"/>
</enum>

<enum name="PositioningEnum" type="enum8">
<cluster code="0x0104"/>
<item name="FullyClosed" value="0x00"/>
<item name="FullyOpened" value="0x01"/>
<item name="PartiallyOpened" value="0x02"/>
<item name="OpenedForPedestrian" value="0x03"/>
<item name="OpenedForVentilation" value="0x04"/>
<item name="OpenedAtSignature" value="0x05"/>
</enum>

<enum name="RestingProcedureEnum" type="enum8">
<cluster code="0x0104"/>
<item name="DoNothing" value="0x00"/>
<item name="ReturnToFullyOpened" value="0x01"/>
<item name="ReturnToFullyClosed" value="0x02"/>
</enum>

<enum name="TagLatchEnum" type="enum8">
<cluster code="0x0104"/>
<item name="Latch" value="0x00"/>
<item name="Unlatch" value="0x01"/>
</enum>

<enum name="TagPositionEnum" type="enum8">
<cluster code="0x0104"/>
<item name="CloseInFull" value="0x00"/>
<item name="OpenInFull" value="0x01"/>
<item name="Pedestrian" value="0x02"/>
<item name="Ventilation" value="0x03"/>
<item name="Signature" value="0x04"/>
<item name="SequenceNextStep" value="0x05"/>
<item name="PedestrianNextStep" value="0x06"/>
</enum>

<enum name="TriggerConditionEnum" type="enum8">
<cluster code="0x0104"/>
<item name="AfterDelay" value="0x00"/>
<item name="AfterApplicativeTrigger" value="0x01"/>
<item name="AfterDelayOrApplicativeTrigger" value="0x02"/>
</enum>

<enum name="TriggerPositionEnum" type="enum8">
<cluster code="0x0104"/>
<item name="AtFullyClosed" value="0x00"/>
<item name="AtFullyOpened" value="0x01"/>
<item name="InBetween" value="0x02"/>
<item name="AtVentilation" value="0x03"/>
<item name="AtPedestrian" value="0x04"/>
</enum>

<struct name="OverallStateStruct" apiMaturity="provisional">
<cluster code="0x0104"/>
<item fieldId="0" name="Positioning" type="PositioningEnum" optional="true" default="0x02" min="0x00" max="0x05"/>
<item fieldId="1" name="Latching" type="LatchingEnum" optional="true" default="0x02" min="0x00" max="0x02"/>
<item fieldId="2" name="Speed" type="ThreeLevelAutoEnum" optional="true" default="0x00" min="0x00" max="0x03"/>
<item fieldId="3" name="ExtraInfo" type="bitmap32" optional="true"/>
</struct>

<struct name="OverallTargetStruct" apiMaturity="provisional">
<cluster code="0x0104"/>
<item fieldId="0" name="TagPosition" type="TagPositionEnum" optional="true" min="0x00" max="0x06"/>
<item fieldId="1" name="TagLatch" type="TagLatchEnum" optional="true" min="0x00" max="0x01"/>
<item fieldId="2" name="Speed" type="ThreeLevelAutoEnum" optional="true" min="0x00" max="0x03"/>
</struct>

<cluster>
<domain>Closures</domain>
<name>Closure Control</name>
<code>0x0104</code>
<define>CLOSURE_CONTROL_CLUSTER</define>
<description>This cluster provides an interface for controlling a Closure device.</description>
<client init="false" tick="false">true</client>
<server init="false" tick="false">true</server>
<globalAttribute code="0xFFFD" side="either" value="1"/>
<attribute code="0x0000" side="server" define="COUNTDOWN_TIME" type="elapsed_s" isNullable="true" max="259200" optional="true">
<description>CountdownTime</description>
<optionalConform/>
</attribute>
<attribute code="0x0001" side="server" define="MAIN_STATE" type="MainStateEnum" min="0x00" max="0x08">MainState</attribute>
<attribute code="0x0002" side="server" define="CURRENT_ERROR_LIST" type="array" entryType="ClosureErrorEnum">CurrentErrorList</attribute>
<attribute code="0x0003" side="server" define="OVERALL_STATE" type="OverallStateStruct" isNullable="true">OverallState</attribute>
<attribute code="0x0004" side="server" define="OVERALL_TARGET" type="OverallTargetStruct" isNullable="true">OverallTarget</attribute>
<attribute code="0x0005" side="server" define="RESTING_PROCEDURE" type="RestingProcedureEnum" min="0x00" max="0x02" optional="true">
<description>RestingProcedure</description>
<mandatoryConform>
<feature name="FB"/>
</mandatoryConform>
</attribute>
<attribute code="0x0006" side="server" define="TRIGGER_CONDITION" type="TriggerConditionEnum" min="0x00" max="0x02" optional="true">
<description>TriggerCondition</description>
<mandatoryConform>
<feature name="FB"/>
</mandatoryConform>
</attribute>
<attribute code="0x0007" side="server" define="TRIGGER_POSITION" type="TriggerPositionEnum" optional="true" min="0x00" max="0x04">
<description>TriggerPosition</description>
<mandatoryConform>
<feature name="FB"/>
</mandatoryConform>
</attribute>
<attribute code="0x0008" side="server" define="WAITING_DELAY" type="elapsed_s" max="86400" default="60" optional="true">
<description>WaitingDelay</description>
<mandatoryConform>
<feature name="FB"/>
</mandatoryConform>
</attribute>
<attribute code="0x0009" side="server" define="KICKOFF_TIMER" type="elapsed_s" max="86400" default="0" optional="true">
<description>KickoffTimer</description>
<mandatoryConform>
<feature name="FB"/>
</mandatoryConform>
</attribute>
<command code="0x00" source="client" name="Stop" optional="true">
<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>
<mandatoryConform>
<notTerm>
<feature name="IS"/>
</notTerm>
</mandatoryConform>
</command>

<command code="0x01" source="client" name="MoveTo" optional="false">
<description>Upon receipt, this SHALL move the product in the most fitting state following the data as follows: </description>
<arg id="0" name="Tag" type="TagPositionEnum" optional="true" min="0x00" max="0x06"/>
<arg id="1" name="Latch" type="TagLatchEnum" optional="true" min="0x00" max="0x01"/>
<arg id="2" name="Speed" type="ThreeLevelAutoEnum" optional="true" min="0x00" max="0x03"/>
</command>

<command code="0x02" source="client" name="Calibrate" optional="true">
<description>Upon receipt, this SHALL initiate a calibration.</description>
<access op="invoke" privilege="manage"/>
<mandatoryConform>
<feature name="CL"/>
</mandatoryConform>
</command>

<command code="0x03" source="client" name="ConfigureFallback" optional="true">
<description>Upon receipt, this SHALL configure the Fallback feature behavior using the data as follows: </description>
<arg id="0" name="RestingProcedure" type="RestingProcedureEnum" optional="true" min="0x00" max="0x02"/>
<arg id="1" name="TriggerCondition" type="TriggerConditionEnum" optional="true" min="0x00" max="0x02"/>
<arg id="2" name="TriggerPosition" type="TriggerPositionEnum" optional="true" min="0x00" max="0x04"/>
<arg id="3" name="WaitingDelay" type="elapsed_s" optional="true" max="86400"/>
<mandatoryConform>
<feature name="FB"/>
</mandatoryConform>
</command>

<command code="0x04" source="client" name="CancelFallback" optional="true">
<description>Upon receipt, this SHALL cancel the current PendingFallback.</description>
<mandatoryConform>
<feature name="FB"/>
</mandatoryConform>
</command>

<features>
<feature bit="0" code="PS" name="Positioning" summary="Supports positioning with at least Fully Opened (0%) and Fully Closed (100%) discrete position">
<optionalConform choice="a" more="true" min="1"/>
</feature>
<feature bit="1" code="LT" name="MotionLatching" summary="Supports a latch (securing a position, a state ...)">
<optionalConform choice="a" more="true" min="1"/>
</feature>
<feature bit="2" code="IS" name="Instantaneous" summary="Supports the Instantaneous feature">
<optionalConform/>
</feature>
<feature bit="3" code="SP" name="Speed" summary="Supports speed motion throttling">
<optionalConform>
<andTerm>
<feature name="PS"/>
<notTerm>
<feature name="IS"/>
</notTerm>
</andTerm>
</optionalConform>
</feature>
<feature bit="4" code="VT" name="Ventilation" summary="Supports Ventilation discrete state">
<optionalConform>
<feature name="PS"/>
</optionalConform>
</feature>
<feature bit="5" code="PD" name="Pedestrian" summary="Supports Pedestrian discrete state">
<optionalConform>
<feature name="PS"/>
</optionalConform>
</feature>
<feature bit="6" code="CL" name="Calibration" summary="Supports the Calibration feature">
<optionalConform>
<feature name="PS"/>
</optionalConform>
</feature>
<feature bit="7" code="PT" name="Protection" summary="Supports the Protection feature">
<optionalConform/>
</feature>
<feature bit="8" code="MO" name="ManuallyOperable" summary="Supports the manual operation feature">
<optionalConform/>
</feature>
<feature bit="9" code="FB" name="Fallback" summary="Supports the fallback feature">
<optionalConform>
<feature name="PS"/>
</optionalConform>
</feature>
</features>
</cluster>
</configurator>
2 changes: 2 additions & 0 deletions src/app/zap-templates/zcl/zcl-with-test-extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
"chime-cluster.xml",
"chip-ota.xml",
"channel-cluster.xml",
"closure-control-cluster.xml",
"clusters-extensions.xml",
"color-control-cluster.xml",
"commissioner-control-cluster.xml",
Expand Down Expand Up @@ -200,6 +201,7 @@
],
"Bridged Device Basic Information": ["ProductAppearance"],
"Chime": ["ActiveChimeID", "Enabled"],
"Closure Control": ["OverallState", "OverallTarget"],
"Descriptor": ["ClusterRevision", "FeatureMap"],
"Device Energy Management": [
"ESAType",
Expand Down
2 changes: 2 additions & 0 deletions src/app/zap-templates/zcl/zcl.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
"chime-cluster.xml",
"chip-ota.xml",
"channel-cluster.xml",
"closure-control-cluster.xml",
"clusters-extensions.xml",
"color-control-cluster.xml",
"commissioner-control-cluster.xml",
Expand Down Expand Up @@ -194,6 +195,7 @@
],
"Bridged Device Basic Information": ["ProductAppearance"],
"Chime": ["ActiveChimeID", "Enabled"],
"Closure Control": ["OverallState", "OverallTarget"],
"Descriptor": ["ClusterRevision", "FeatureMap"],
"Device Energy Management": [
"ESAType",
Expand Down
2 changes: 2 additions & 0 deletions src/app/zap_cluster_list.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"CHANNEL_CLUSTER": [],
"CHIME_CLUSTER": [],
"CLIENT_MONITORING_CLUSTER": [],
"CLOSURE_CONTROL_CLUSTER": [],
"COLOR_CONTROL_CLUSTER": [],
"COMMISSIONER_CONTROL_CLUSTER": [],
"COMMISSIONING_CLUSTER": [],
Expand Down Expand Up @@ -176,6 +177,7 @@
],
"CHANNEL_CLUSTER": ["channel-server"],
"CHIME_CLUSTER": ["chime-server"],
"CLOSURE_CONTROL_CLUSTER": [],
"COLOR_CONTROL_CLUSTER": ["color-control-server"],
"COMMISSIONER_CONTROL_CLUSTER": ["commissioner-control-server"],
"COMMISSIONING_CLUSTER": [],
Expand Down
Loading
Loading