Skip to content

Commit c49578f

Browse files
committed
closure control cluster zap generated code
1 parent e7902af commit c49578f

File tree

56 files changed

+11129
-2
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+11129
-2
lines changed

docs/ids_and_codes/zap_clusters.md

+1
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ Generally regenerate using one of:
8989
| 159 | 0x9F | DeviceEnergyManagementMode |
9090
| 257 | 0x101 | DoorLock |
9191
| 258 | 0x102 | WindowCovering |
92+
| 260 | 0x104 | ClosureControl |
9293
| 336 | 0x150 | ServiceArea |
9394
| 512 | 0x200 | PumpConfigurationAndControl |
9495
| 513 | 0x201 | Thermostat |

scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/gen_config.h

+2
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@
9898
#define MATTER_DM_DEVICE_ENERGY_MANAGEMENT_MODE_CLUSTER_SERVER_ENDPOINT_COUNT (1)
9999
#define MATTER_DM_DOOR_LOCK_CLUSTER_SERVER_ENDPOINT_COUNT (0)
100100
#define MATTER_DM_WINDOW_COVERING_CLUSTER_SERVER_ENDPOINT_COUNT (1)
101+
#define MATTER_DM_CLOSURE_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (0)
101102
#define MATTER_DM_SERVICE_AREA_CLUSTER_SERVER_ENDPOINT_COUNT (0)
102103
#define MATTER_DM_PUMP_CONFIGURATION_AND_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (1)
103104
#define MATTER_DM_THERMOSTAT_CLUSTER_SERVER_ENDPOINT_COUNT (1)
@@ -229,6 +230,7 @@
229230
#define MATTER_DM_DEVICE_ENERGY_MANAGEMENT_MODE_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
230231
#define MATTER_DM_DOOR_LOCK_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
231232
#define MATTER_DM_WINDOW_COVERING_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
233+
#define MATTER_DM_CLOSURE_CONTROL_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
232234
#define MATTER_DM_SERVICE_AREA_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
233235
#define MATTER_DM_PUMP_CONFIGURATION_AND_CONTROL_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
234236
#define MATTER_DM_THERMOSTAT_CLUSTER_CLIENT_ENDPOINT_COUNT (0)

scripts/tools/zap/tests/outputs/lighting-app/app-templates/gen_config.h

+2
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@
9898
#define MATTER_DM_DEVICE_ENERGY_MANAGEMENT_MODE_CLUSTER_SERVER_ENDPOINT_COUNT (0)
9999
#define MATTER_DM_DOOR_LOCK_CLUSTER_SERVER_ENDPOINT_COUNT (0)
100100
#define MATTER_DM_WINDOW_COVERING_CLUSTER_SERVER_ENDPOINT_COUNT (0)
101+
#define MATTER_DM_CLOSURE_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (0)
101102
#define MATTER_DM_SERVICE_AREA_CLUSTER_SERVER_ENDPOINT_COUNT (0)
102103
#define MATTER_DM_PUMP_CONFIGURATION_AND_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (0)
103104
#define MATTER_DM_THERMOSTAT_CLUSTER_SERVER_ENDPOINT_COUNT (0)
@@ -229,6 +230,7 @@
229230
#define MATTER_DM_DEVICE_ENERGY_MANAGEMENT_MODE_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
230231
#define MATTER_DM_DOOR_LOCK_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
231232
#define MATTER_DM_WINDOW_COVERING_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
233+
#define MATTER_DM_CLOSURE_CONTROL_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
232234
#define MATTER_DM_SERVICE_AREA_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
233235
#define MATTER_DM_PUMP_CONFIGURATION_AND_CONTROL_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
234236
#define MATTER_DM_THERMOSTAT_CLUSTER_CLIENT_ENDPOINT_COUNT (0)

src/app/zap-templates/zcl/data-model/chip/closure-control-cluster.xml

+7-2
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@ Git: 0.7-summer-2025-5-g06c4d5596-dirty
9393

9494
<enum name="TriggerPositionEnum" type="enum8">
9595
<cluster code="0x0104"/>
96+
<item name="AtFullyClosed" value="0x00"/>
97+
<item name="AtFullyOpened" value="0x01"/>
98+
<item name="InBetween" value="0x02"/>
99+
<item name="AtVentilation" value="0x03"/>
100+
<item name="AtPedestrian" value="0x04"/>
96101
</enum>
97102

98103
<struct name="OverallStateStruct" apiMaturity="provisional">
@@ -139,7 +144,7 @@ Git: 0.7-summer-2025-5-g06c4d5596-dirty
139144
<feature name="FB"/>
140145
</mandatoryConform>
141146
</attribute>
142-
<attribute code="0x0007" side="server" define="TRIGGER_POSITION" type="TriggerPositionEnum" optional="true">
147+
<attribute code="0x0007" side="server" define="TRIGGER_POSITION" type="TriggerPositionEnum" optional="true" min="0x00" max="0x04">
143148
<description>TriggerPosition</description>
144149
<mandatoryConform>
145150
<feature name="FB"/>
@@ -185,7 +190,7 @@ Git: 0.7-summer-2025-5-g06c4d5596-dirty
185190
<description>Upon receipt, this SHALL configure the Fallback feature behavior using the data as follows: </description>
186191
<arg id="0" name="RestingProcedure" type="RestingProcedureEnum" optional="true" min="0x00" max="0x02"/>
187192
<arg id="1" name="TriggerCondition" type="TriggerConditionEnum" optional="true" min="0x00" max="0x02"/>
188-
<arg id="2" name="TriggerPosition" type="TriggerPositionEnum" optional="true"/>
193+
<arg id="2" name="TriggerPosition" type="TriggerPositionEnum" optional="true" min="0x00" max="0x04"/>
189194
<arg id="3" name="WaitingDelay" type="elapsed_s" optional="true" max="86400"/>
190195
<mandatoryConform>
191196
<feature name="FB"/>

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

+5
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,11 @@
201201
],
202202
"Bridged Device Basic Information": ["ProductAppearance"],
203203
"Chime": ["ActiveChimeID", "Enabled"],
204+
"Closure Control": [
205+
"OverallState",
206+
"OverallTarget",
207+
"FeatureMap"
208+
],
204209
"Descriptor": ["ClusterRevision", "FeatureMap"],
205210
"Device Energy Management": [
206211
"ESAType",

src/app/zap-templates/zcl/zcl.json

+5
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,11 @@
195195
],
196196
"Bridged Device Basic Information": ["ProductAppearance"],
197197
"Chime": ["ActiveChimeID", "Enabled"],
198+
"Closure Control": [
199+
"OverallState",
200+
"OverallTarget",
201+
"FeatureMap"
202+
],
198203
"Descriptor": ["ClusterRevision", "FeatureMap"],
199204
"Device Energy Management": [
200205
"ESAType",

src/controller/data_model/controller-clusters.matter

+141
Original file line numberDiff line numberDiff line change
@@ -6478,6 +6478,147 @@ cluster WindowCovering = 258 {
64786478
command GoToTiltPercentage(GoToTiltPercentageRequest): DefaultSuccess = 8;
64796479
}
64806480

6481+
/** */
6482+
cluster ClosureControl = 260 {
6483+
revision 1;
6484+
6485+
enum ClosureErrorEnum : enum8 {
6486+
kBlocked = 0;
6487+
kTemperatureLimited = 1;
6488+
kMaintenanceRequired = 2;
6489+
kInternalInterference = 3;
6490+
}
6491+
6492+
enum LatchingEnum : enum8 {
6493+
kLatchedAndSecured = 0;
6494+
kLatchedButNotSecured = 1;
6495+
kNotLatched = 2;
6496+
}
6497+
6498+
enum MainStateEnum : enum8 {
6499+
kStopped = 0;
6500+
kMoving = 1;
6501+
kWaitingForMotion = 2;
6502+
kError = 3;
6503+
kCalibrating = 4;
6504+
kProtected = 5;
6505+
kDisengaged = 6;
6506+
kSetupRequired = 7;
6507+
kPendingFallback = 8;
6508+
}
6509+
6510+
enum PositioningEnum : enum8 {
6511+
kFullyClosed = 0;
6512+
kFullyOpened = 1;
6513+
kPartiallyOpened = 2;
6514+
kOpenedForPedestrian = 3;
6515+
kOpenedForVentilation = 4;
6516+
kOpenedAtSignature = 5;
6517+
}
6518+
6519+
enum RestingProcedureEnum : enum8 {
6520+
kDoNothing = 0;
6521+
kReturnToFullyOpened = 1;
6522+
kReturnToFullyClosed = 2;
6523+
}
6524+
6525+
enum TagLatchEnum : enum8 {
6526+
kLatch = 0;
6527+
kUnlatch = 1;
6528+
}
6529+
6530+
enum TagPositionEnum : enum8 {
6531+
kCloseInFull = 0;
6532+
kOpenInFull = 1;
6533+
kPedestrian = 2;
6534+
kVentilation = 3;
6535+
kSignature = 4;
6536+
kSequenceNextStep = 5;
6537+
kPedestrianNextStep = 6;
6538+
}
6539+
6540+
enum TriggerConditionEnum : enum8 {
6541+
kAfterDelay = 0;
6542+
kAfterApplicativeTrigger = 1;
6543+
kAfterDelayOrApplicativeTrigger = 2;
6544+
}
6545+
6546+
enum TriggerPositionEnum : enum8 {
6547+
kAtFullyClosed = 0;
6548+
kAtFullyOpened = 1;
6549+
kInBetween = 2;
6550+
kAtVentilation = 3;
6551+
kAtPedestrian = 4;
6552+
}
6553+
6554+
bitmap Feature : bitmap32 {
6555+
kPositioning = 0x1;
6556+
kMotionLatching = 0x2;
6557+
kInstantaneous = 0x4;
6558+
kSpeed = 0x8;
6559+
kVentilation = 0x10;
6560+
kPedestrian = 0x20;
6561+
kCalibration = 0x40;
6562+
kProtection = 0x80;
6563+
kManuallyOperable = 0x100;
6564+
kFallback = 0x200;
6565+
}
6566+
6567+
struct OverallStateStruct {
6568+
optional PositioningEnum positioning = 0;
6569+
optional LatchingEnum latching = 1;
6570+
optional ThreeLevelAutoEnum speed = 2;
6571+
optional bitmap32 extraInfo = 3;
6572+
}
6573+
6574+
struct OverallTargetStruct {
6575+
optional TagPositionEnum tagPosition = 0;
6576+
optional TagLatchEnum tagLatch = 1;
6577+
optional ThreeLevelAutoEnum speed = 2;
6578+
}
6579+
6580+
readonly attribute optional nullable elapsed_s countdownTime = 0;
6581+
readonly attribute MainStateEnum mainState = 1;
6582+
readonly attribute ClosureErrorEnum currentErrorList[] = 2;
6583+
readonly attribute nullable OverallStateStruct overallState = 3;
6584+
readonly attribute nullable OverallTargetStruct overallTarget = 4;
6585+
readonly attribute optional RestingProcedureEnum restingProcedure = 5;
6586+
readonly attribute optional TriggerConditionEnum triggerCondition = 6;
6587+
readonly attribute optional TriggerPositionEnum triggerPosition = 7;
6588+
readonly attribute optional elapsed_s waitingDelay = 8;
6589+
readonly attribute optional elapsed_s kickoffTimer = 9;
6590+
readonly attribute command_id generatedCommandList[] = 65528;
6591+
readonly attribute command_id acceptedCommandList[] = 65529;
6592+
readonly attribute event_id eventList[] = 65530;
6593+
readonly attribute attrib_id attributeList[] = 65531;
6594+
readonly attribute bitmap32 featureMap = 65532;
6595+
readonly attribute int16u clusterRevision = 65533;
6596+
6597+
request struct MoveToRequest {
6598+
optional TagPositionEnum tag = 0;
6599+
optional TagLatchEnum latch = 1;
6600+
optional ThreeLevelAutoEnum speed = 2;
6601+
}
6602+
6603+
request struct ConfigureFallbackRequest {
6604+
optional RestingProcedureEnum restingProcedure = 0;
6605+
optional TriggerConditionEnum triggerCondition = 1;
6606+
optional TriggerPositionEnum triggerPosition = 2;
6607+
optional elapsed_s waitingDelay = 3;
6608+
}
6609+
6610+
/** 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. */
6611+
command Stop(): DefaultSuccess = 0;
6612+
/** Upon receipt, this SHALL move the product in the most fitting state following the data as follows: */
6613+
command MoveTo(MoveToRequest): DefaultSuccess = 1;
6614+
/** Upon receipt, this SHALL initiate a calibration. */
6615+
command access(invoke: manage) Calibrate(): DefaultSuccess = 2;
6616+
/** Upon receipt, this SHALL configure the Fallback feature behavior using the data as follows: */
6617+
command ConfigureFallback(ConfigureFallbackRequest): DefaultSuccess = 3;
6618+
/** Upon receipt, this SHALL cancel the current PendingFallback. */
6619+
command CancelFallback(): DefaultSuccess = 4;
6620+
}
6621+
64816622
/** The Service Area cluster provides an interface for controlling the areas where a device should operate, and for querying the current area being serviced. */
64826623
provisional cluster ServiceArea = 336 {
64836624
revision 1;

0 commit comments

Comments
 (0)