Skip to content

Commit 6fe4b11

Browse files
Align On/Off cluster XML with the spec. (project-chip#29404)
* Align On/Off cluster XML with the spec. Updates to the changes from CHIP-Specifications/connectedhomeip-spec#6511 and fixes some other bugs (e.g. incorrect "DeadFrontBehavior" feature name). Fixes project-chip#27092 * Auto-update .zap files. * Regenerate generated code.
1 parent 40a17dc commit 6fe4b11

File tree

119 files changed

+1040
-960
lines changed

Some content is hidden

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

119 files changed

+1040
-960
lines changed

examples/all-clusters-app/all-clusters-common/all-clusters-app.matter

+26-26
Original file line numberDiff line numberDiff line change
@@ -273,41 +273,41 @@ server cluster Scenes = 5 {
273273

274274
/** Attributes and commands for switching devices between 'On' and 'Off' states. */
275275
client cluster OnOff = 6 {
276-
enum OnOffDelayedAllOffEffectVariant : ENUM8 {
277-
kFadeToOffIn0p8Seconds = 0;
276+
enum DelayedAllOffEffectVariantEnum : ENUM8 {
277+
kDelayedOffFastFade = 0;
278278
kNoFade = 1;
279-
k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2;
279+
kDelayedOffSlowFade = 2;
280280
}
281281

282-
enum OnOffDyingLightEffectVariant : ENUM8 {
283-
k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0;
282+
enum DyingLightEffectVariantEnum : ENUM8 {
283+
kDyingLightFadeOff = 0;
284284
}
285285

286-
enum OnOffEffectIdentifier : ENUM8 {
286+
enum EffectIdentifierEnum : ENUM8 {
287287
kDelayedAllOff = 0;
288288
kDyingLight = 1;
289289
}
290290

291-
enum OnOffStartUpOnOff : ENUM8 {
291+
enum StartUpOnOffEnum : ENUM8 {
292292
kOff = 0;
293293
kOn = 1;
294-
kTogglePreviousOnOff = 2;
294+
kToggle = 2;
295295
}
296296

297297
bitmap Feature : BITMAP32 {
298298
kLighting = 0x1;
299-
kDeadFront = 0x2;
299+
kDeadFrontBehavior = 0x2;
300300
}
301301

302-
bitmap OnOffControl : BITMAP8 {
302+
bitmap OnOffControlBitmap : BITMAP8 {
303303
kAcceptOnlyWhenOn = 0x1;
304304
}
305305

306306
readonly attribute boolean onOff = 0;
307307
readonly attribute optional boolean globalSceneControl = 16384;
308308
attribute optional int16u onTime = 16385;
309309
attribute optional int16u offWaitTime = 16386;
310-
attribute access(write: manage) optional nullable OnOffStartUpOnOff startUpOnOff = 16387;
310+
attribute access(write: manage) optional nullable StartUpOnOffEnum startUpOnOff = 16387;
311311
readonly attribute command_id generatedCommandList[] = 65528;
312312
readonly attribute command_id acceptedCommandList[] = 65529;
313313
readonly attribute event_id eventList[] = 65530;
@@ -316,12 +316,12 @@ client cluster OnOff = 6 {
316316
readonly attribute int16u clusterRevision = 65533;
317317

318318
request struct OffWithEffectRequest {
319-
OnOffEffectIdentifier effectIdentifier = 0;
319+
EffectIdentifierEnum effectIdentifier = 0;
320320
int8u effectVariant = 1;
321321
}
322322

323323
request struct OnWithTimedOffRequest {
324-
OnOffControl onOffControl = 0;
324+
OnOffControlBitmap onOffControl = 0;
325325
int16u onTime = 1;
326326
int16u offWaitTime = 2;
327327
}
@@ -342,41 +342,41 @@ client cluster OnOff = 6 {
342342

343343
/** Attributes and commands for switching devices between 'On' and 'Off' states. */
344344
server cluster OnOff = 6 {
345-
enum OnOffDelayedAllOffEffectVariant : ENUM8 {
346-
kFadeToOffIn0p8Seconds = 0;
345+
enum DelayedAllOffEffectVariantEnum : ENUM8 {
346+
kDelayedOffFastFade = 0;
347347
kNoFade = 1;
348-
k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2;
348+
kDelayedOffSlowFade = 2;
349349
}
350350

351-
enum OnOffDyingLightEffectVariant : ENUM8 {
352-
k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0;
351+
enum DyingLightEffectVariantEnum : ENUM8 {
352+
kDyingLightFadeOff = 0;
353353
}
354354

355-
enum OnOffEffectIdentifier : ENUM8 {
355+
enum EffectIdentifierEnum : ENUM8 {
356356
kDelayedAllOff = 0;
357357
kDyingLight = 1;
358358
}
359359

360-
enum OnOffStartUpOnOff : ENUM8 {
360+
enum StartUpOnOffEnum : ENUM8 {
361361
kOff = 0;
362362
kOn = 1;
363-
kTogglePreviousOnOff = 2;
363+
kToggle = 2;
364364
}
365365

366366
bitmap Feature : BITMAP32 {
367367
kLighting = 0x1;
368-
kDeadFront = 0x2;
368+
kDeadFrontBehavior = 0x2;
369369
}
370370

371-
bitmap OnOffControl : BITMAP8 {
371+
bitmap OnOffControlBitmap : BITMAP8 {
372372
kAcceptOnlyWhenOn = 0x1;
373373
}
374374

375375
readonly attribute boolean onOff = 0;
376376
readonly attribute boolean globalSceneControl = 16384;
377377
attribute int16u onTime = 16385;
378378
attribute int16u offWaitTime = 16386;
379-
attribute access(write: manage) nullable OnOffStartUpOnOff startUpOnOff = 16387;
379+
attribute access(write: manage) nullable StartUpOnOffEnum startUpOnOff = 16387;
380380
readonly attribute command_id generatedCommandList[] = 65528;
381381
readonly attribute command_id acceptedCommandList[] = 65529;
382382
readonly attribute event_id eventList[] = 65530;
@@ -385,12 +385,12 @@ server cluster OnOff = 6 {
385385
readonly attribute int16u clusterRevision = 65533;
386386

387387
request struct OffWithEffectRequest {
388-
OnOffEffectIdentifier effectIdentifier = 0;
388+
EffectIdentifierEnum effectIdentifier = 0;
389389
int8u effectVariant = 1;
390390
}
391391

392392
request struct OnWithTimedOffRequest {
393-
OnOffControl onOffControl = 0;
393+
OnOffControlBitmap onOffControl = 0;
394394
int16u onTime = 1;
395395
int16u offWaitTime = 2;
396396
}

examples/all-clusters-app/all-clusters-common/all-clusters-app.zap

+3-4
Original file line numberDiff line numberDiff line change
@@ -11528,7 +11528,7 @@
1152811528
"code": 16387,
1152911529
"mfgCode": null,
1153011530
"side": "server",
11531-
"type": "OnOffStartUpOnOff",
11531+
"type": "StartUpOnOffEnum",
1153211532
"included": 1,
1153311533
"storageOption": "NVM",
1153411534
"singleton": 0,
@@ -31622,7 +31622,7 @@
3162231622
"code": 16387,
3162331623
"mfgCode": null,
3162431624
"side": "server",
31625-
"type": "OnOffStartUpOnOff",
31625+
"type": "StartUpOnOffEnum",
3162631626
"included": 1,
3162731627
"storageOption": "RAM",
3162831628
"singleton": 0,
@@ -35392,6 +35392,5 @@
3539235392
"endpointId": 65534,
3539335393
"networkId": 0
3539435394
}
35395-
],
35396-
"log": []
35395+
]
3539735396
}

examples/all-clusters-app/ameba/main/include/OnOffCommands.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ void ProcessOnOffUnicastBindingCommand(BindingCommandData * data, const EmberBin
124124
break;
125125

126126
case Clusters::OnOff::Commands::OffWithEffect::Id:
127-
offwitheffectCommand.effectIdentifier = static_cast<Clusters::OnOff::OnOffEffectIdentifier>(data->args[0]);
127+
offwitheffectCommand.effectIdentifier = static_cast<Clusters::OnOff::EffectIdentifierEnum>(data->args[0]);
128128
offwitheffectCommand.effectVariant = static_cast<uint8_t>(data->args[1]);
129129
Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote,
130130
offwitheffectCommand, onSuccess, onFailure);
@@ -136,7 +136,7 @@ void ProcessOnOffUnicastBindingCommand(BindingCommandData * data, const EmberBin
136136
break;
137137

138138
case Clusters::OnOff::Commands::OnWithTimedOff::Id:
139-
onwithtimedoffCommand.onOffControl = static_cast<chip::BitMask<Clusters::OnOff::OnOffControl>>(data->args[0]);
139+
onwithtimedoffCommand.onOffControl = static_cast<chip::BitMask<Clusters::OnOff::OnOffControlBitmap>>(data->args[0]);
140140
onwithtimedoffCommand.onTime = static_cast<uint16_t>(data->args[1]);
141141
onwithtimedoffCommand.offWaitTime = static_cast<uint16_t>(data->args[2]);
142142
Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote,
@@ -171,7 +171,7 @@ void ProcessOnOffGroupBindingCommand(BindingCommandData * data, const EmberBindi
171171
break;
172172

173173
case Clusters::OnOff::Commands::OffWithEffect::Id:
174-
offwitheffectCommand.effectIdentifier = static_cast<Clusters::OnOff::OnOffEffectIdentifier>(data->args[0]);
174+
offwitheffectCommand.effectIdentifier = static_cast<Clusters::OnOff::EffectIdentifierEnum>(data->args[0]);
175175
offwitheffectCommand.effectVariant = static_cast<uint8_t>(data->args[1]);
176176
Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, offwitheffectCommand);
177177
break;
@@ -181,7 +181,7 @@ void ProcessOnOffGroupBindingCommand(BindingCommandData * data, const EmberBindi
181181
break;
182182

183183
case Clusters::OnOff::Commands::OnWithTimedOff::Id:
184-
onwithtimedoffCommand.onOffControl = static_cast<chip::BitMask<Clusters::OnOff::OnOffControl>>(data->args[0]);
184+
onwithtimedoffCommand.onOffControl = static_cast<chip::BitMask<Clusters::OnOff::OnOffControlBitmap>>(data->args[0]);
185185
onwithtimedoffCommand.onTime = static_cast<uint16_t>(data->args[1]);
186186
onwithtimedoffCommand.offWaitTime = static_cast<uint16_t>(data->args[2]);
187187
Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, onwithtimedoffCommand);

examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter

+13-13
Original file line numberDiff line numberDiff line change
@@ -273,41 +273,41 @@ server cluster Scenes = 5 {
273273

274274
/** Attributes and commands for switching devices between 'On' and 'Off' states. */
275275
server cluster OnOff = 6 {
276-
enum OnOffDelayedAllOffEffectVariant : ENUM8 {
277-
kFadeToOffIn0p8Seconds = 0;
276+
enum DelayedAllOffEffectVariantEnum : ENUM8 {
277+
kDelayedOffFastFade = 0;
278278
kNoFade = 1;
279-
k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2;
279+
kDelayedOffSlowFade = 2;
280280
}
281281

282-
enum OnOffDyingLightEffectVariant : ENUM8 {
283-
k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0;
282+
enum DyingLightEffectVariantEnum : ENUM8 {
283+
kDyingLightFadeOff = 0;
284284
}
285285

286-
enum OnOffEffectIdentifier : ENUM8 {
286+
enum EffectIdentifierEnum : ENUM8 {
287287
kDelayedAllOff = 0;
288288
kDyingLight = 1;
289289
}
290290

291-
enum OnOffStartUpOnOff : ENUM8 {
291+
enum StartUpOnOffEnum : ENUM8 {
292292
kOff = 0;
293293
kOn = 1;
294-
kTogglePreviousOnOff = 2;
294+
kToggle = 2;
295295
}
296296

297297
bitmap Feature : BITMAP32 {
298298
kLighting = 0x1;
299-
kDeadFront = 0x2;
299+
kDeadFrontBehavior = 0x2;
300300
}
301301

302-
bitmap OnOffControl : BITMAP8 {
302+
bitmap OnOffControlBitmap : BITMAP8 {
303303
kAcceptOnlyWhenOn = 0x1;
304304
}
305305

306306
readonly attribute boolean onOff = 0;
307307
readonly attribute boolean globalSceneControl = 16384;
308308
attribute int16u onTime = 16385;
309309
attribute int16u offWaitTime = 16386;
310-
attribute access(write: manage) nullable OnOffStartUpOnOff startUpOnOff = 16387;
310+
attribute access(write: manage) nullable StartUpOnOffEnum startUpOnOff = 16387;
311311
readonly attribute command_id generatedCommandList[] = 65528;
312312
readonly attribute command_id acceptedCommandList[] = 65529;
313313
readonly attribute event_id eventList[] = 65530;
@@ -316,12 +316,12 @@ server cluster OnOff = 6 {
316316
readonly attribute int16u clusterRevision = 65533;
317317

318318
request struct OffWithEffectRequest {
319-
OnOffEffectIdentifier effectIdentifier = 0;
319+
EffectIdentifierEnum effectIdentifier = 0;
320320
int8u effectVariant = 1;
321321
}
322322

323323
request struct OnWithTimedOffRequest {
324-
OnOffControl onOffControl = 0;
324+
OnOffControlBitmap onOffControl = 0;
325325
int16u onTime = 1;
326326
int16u offWaitTime = 2;
327327
}

examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap

+2-2
Original file line numberDiff line numberDiff line change
@@ -10580,7 +10580,7 @@
1058010580
"code": 16387,
1058110581
"mfgCode": null,
1058210582
"side": "server",
10583-
"type": "OnOffStartUpOnOff",
10583+
"type": "StartUpOnOffEnum",
1058410584
"included": 1,
1058510585
"storageOption": "NVM",
1058610586
"singleton": 0,
@@ -23818,7 +23818,7 @@
2381823818
"code": 16387,
2381923819
"mfgCode": null,
2382023820
"side": "server",
23821-
"type": "OnOffStartUpOnOff",
23821+
"type": "StartUpOnOffEnum",
2382223822
"included": 1,
2382323823
"storageOption": "RAM",
2382423824
"singleton": 0,

examples/bridge-app/bridge-common/bridge-app.matter

+10-10
Original file line numberDiff line numberDiff line change
@@ -81,33 +81,33 @@ server cluster Identify = 3 {
8181

8282
/** Attributes and commands for switching devices between 'On' and 'Off' states. */
8383
server cluster OnOff = 6 {
84-
enum OnOffDelayedAllOffEffectVariant : ENUM8 {
85-
kFadeToOffIn0p8Seconds = 0;
84+
enum DelayedAllOffEffectVariantEnum : ENUM8 {
85+
kDelayedOffFastFade = 0;
8686
kNoFade = 1;
87-
k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2;
87+
kDelayedOffSlowFade = 2;
8888
}
8989

90-
enum OnOffDyingLightEffectVariant : ENUM8 {
91-
k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0;
90+
enum DyingLightEffectVariantEnum : ENUM8 {
91+
kDyingLightFadeOff = 0;
9292
}
9393

94-
enum OnOffEffectIdentifier : ENUM8 {
94+
enum EffectIdentifierEnum : ENUM8 {
9595
kDelayedAllOff = 0;
9696
kDyingLight = 1;
9797
}
9898

99-
enum OnOffStartUpOnOff : ENUM8 {
99+
enum StartUpOnOffEnum : ENUM8 {
100100
kOff = 0;
101101
kOn = 1;
102-
kTogglePreviousOnOff = 2;
102+
kToggle = 2;
103103
}
104104

105105
bitmap Feature : BITMAP32 {
106106
kLighting = 0x1;
107-
kDeadFront = 0x2;
107+
kDeadFrontBehavior = 0x2;
108108
}
109109

110-
bitmap OnOffControl : BITMAP8 {
110+
bitmap OnOffControlBitmap : BITMAP8 {
111111
kAcceptOnlyWhenOn = 0x1;
112112
}
113113

examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter

+11-11
Original file line numberDiff line numberDiff line change
@@ -144,41 +144,41 @@ server cluster Groups = 4 {
144144

145145
/** Attributes and commands for switching devices between 'On' and 'Off' states. */
146146
server cluster OnOff = 6 {
147-
enum OnOffDelayedAllOffEffectVariant : ENUM8 {
148-
kFadeToOffIn0p8Seconds = 0;
147+
enum DelayedAllOffEffectVariantEnum : ENUM8 {
148+
kDelayedOffFastFade = 0;
149149
kNoFade = 1;
150-
k50PercentDimDownIn0p8SecondsThenFadeToOffIn12Seconds = 2;
150+
kDelayedOffSlowFade = 2;
151151
}
152152

153-
enum OnOffDyingLightEffectVariant : ENUM8 {
154-
k20PercenterDimUpIn0p5SecondsThenFadeToOffIn1Second = 0;
153+
enum DyingLightEffectVariantEnum : ENUM8 {
154+
kDyingLightFadeOff = 0;
155155
}
156156

157-
enum OnOffEffectIdentifier : ENUM8 {
157+
enum EffectIdentifierEnum : ENUM8 {
158158
kDelayedAllOff = 0;
159159
kDyingLight = 1;
160160
}
161161

162-
enum OnOffStartUpOnOff : ENUM8 {
162+
enum StartUpOnOffEnum : ENUM8 {
163163
kOff = 0;
164164
kOn = 1;
165-
kTogglePreviousOnOff = 2;
165+
kToggle = 2;
166166
}
167167

168168
bitmap Feature : BITMAP32 {
169169
kLighting = 0x1;
170-
kDeadFront = 0x2;
170+
kDeadFrontBehavior = 0x2;
171171
}
172172

173-
bitmap OnOffControl : BITMAP8 {
173+
bitmap OnOffControlBitmap : BITMAP8 {
174174
kAcceptOnlyWhenOn = 0x1;
175175
}
176176

177177
readonly attribute boolean onOff = 0;
178178
readonly attribute boolean globalSceneControl = 16384;
179179
attribute int16u onTime = 16385;
180180
attribute int16u offWaitTime = 16386;
181-
attribute access(write: manage) nullable OnOffStartUpOnOff startUpOnOff = 16387;
181+
attribute access(write: manage) nullable StartUpOnOffEnum startUpOnOff = 16387;
182182
readonly attribute command_id generatedCommandList[] = 65528;
183183
readonly attribute command_id acceptedCommandList[] = 65529;
184184
readonly attribute event_id eventList[] = 65530;

examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap

+1-1
Original file line numberDiff line numberDiff line change
@@ -6351,7 +6351,7 @@
63516351
"code": 16387,
63526352
"mfgCode": null,
63536353
"side": "server",
6354-
"type": "OnOffStartUpOnOff",
6354+
"type": "StartUpOnOffEnum",
63556355
"included": 1,
63566356
"storageOption": "RAM",
63576357
"singleton": 0,

examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap

+1-1
Original file line numberDiff line numberDiff line change
@@ -6416,7 +6416,7 @@
64166416
"code": 16387,
64176417
"mfgCode": null,
64186418
"side": "server",
6419-
"type": "OnOffStartUpOnOff",
6419+
"type": "StartUpOnOffEnum",
64206420
"included": 0,
64216421
"storageOption": "RAM",
64226422
"singleton": 0,

0 commit comments

Comments
 (0)