Skip to content

Commit 4227455

Browse files
vivien-applepull[bot]
authored andcommitted
Update OffWithEffect arguments to be of type int8u per spec (#25132)
* Update OffWithEffect arguments to be of type int8u per spec * Update generated code
1 parent 1d29e39 commit 4227455

File tree

19 files changed

+29
-31
lines changed

19 files changed

+29
-31
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ server cluster OnOff = 6 {
322322

323323
request struct OffWithEffectRequest {
324324
OnOffEffectIdentifier effectIdentifier = 0;
325-
OnOffDelayedAllOffEffectVariant effectVariant = 1;
325+
int8u effectVariant = 1;
326326
}
327327

328328
request struct OnWithTimedOffRequest {

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ void ProcessOnOffUnicastBindingCommand(BindingCommandData * data, const EmberBin
125125

126126
case Clusters::OnOff::Commands::OffWithEffect::Id:
127127
offwitheffectCommand.effectIdentifier = static_cast<Clusters::OnOff::OnOffEffectIdentifier>(data->args[0]);
128-
offwitheffectCommand.effectVariant = static_cast<Clusters::OnOff::OnOffDelayedAllOffEffectVariant>(data->args[1]);
128+
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);
131131
break;
@@ -172,7 +172,7 @@ void ProcessOnOffGroupBindingCommand(BindingCommandData * data, const EmberBindi
172172

173173
case Clusters::OnOff::Commands::OffWithEffect::Id:
174174
offwitheffectCommand.effectIdentifier = static_cast<Clusters::OnOff::OnOffEffectIdentifier>(data->args[0]);
175-
offwitheffectCommand.effectVariant = static_cast<Clusters::OnOff::OnOffDelayedAllOffEffectVariant>(data->args[1]);
175+
offwitheffectCommand.effectVariant = static_cast<uint8_t>(data->args[1]);
176176
Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, offwitheffectCommand);
177177
break;
178178

examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ server cluster OnOff = 6 {
154154

155155
request struct OffWithEffectRequest {
156156
OnOffEffectIdentifier effectIdentifier = 0;
157-
OnOffDelayedAllOffEffectVariant effectVariant = 1;
157+
int8u effectVariant = 1;
158158
}
159159

160160
request struct OnWithTimedOffRequest {

examples/lighting-app/lighting-common/lighting-app.matter

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ server cluster OnOff = 6 {
159159

160160
request struct OffWithEffectRequest {
161161
OnOffEffectIdentifier effectIdentifier = 0;
162-
OnOffDelayedAllOffEffectVariant effectVariant = 1;
162+
int8u effectVariant = 1;
163163
}
164164

165165
request struct OnWithTimedOffRequest {

examples/lighting-app/nxp/zap/lighting-on-off.matter

+1-1
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ server cluster OnOff = 6 {
154154

155155
request struct OffWithEffectRequest {
156156
OnOffEffectIdentifier effectIdentifier = 0;
157-
OnOffDelayedAllOffEffectVariant effectVariant = 1;
157+
int8u effectVariant = 1;
158158
}
159159

160160
request struct OnWithTimedOffRequest {

examples/lighting-app/silabs/efr32/data_model/lighting-thread-app.matter

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ server cluster OnOff = 6 {
159159

160160
request struct OffWithEffectRequest {
161161
OnOffEffectIdentifier effectIdentifier = 0;
162-
OnOffDelayedAllOffEffectVariant effectVariant = 1;
162+
int8u effectVariant = 1;
163163
}
164164

165165
request struct OnWithTimedOffRequest {

examples/lighting-app/silabs/efr32/data_model/lighting-wifi-app.matter

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ server cluster OnOff = 6 {
159159

160160
request struct OffWithEffectRequest {
161161
OnOffEffectIdentifier effectIdentifier = 0;
162-
OnOffDelayedAllOffEffectVariant effectVariant = 1;
162+
int8u effectVariant = 1;
163163
}
164164

165165
request struct OnWithTimedOffRequest {

examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ server cluster OnOff = 6 {
159159

160160
request struct OffWithEffectRequest {
161161
OnOffEffectIdentifier effectIdentifier = 0;
162-
OnOffDelayedAllOffEffectVariant effectVariant = 1;
162+
int8u effectVariant = 1;
163163
}
164164

165165
request struct OnWithTimedOffRequest {

examples/placeholder/linux/apps/app1/config.matter

+2-2
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ client cluster OnOff = 6 {
269269

270270
request struct OffWithEffectRequest {
271271
OnOffEffectIdentifier effectIdentifier = 0;
272-
OnOffDelayedAllOffEffectVariant effectVariant = 1;
272+
int8u effectVariant = 1;
273273
}
274274

275275
request struct OnWithTimedOffRequest {
@@ -330,7 +330,7 @@ server cluster OnOff = 6 {
330330

331331
request struct OffWithEffectRequest {
332332
OnOffEffectIdentifier effectIdentifier = 0;
333-
OnOffDelayedAllOffEffectVariant effectVariant = 1;
333+
int8u effectVariant = 1;
334334
}
335335

336336
request struct OnWithTimedOffRequest {

examples/placeholder/linux/apps/app2/config.matter

+2-2
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ client cluster OnOff = 6 {
269269

270270
request struct OffWithEffectRequest {
271271
OnOffEffectIdentifier effectIdentifier = 0;
272-
OnOffDelayedAllOffEffectVariant effectVariant = 1;
272+
int8u effectVariant = 1;
273273
}
274274

275275
request struct OnWithTimedOffRequest {
@@ -330,7 +330,7 @@ server cluster OnOff = 6 {
330330

331331
request struct OffWithEffectRequest {
332332
OnOffEffectIdentifier effectIdentifier = 0;
333-
OnOffDelayedAllOffEffectVariant effectVariant = 1;
333+
int8u effectVariant = 1;
334334
}
335335

336336
request struct OnWithTimedOffRequest {

src/app/clusters/on-off-server/on-off-server.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ bool OnOffServer::offWithEffectCommand(app::CommandHandler * commandObj, const a
394394
if (effect != nullptr && effect->mOffWithEffectTrigger != nullptr)
395395
{
396396
effect->mEffectIdentifier = effectId;
397-
effect->mEffectVariant = to_underlying(effectVariant);
397+
effect->mEffectVariant = effectVariant;
398398

399399
effect->mOffWithEffectTrigger(effect);
400400
}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ limitations under the License.
8080
<command source="client" code="0x40" name="OffWithEffect" optional="true">
8181
<description>The OffWithEffect command allows devices to be turned off using enhanced ways of fading.</description>
8282
<arg name="EffectIdentifier" type="OnOffEffectIdentifier"/>
83-
<arg name="EffectVariant" type="OnOffDelayedAllOffEffectVariant"/>
83+
<arg name="EffectVariant" type="int8u"/>
8484
</command>
8585

8686
<command source="client" code="0x41" name="OnWithRecallGlobalScene" optional="true">

src/controller/data_model/controller-clusters.matter

+1-1
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ client cluster OnOff = 6 {
280280

281281
request struct OffWithEffectRequest {
282282
OnOffEffectIdentifier effectIdentifier = 0;
283-
OnOffDelayedAllOffEffectVariant effectVariant = 1;
283+
int8u effectVariant = 1;
284284
}
285285

286286
request struct OnWithTimedOffRequest {

src/controller/python/chip/clusters/Objects.py

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

zzz_generated/app-common/app-common/zap-generated/cluster-objects.h

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

zzz_generated/chip-tool/zap-generated/test/Commands.h

+4-4
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)