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

Closure: Updating XML and ZAP code for the closure control cluster with latest specification #37726

Closed
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
103 changes: 12 additions & 91 deletions src/app/zap-templates/zcl/data-model/chip/closure-control-cluster.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ 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
Git: 0.7-summer-2025-173-g70b2a23aa-dirty
-->
<configurator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../zcl.xsd">
<domain name="Closures"/>
Expand Down Expand Up @@ -47,7 +47,6 @@ Git: 0.7-summer-2025-5-g06c4d5596-dirty
<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">
Expand All @@ -60,58 +59,33 @@ Git: 0.7-summer-2025-5-g06c4d5596-dirty
<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">
<enum name="TargetLatchEnum" type="enum8">
<cluster code="0x0104"/>
<item name="Latch" value="0x00"/>
<item name="Unlatch" value="0x01"/>
</enum>

<enum name="TagPositionEnum" type="enum8">
<enum name="TargetPositionEnum" 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"/>
<item fieldId="0" name="Positioning" type="PositioningEnum" optional="true" default="0x02" min="0x00" max="0x05" isNullable="true"/>
<item fieldId="1" name="Latching" type="LatchingEnum" optional="true" default="0x02" min="0x00" max="0x02" isNullable="true"/>
<item fieldId="2" name="Speed" type="ThreeLevelAutoEnum" optional="true" default="0x00" min="0x00" max="0x03" isNullable="true"/>
<item fieldId="3" name="ExtraInfo" type="bitmap32" optional="true" isNullable="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="0" name="Position" type="TargetPositionEnum" optional="true" min="0x00" max="0x04"/>
<item fieldId="1" name="Latch" type="TargetLatchEnum" optional="true" min="0x00" max="0x01"/>
<item fieldId="2" name="Speed" type="ThreeLevelAutoEnum" optional="true" min="0x00" max="0x03"/>
</struct>

Expand All @@ -128,40 +102,10 @@ Git: 0.7-summer-2025-5-g06c4d5596-dirty
<description>CountdownTime</description>
<optionalConform/>
</attribute>
<attribute code="0x0001" side="server" define="MAIN_STATE" type="MainStateEnum" min="0x00" max="0x08">MainState</attribute>
<attribute code="0x0001" side="server" define="MAIN_STATE" type="MainStateEnum" min="0x00" max="0x07">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>
Expand All @@ -173,8 +117,8 @@ Git: 0.7-summer-2025-5-g06c4d5596-dirty

<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="0" name="Position" type="TargetPositionEnum" optional="true" min="0x00" max="0x04"/>
<arg id="1" name="Latch" type="TargetLatchEnum" optional="true" min="0x00" max="0x01"/>
<arg id="2" name="Speed" type="ThreeLevelAutoEnum" optional="true" min="0x00" max="0x03"/>
</command>

Expand All @@ -186,24 +130,6 @@ Git: 0.7-summer-2025-5-g06c4d5596-dirty
</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"/>
Expand Down Expand Up @@ -245,11 +171,6 @@ Git: 0.7-summer-2025-5-g06c4d5596-dirty
<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>
60 changes: 10 additions & 50 deletions src/controller/data_model/controller-clusters.matter
Original file line number Diff line number Diff line change
Expand Up @@ -6527,7 +6527,6 @@ cluster ClosureControl = 260 {
kProtected = 5;
kDisengaged = 6;
kSetupRequired = 7;
kPendingFallback = 8;
}

enum PositioningEnum : enum8 {
Expand All @@ -6539,39 +6538,17 @@ cluster ClosureControl = 260 {
kOpenedAtSignature = 5;
}

enum RestingProcedureEnum : enum8 {
kDoNothing = 0;
kReturnToFullyOpened = 1;
kReturnToFullyClosed = 2;
}

enum TagLatchEnum : enum8 {
enum TargetLatchEnum : enum8 {
kLatch = 0;
kUnlatch = 1;
}

enum TagPositionEnum : enum8 {
enum TargetPositionEnum : enum8 {
kCloseInFull = 0;
kOpenInFull = 1;
kPedestrian = 2;
kVentilation = 3;
kSignature = 4;
kSequenceNextStep = 5;
kPedestrianNextStep = 6;
}

enum TriggerConditionEnum : enum8 {
kAfterDelay = 0;
kAfterApplicativeTrigger = 1;
kAfterDelayOrApplicativeTrigger = 2;
}

enum TriggerPositionEnum : enum8 {
kAtFullyClosed = 0;
kAtFullyOpened = 1;
kInBetween = 2;
kAtVentilation = 3;
kAtPedestrian = 4;
}

bitmap Feature : bitmap32 {
Expand All @@ -6584,19 +6561,18 @@ cluster ClosureControl = 260 {
kCalibration = 0x40;
kProtection = 0x80;
kManuallyOperable = 0x100;
kFallback = 0x200;
}

struct OverallStateStruct {
optional PositioningEnum positioning = 0;
optional LatchingEnum latching = 1;
optional ThreeLevelAutoEnum speed = 2;
optional bitmap32 extraInfo = 3;
optional nullable PositioningEnum positioning = 0;
optional nullable LatchingEnum latching = 1;
optional nullable ThreeLevelAutoEnum speed = 2;
optional nullable bitmap32 extraInfo = 3;
}

struct OverallTargetStruct {
optional TagPositionEnum tagPosition = 0;
optional TagLatchEnum tagLatch = 1;
optional TargetPositionEnum position = 0;
optional TargetLatchEnum latch = 1;
optional ThreeLevelAutoEnum speed = 2;
}

Expand All @@ -6605,11 +6581,6 @@ cluster ClosureControl = 260 {
readonly attribute ClosureErrorEnum currentErrorList[] = 2;
readonly attribute nullable OverallStateStruct overallState = 3;
readonly attribute nullable OverallTargetStruct overallTarget = 4;
readonly attribute optional RestingProcedureEnum restingProcedure = 5;
readonly attribute optional TriggerConditionEnum triggerCondition = 6;
readonly attribute optional TriggerPositionEnum triggerPosition = 7;
readonly attribute optional elapsed_s waitingDelay = 8;
readonly attribute optional elapsed_s kickoffTimer = 9;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
Expand All @@ -6618,28 +6589,17 @@ cluster ClosureControl = 260 {
readonly attribute int16u clusterRevision = 65533;

request struct MoveToRequest {
optional TagPositionEnum tag = 0;
optional TagLatchEnum latch = 1;
optional TargetPositionEnum position = 0;
optional TargetLatchEnum latch = 1;
optional ThreeLevelAutoEnum speed = 2;
}

request struct ConfigureFallbackRequest {
optional RestingProcedureEnum restingProcedure = 0;
optional TriggerConditionEnum triggerCondition = 1;
optional TriggerPositionEnum triggerPosition = 2;
optional elapsed_s waitingDelay = 3;
}

/** 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. */
command Stop(): DefaultSuccess = 0;
/** Upon receipt, this SHALL move the product in the most fitting state following the data as follows: */
command MoveTo(MoveToRequest): DefaultSuccess = 1;
/** Upon receipt, this SHALL initiate a calibration. */
command access(invoke: manage) Calibrate(): DefaultSuccess = 2;
/** Upon receipt, this SHALL configure the Fallback feature behavior using the data as follows: */
command ConfigureFallback(ConfigureFallbackRequest): DefaultSuccess = 3;
/** Upon receipt, this SHALL cancel the current PendingFallback. */
command CancelFallback(): DefaultSuccess = 4;
}

/** The Service Area cluster provides an interface for controlling the areas where a device should operate, and for querying the current area being serviced. */
Expand Down
Loading
Loading