Skip to content

Commit

Permalink
Align naming in On/Off cluster XML with the spec. (#24237)
Browse files Browse the repository at this point in the history
* Align naming in On/Off cluster XML with the spec.

* Regenerate generated files.
  • Loading branch information
bzbarsky-apple authored and pull[bot] committed Apr 11, 2023
1 parent 0307cbf commit 0daaa78
Show file tree
Hide file tree
Showing 26 changed files with 93 additions and 63 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ server cluster OnOff = 6 {
readonly attribute int16u clusterRevision = 65533;

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

Expand Down
8 changes: 4 additions & 4 deletions examples/all-clusters-app/ameba/main/include/OnOffCommands.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ void ProcessOnOffUnicastBindingCommand(BindingCommandData * data, const EmberBin
break;

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

case Clusters::OnOff::Commands::OffWithEffect::Id:
offwitheffectCommand.effectId = static_cast<EmberAfOnOffEffectIdentifier>(data->args[0]);
offwitheffectCommand.effectVariant = static_cast<EmberAfOnOffDelayedAllOffEffectVariant>(data->args[1]);
offwitheffectCommand.effectIdentifier = static_cast<EmberAfOnOffEffectIdentifier>(data->args[0]);
offwitheffectCommand.effectVariant = static_cast<EmberAfOnOffDelayedAllOffEffectVariant>(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 {
readonly attribute int16u clusterRevision = 65533;

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

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 @@ -150,7 +150,7 @@ server cluster OnOff = 6 {
readonly attribute int16u clusterRevision = 65533;

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

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 {
readonly attribute int16u clusterRevision = 65533;

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ server cluster OnOff = 6 {
readonly attribute int16u clusterRevision = 65533;

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

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 @@ -247,7 +247,7 @@ client cluster OnOff = 6 {
readonly attribute int16u clusterRevision = 65533;

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

Expand Down Expand Up @@ -308,7 +308,7 @@ server cluster OnOff = 6 {
readonly attribute int16u clusterRevision = 65533;

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

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 @@ -247,7 +247,7 @@ client cluster OnOff = 6 {
readonly attribute int16u clusterRevision = 65533;

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

Expand Down Expand Up @@ -308,7 +308,7 @@ server cluster OnOff = 6 {
readonly attribute int16u clusterRevision = 65533;

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

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 @@ -351,7 +351,7 @@ bool OnOffServer::toggleCommand(const app::ConcreteCommandPath & commandPath)
bool OnOffServer::offWithEffectCommand(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath,
const Commands::OffWithEffect::DecodableType & commandData)
{
OnOffEffectIdentifier effectId = commandData.effectId;
OnOffEffectIdentifier effectId = commandData.effectIdentifier;
uint8_t effectVariant = commandData.effectVariant;
chip::EndpointId endpoint = commandPath.mEndpointId;
EmberAfStatus status = EMBER_ZCL_STATUS_SUCCESS;
Expand Down
8 changes: 4 additions & 4 deletions src/app/tests/suites/certification/Test_TC_OO_2_3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ tests:
PICS: OO.S.C40.Rsp
arguments:
values:
- name: "EffectId"
- name: "EffectIdentifier"
value: 0
- name: "EffectVariant"
value: 0
Expand Down Expand Up @@ -122,7 +122,7 @@ tests:
PICS: OO.S.C40.Rsp
arguments:
values:
- name: "EffectId"
- name: "EffectIdentifier"
value: 0
- name: "EffectVariant"
value: 0
Expand Down Expand Up @@ -180,7 +180,7 @@ tests:
PICS: OO.S.C40.Rsp
arguments:
values:
- name: "EffectId"
- name: "EffectIdentifier"
value: 1
- name: "EffectVariant"
value: 0
Expand Down Expand Up @@ -416,7 +416,7 @@ tests:
PICS: OO.S.C40.Rsp
arguments:
values:
- name: "EffectId"
- name: "EffectIdentifier"
value: 0
- name: "EffectVariant"
value: 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,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="EffectId" type="OnOffEffectIdentifier"/>
<arg name="EffectIdentifier" type="OnOffEffectIdentifier"/>
<arg name="EffectVariant" type="OnOffDelayedAllOffEffectVariant"/>
</command>

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 @@ -270,7 +270,7 @@ client cluster OnOff = 6 {
readonly attribute int16u clusterRevision = 65533;

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

Expand Down

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.

2 changes: 1 addition & 1 deletion src/controller/python/chip/clusters/CHIPClusters.py

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

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.

18 changes: 13 additions & 5 deletions src/darwin/Framework/CHIP/templates/availability.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4932,6 +4932,9 @@
- groupID
ViewGroupResponse:
- groupID
OnOff:
OffWithEffect:
- effectIdentifier
structs:
OTASoftwareUpdateRequestor:
- ProviderLocation
Expand Down Expand Up @@ -5184,6 +5187,9 @@
- groupId
ViewGroupResponse:
- groupId
OnOff:
OffWithEffect:
- effectId
structs:
Descriptor:
- DeviceType
Expand Down Expand Up @@ -5228,11 +5234,6 @@
AnnounceOTAProvider:
providerNodeID: providerNodeId
vendorID: vendorId
event fields:
Switch:
MultiPressComplete:
previousPosition: newPosition
command fields:
Groups:
AddGroup:
groupID: groupId
Expand All @@ -5248,3 +5249,10 @@
groupID: groupId
ViewGroupResponse:
groupID: groupId
OnOff:
OffWithEffect:
effectIdentifier: effectId
event fields:
Switch:
MultiPressComplete:
previousPosition: newPosition
3 changes: 2 additions & 1 deletion 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.

4 changes: 2 additions & 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.

21 changes: 17 additions & 4 deletions src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.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.

Loading

0 comments on commit 0daaa78

Please sign in to comment.