Skip to content

Commit

Permalink
Update OffWithEffect arguments to be of type int8u per spec (#25132)
Browse files Browse the repository at this point in the history
* Update OffWithEffect arguments to be of type int8u per spec

* Update generated code
  • Loading branch information
vivien-apple authored and pull[bot] committed Nov 1, 2023
1 parent ffff1ca commit 1435814
Show file tree
Hide file tree
Showing 19 changed files with 29 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ server cluster OnOff = 6 {

request struct OffWithEffectRequest {
OnOffEffectIdentifier effectIdentifier = 0;
OnOffDelayedAllOffEffectVariant effectVariant = 1;
int8u effectVariant = 1;
}

request struct OnWithTimedOffRequest {
Expand Down
4 changes: 2 additions & 2 deletions examples/all-clusters-app/ameba/main/include/OnOffCommands.h
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ void ProcessOnOffUnicastBindingCommand(BindingCommandData * data, const EmberBin

case Clusters::OnOff::Commands::OffWithEffect::Id:
offwitheffectCommand.effectIdentifier = static_cast<Clusters::OnOff::OnOffEffectIdentifier>(data->args[0]);
offwitheffectCommand.effectVariant = static_cast<Clusters::OnOff::OnOffDelayedAllOffEffectVariant>(data->args[1]);
offwitheffectCommand.effectVariant = static_cast<uint8_t>(data->args[1]);
Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote,
offwitheffectCommand, onSuccess, onFailure);
break;
Expand Down Expand Up @@ -172,7 +172,7 @@ void ProcessOnOffGroupBindingCommand(BindingCommandData * data, const EmberBindi

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ server cluster OnOff = 6 {

request struct OffWithEffectRequest {
OnOffEffectIdentifier effectIdentifier = 0;
OnOffDelayedAllOffEffectVariant effectVariant = 1;
int8u effectVariant = 1;
}

request struct OnWithTimedOffRequest {
Expand Down
2 changes: 1 addition & 1 deletion examples/lighting-app/lighting-common/lighting-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ server cluster OnOff = 6 {

request struct OffWithEffectRequest {
OnOffEffectIdentifier effectIdentifier = 0;
OnOffDelayedAllOffEffectVariant effectVariant = 1;
int8u effectVariant = 1;
}

request struct OnWithTimedOffRequest {
Expand Down
2 changes: 1 addition & 1 deletion examples/lighting-app/nxp/zap/lighting-on-off.matter
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ server cluster OnOff = 6 {

request struct OffWithEffectRequest {
OnOffEffectIdentifier effectIdentifier = 0;
OnOffDelayedAllOffEffectVariant effectVariant = 1;
int8u effectVariant = 1;
}

request struct OnWithTimedOffRequest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ server cluster OnOff = 6 {

request struct OffWithEffectRequest {
OnOffEffectIdentifier effectIdentifier = 0;
OnOffDelayedAllOffEffectVariant effectVariant = 1;
int8u effectVariant = 1;
}

request struct OnWithTimedOffRequest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ server cluster OnOff = 6 {

request struct OffWithEffectRequest {
OnOffEffectIdentifier effectIdentifier = 0;
OnOffDelayedAllOffEffectVariant effectVariant = 1;
int8u effectVariant = 1;
}

request struct OnWithTimedOffRequest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ server cluster OnOff = 6 {

request struct OffWithEffectRequest {
OnOffEffectIdentifier effectIdentifier = 0;
OnOffDelayedAllOffEffectVariant effectVariant = 1;
int8u effectVariant = 1;
}

request struct OnWithTimedOffRequest {
Expand Down
4 changes: 2 additions & 2 deletions examples/placeholder/linux/apps/app1/config.matter
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ client cluster OnOff = 6 {

request struct OffWithEffectRequest {
OnOffEffectIdentifier effectIdentifier = 0;
OnOffDelayedAllOffEffectVariant effectVariant = 1;
int8u effectVariant = 1;
}

request struct OnWithTimedOffRequest {
Expand Down Expand Up @@ -330,7 +330,7 @@ server cluster OnOff = 6 {

request struct OffWithEffectRequest {
OnOffEffectIdentifier effectIdentifier = 0;
OnOffDelayedAllOffEffectVariant effectVariant = 1;
int8u effectVariant = 1;
}

request struct OnWithTimedOffRequest {
Expand Down
4 changes: 2 additions & 2 deletions examples/placeholder/linux/apps/app2/config.matter
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ client cluster OnOff = 6 {

request struct OffWithEffectRequest {
OnOffEffectIdentifier effectIdentifier = 0;
OnOffDelayedAllOffEffectVariant effectVariant = 1;
int8u effectVariant = 1;
}

request struct OnWithTimedOffRequest {
Expand Down Expand Up @@ -330,7 +330,7 @@ server cluster OnOff = 6 {

request struct OffWithEffectRequest {
OnOffEffectIdentifier effectIdentifier = 0;
OnOffDelayedAllOffEffectVariant effectVariant = 1;
int8u effectVariant = 1;
}

request struct OnWithTimedOffRequest {
Expand Down
2 changes: 1 addition & 1 deletion src/app/clusters/on-off-server/on-off-server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ bool OnOffServer::offWithEffectCommand(app::CommandHandler * commandObj, const a
if (effect != nullptr && effect->mOffWithEffectTrigger != nullptr)
{
effect->mEffectIdentifier = effectId;
effect->mEffectVariant = to_underlying(effectVariant);
effect->mEffectVariant = effectVariant;

effect->mOffWithEffectTrigger(effect);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ limitations under the License.
<command source="client" code="0x40" name="OffWithEffect" optional="true">
<description>The OffWithEffect command allows devices to be turned off using enhanced ways of fading.</description>
<arg name="EffectIdentifier" type="OnOffEffectIdentifier"/>
<arg name="EffectVariant" type="OnOffDelayedAllOffEffectVariant"/>
<arg name="EffectVariant" type="int8u"/>
</command>

<command source="client" code="0x41" name="OnWithRecallGlobalScene" optional="true">
Expand Down
2 changes: 1 addition & 1 deletion src/controller/data_model/controller-clusters.matter
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ client cluster OnOff = 6 {

request struct OffWithEffectRequest {
OnOffEffectIdentifier effectIdentifier = 0;
OnOffDelayedAllOffEffectVariant effectVariant = 1;
int8u effectVariant = 1;
}

request struct OnWithTimedOffRequest {
Expand Down
4 changes: 2 additions & 2 deletions src/controller/python/chip/clusters/Objects.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions zzz_generated/chip-tool/zap-generated/test/Commands.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1435814

Please sign in to comment.