Skip to content

Commit

Permalink
Align naming in Color Control cluster XML with the spec. (#24388)
Browse files Browse the repository at this point in the history
* Align naming in Color Control cluster XML with the spec.

* Regenerate generated code.

* Address review comment: undo changes that introduced spaces and slashes in names.

Instead this should be fixed on the spec side, which is tracked in
https://github.com/CHIP-Specifications/connectedhomeip-spec/issues/6174

* Regenerate generated code.
  • Loading branch information
bzbarsky-apple authored and pull[bot] committed Nov 16, 2023
1 parent f21a879 commit 8278c1d
Show file tree
Hide file tree
Showing 29 changed files with 115 additions and 82 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2975,7 +2975,7 @@ server cluster ColorControl = 768 {
}

request struct MoveToColorTemperatureRequest {
INT16U colorTemperature = 0;
INT16U colorTemperatureMireds = 0;
INT16U transitionTime = 1;
BITMAP8 optionsMask = 2;
BITMAP8 optionsOverride = 3;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -453,10 +453,10 @@ void ProcessColorControlUnicastBindingCommand(BindingCommandData * data, const E
break;

case Clusters::ColorControl::Commands::MoveToColorTemperature::Id:
moveToColorTemperatureCommand.colorTemperature = static_cast<uint16_t>(data->args[0]);
moveToColorTemperatureCommand.transitionTime = static_cast<uint16_t>(data->args[1]);
moveToColorTemperatureCommand.optionsMask = static_cast<uint8_t>(data->args[2]);
moveToColorTemperatureCommand.optionsOverride = static_cast<uint8_t>(data->args[3]);
moveToColorTemperatureCommand.colorTemperatureMireds = static_cast<uint16_t>(data->args[0]);
moveToColorTemperatureCommand.transitionTime = static_cast<uint16_t>(data->args[1]);
moveToColorTemperatureCommand.optionsMask = static_cast<uint8_t>(data->args[2]);
moveToColorTemperatureCommand.optionsOverride = static_cast<uint8_t>(data->args[3]);
Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote,
moveToColorTemperatureCommand, onSuccess, onFailure);
break;
Expand Down Expand Up @@ -658,10 +658,10 @@ void ProcessColorControlGroupBindingCommand(BindingCommandData * data, const Emb
break;

case Clusters::ColorControl::Commands::MoveToColorTemperature::Id:
moveToColorTemperatureCommand.colorTemperature = static_cast<uint16_t>(data->args[0]);
moveToColorTemperatureCommand.transitionTime = static_cast<uint16_t>(data->args[1]);
moveToColorTemperatureCommand.optionsMask = static_cast<uint8_t>(data->args[2]);
moveToColorTemperatureCommand.optionsOverride = static_cast<uint8_t>(data->args[3]);
moveToColorTemperatureCommand.colorTemperatureMireds = static_cast<uint16_t>(data->args[0]);
moveToColorTemperatureCommand.transitionTime = static_cast<uint16_t>(data->args[1]);
moveToColorTemperatureCommand.optionsMask = static_cast<uint8_t>(data->args[2]);
moveToColorTemperatureCommand.optionsOverride = static_cast<uint8_t>(data->args[3]);
Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, moveToColorTemperatureCommand);
break;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1283,7 +1283,7 @@ server cluster ColorControl = 768 {
}

request struct MoveToColorTemperatureRequest {
INT16U colorTemperature = 0;
INT16U colorTemperatureMireds = 0;
INT16U transitionTime = 1;
BITMAP8 optionsMask = 2;
BITMAP8 optionsOverride = 3;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1349,7 +1349,7 @@ server cluster ColorControl = 768 {
}

request struct MoveToColorTemperatureRequest {
INT16U colorTemperature = 0;
INT16U colorTemperatureMireds = 0;
INT16U transitionTime = 1;
BITMAP8 optionsMask = 2;
BITMAP8 optionsOverride = 3;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1658,7 +1658,7 @@ client cluster ColorControl = 768 {
}

request struct MoveToColorTemperatureRequest {
INT16U colorTemperature = 0;
INT16U colorTemperatureMireds = 0;
INT16U transitionTime = 1;
BITMAP8 optionsMask = 2;
BITMAP8 optionsOverride = 3;
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 @@ -1610,7 +1610,7 @@ server cluster ColorControl = 768 {
}

request struct MoveToColorTemperatureRequest {
INT16U colorTemperature = 0;
INT16U colorTemperatureMireds = 0;
INT16U transitionTime = 1;
BITMAP8 optionsMask = 2;
BITMAP8 optionsOverride = 3;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2270,7 +2270,7 @@ bool ColorControlServer::moveColorTempCommand(const app::ConcreteCommandPath & c
bool ColorControlServer::moveToColorTempCommand(const app::ConcreteCommandPath & commandPath,
const Commands::MoveToColorTemperature::DecodableType & commandData)
{
uint16_t colorTemperature = commandData.colorTemperature;
uint16_t colorTemperature = commandData.colorTemperatureMireds;
uint16_t transitionTime = commandData.transitionTime;
uint8_t optionsMask = commandData.optionsMask;
uint8_t optionsOverride = commandData.optionsOverride;
Expand Down
4 changes: 2 additions & 2 deletions src/app/tests/suites/certification/Test_TC_CC_6_1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ tests:
command: "MoveToColorTemperature"
arguments:
values:
- name: "colorTemperature"
- name: "ColorTemperatureMireds"
value: 310
- name: "TransitionTime"
value: 0
Expand All @@ -108,7 +108,7 @@ tests:
command: "MoveToColorTemperature"
arguments:
values:
- name: "colorTemperature"
- name: "ColorTemperatureMireds"
value: 250
- name: "TransitionTime"
value: 300
Expand Down
2 changes: 1 addition & 1 deletion src/app/tests/suites/certification/Test_TC_CC_6_2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ tests:
command: "MoveToColorTemperature"
arguments:
values:
- name: "colorTemperature"
- name: "ColorTemperatureMireds"
value:
( ColorTempPhysicalMinMiredsValue +
ColorTempPhysicalMaxMiredsValue ) / 2
Expand Down
2 changes: 1 addition & 1 deletion src/app/tests/suites/certification/Test_TC_CC_6_3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ tests:
command: "MoveToColorTemperature"
arguments:
values:
- name: "colorTemperature"
- name: "ColorTemperatureMireds"
value:
( ColorTempPhysicalMinMiredsValue +
ColorTempPhysicalMaxMiredsValue ) / 2
Expand Down
2 changes: 1 addition & 1 deletion src/app/tests/suites/certification/Test_TC_CC_8_1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ tests:
command: "MoveToColorTemperature"
arguments:
values:
- name: "colorTemperature"
- name: "ColorTemperatureMireds"
value:
( ColorTempPhysicalMinMireds + ColorTempPhysicalMaxMireds )
/ 2
Expand Down
2 changes: 1 addition & 1 deletion src/app/zap-templates/zcl/data-model/silabs/ha.xml
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ limitations under the License.
<description>
Move to a specific color temperature.
</description>
<arg name="ColorTemperature" type="INT16U"/>
<arg name="ColorTemperatureMireds" type="INT16U"/>
<arg name="TransitionTime" type="INT16U"/>
<arg name="OptionsMask" type="BITMAP8"/>
<arg name="OptionsOverride" type="BITMAP8"/>
Expand Down
4 changes: 2 additions & 2 deletions src/app/zap-templates/zcl/data-model/silabs/types.xml
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ limitations under the License.
</enum>
<enum name="HueMoveMode" type="ENUM8">
<cluster code="0x0300"/>
<item name="stop" value="0x0"/>
<item name="Stop" value="0x0"/>
<item name="Up" value="0x1"/>
<item name="Down" value="0x3"/>
</enum>
Expand All @@ -227,7 +227,7 @@ limitations under the License.
</enum>
<enum name="SaturationMoveMode" type="ENUM8">
<cluster code="0x0300"/>
<item name="stop" value="0x0"/>
<item name="Stop" value="0x0"/>
<item name="Up" value="0x1"/>
<item name="Down" value="0x3"/>
</enum>
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 @@ -3305,7 +3305,7 @@ client cluster ColorControl = 768 {
}

request struct MoveToColorTemperatureRequest {
INT16U colorTemperature = 0;
INT16U colorTemperatureMireds = 0;
INT16U transitionTime = 1;
BITMAP8 optionsMask = 2;
BITMAP8 optionsOverride = 3;
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.

9 changes: 9 additions & 0 deletions src/darwin/Framework/CHIP/templates/availability.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5021,6 +5021,9 @@
- userUniqueID
GetUserResponse:
- userUniqueID
ColorControl:
MoveToColorTemperature:
- colorTemperatureMireds
structs:
OTASoftwareUpdateRequestor:
- ProviderLocation
Expand Down Expand Up @@ -5622,6 +5625,9 @@
- userUniqueId
GetUserResponse:
- userUniqueId
ColorControl:
MoveToColorTemperature:
- colorTemperature
structs:
Descriptor:
- DeviceType
Expand Down Expand Up @@ -5875,6 +5881,9 @@
userUniqueID: userUniqueId
GetUserResponse:
userUniqueID: userUniqueId
ColorControl:
MoveToColorTemperature:
colorTemperatureMireds: colorTemperature
structs:
AccessControl:
AccessControlEntryStruct: AccessControlEntry
Expand Down
2 changes: 1 addition & 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.

2 changes: 1 addition & 1 deletion 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 8278c1d

Please sign in to comment.