From 8278c1df1765c94ef0fab7fcdc1c70d74c9fcbf2 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 19 Jan 2023 09:15:19 -0500 Subject: [PATCH] Align naming in Color Control cluster XML with the spec. (#24388) * 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. --- .../all-clusters-app.matter | 2 +- .../ameba/main/include/ColorControlCommands.h | 16 +++---- ...de_colortemperaturelight_hbUnzYVeyn.matter | 2 +- ...tnode_extendedcolorlight_8lcaaYJVAa.matter | 2 +- .../light-switch-app.matter | 2 +- .../lighting-common/lighting-app.matter | 2 +- .../color-control-server.cpp | 2 +- .../suites/certification/Test_TC_CC_6_1.yaml | 4 +- .../suites/certification/Test_TC_CC_6_2.yaml | 2 +- .../suites/certification/Test_TC_CC_6_3.yaml | 2 +- .../suites/certification/Test_TC_CC_8_1.yaml | 2 +- .../zcl/data-model/silabs/ha.xml | 2 +- .../zcl/data-model/silabs/types.xml | 4 +- .../data_model/controller-clusters.matter | 2 +- .../chip/devicecontroller/ChipClusters.java | 10 ++--- .../devicecontroller/ClusterInfoMapping.java | 10 +++-- .../python/chip/clusters/CHIPClusters.py | 2 +- .../python/chip/clusters/Objects.py | 4 +- .../CHIP/templates/availability.yaml | 9 ++++ .../CHIP/zap-generated/MTRBaseClusters.mm | 2 +- .../CHIP/zap-generated/MTRClusters.mm | 2 +- .../zap-generated/MTRCommandPayloadsObjc.h | 8 +++- .../zap-generated/MTRCommandPayloadsObjc.mm | 21 ++++++++-- .../zap-generated/cluster-objects.cpp | 7 ++-- .../zap-generated/cluster-objects.h | 24 +++++------ .../zap-generated/cluster/Commands.h | 2 +- .../chip-tool/zap-generated/test/Commands.h | 42 ++++++++++--------- .../zap-generated/cluster/Commands.h | 4 +- .../zap-generated/test/Commands.h | 4 +- 29 files changed, 115 insertions(+), 82 deletions(-) diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index b9240eef795af3..5360be9589d7c4 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -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; diff --git a/examples/all-clusters-app/ameba/main/include/ColorControlCommands.h b/examples/all-clusters-app/ameba/main/include/ColorControlCommands.h index f4514470b3e630..00e36e434160b6 100644 --- a/examples/all-clusters-app/ameba/main/include/ColorControlCommands.h +++ b/examples/all-clusters-app/ameba/main/include/ColorControlCommands.h @@ -453,10 +453,10 @@ void ProcessColorControlUnicastBindingCommand(BindingCommandData * data, const E break; case Clusters::ColorControl::Commands::MoveToColorTemperature::Id: - moveToColorTemperatureCommand.colorTemperature = static_cast(data->args[0]); - moveToColorTemperatureCommand.transitionTime = static_cast(data->args[1]); - moveToColorTemperatureCommand.optionsMask = static_cast(data->args[2]); - moveToColorTemperatureCommand.optionsOverride = static_cast(data->args[3]); + moveToColorTemperatureCommand.colorTemperatureMireds = static_cast(data->args[0]); + moveToColorTemperatureCommand.transitionTime = static_cast(data->args[1]); + moveToColorTemperatureCommand.optionsMask = static_cast(data->args[2]); + moveToColorTemperatureCommand.optionsOverride = static_cast(data->args[3]); Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote, moveToColorTemperatureCommand, onSuccess, onFailure); break; @@ -658,10 +658,10 @@ void ProcessColorControlGroupBindingCommand(BindingCommandData * data, const Emb break; case Clusters::ColorControl::Commands::MoveToColorTemperature::Id: - moveToColorTemperatureCommand.colorTemperature = static_cast(data->args[0]); - moveToColorTemperatureCommand.transitionTime = static_cast(data->args[1]); - moveToColorTemperatureCommand.optionsMask = static_cast(data->args[2]); - moveToColorTemperatureCommand.optionsOverride = static_cast(data->args[3]); + moveToColorTemperatureCommand.colorTemperatureMireds = static_cast(data->args[0]); + moveToColorTemperatureCommand.transitionTime = static_cast(data->args[1]); + moveToColorTemperatureCommand.optionsMask = static_cast(data->args[2]); + moveToColorTemperatureCommand.optionsOverride = static_cast(data->args[3]); Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, moveToColorTemperatureCommand); break; diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter index af4d6872c482b2..a73febd35b22ab 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter @@ -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; diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter index f4a3f69af804d0..29a4b8ca37a86c 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter @@ -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; diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.matter b/examples/light-switch-app/light-switch-common/light-switch-app.matter index 2d3a13fbb623e4..5809b1a6b1ca41 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.matter +++ b/examples/light-switch-app/light-switch-common/light-switch-app.matter @@ -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; diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index e63ea9858de389..08d65c1210d1bd 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -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; diff --git a/src/app/clusters/color-control-server/color-control-server.cpp b/src/app/clusters/color-control-server/color-control-server.cpp index 8d6230e6ede743..593fcb64ffaee5 100644 --- a/src/app/clusters/color-control-server/color-control-server.cpp +++ b/src/app/clusters/color-control-server/color-control-server.cpp @@ -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; diff --git a/src/app/tests/suites/certification/Test_TC_CC_6_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_6_1.yaml index 88cc331670d47e..d91f086370c777 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_6_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_6_1.yaml @@ -84,7 +84,7 @@ tests: command: "MoveToColorTemperature" arguments: values: - - name: "colorTemperature" + - name: "ColorTemperatureMireds" value: 310 - name: "TransitionTime" value: 0 @@ -108,7 +108,7 @@ tests: command: "MoveToColorTemperature" arguments: values: - - name: "colorTemperature" + - name: "ColorTemperatureMireds" value: 250 - name: "TransitionTime" value: 300 diff --git a/src/app/tests/suites/certification/Test_TC_CC_6_2.yaml b/src/app/tests/suites/certification/Test_TC_CC_6_2.yaml index eb83f80c070824..0fb63d95dbf7d8 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_6_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_6_2.yaml @@ -84,7 +84,7 @@ tests: command: "MoveToColorTemperature" arguments: values: - - name: "colorTemperature" + - name: "ColorTemperatureMireds" value: ( ColorTempPhysicalMinMiredsValue + ColorTempPhysicalMaxMiredsValue ) / 2 diff --git a/src/app/tests/suites/certification/Test_TC_CC_6_3.yaml b/src/app/tests/suites/certification/Test_TC_CC_6_3.yaml index 2b069441c5ba96..d4706f17f7542f 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_6_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_6_3.yaml @@ -84,7 +84,7 @@ tests: command: "MoveToColorTemperature" arguments: values: - - name: "colorTemperature" + - name: "ColorTemperatureMireds" value: ( ColorTempPhysicalMinMiredsValue + ColorTempPhysicalMaxMiredsValue ) / 2 diff --git a/src/app/tests/suites/certification/Test_TC_CC_8_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_8_1.yaml index 0b01f73d50320a..a677f82742c9be 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_8_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_8_1.yaml @@ -243,7 +243,7 @@ tests: command: "MoveToColorTemperature" arguments: values: - - name: "colorTemperature" + - name: "ColorTemperatureMireds" value: ( ColorTempPhysicalMinMireds + ColorTempPhysicalMaxMireds ) / 2 diff --git a/src/app/zap-templates/zcl/data-model/silabs/ha.xml b/src/app/zap-templates/zcl/data-model/silabs/ha.xml index e5e830a847337d..e85208e9a6d4e8 100644 --- a/src/app/zap-templates/zcl/data-model/silabs/ha.xml +++ b/src/app/zap-templates/zcl/data-model/silabs/ha.xml @@ -349,7 +349,7 @@ limitations under the License. Move to a specific color temperature. - + diff --git a/src/app/zap-templates/zcl/data-model/silabs/types.xml b/src/app/zap-templates/zcl/data-model/silabs/types.xml index c7e67ffe5d16ad..4293b31d489dd1 100644 --- a/src/app/zap-templates/zcl/data-model/silabs/types.xml +++ b/src/app/zap-templates/zcl/data-model/silabs/types.xml @@ -216,7 +216,7 @@ limitations under the License. - + @@ -227,7 +227,7 @@ limitations under the License. - + diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index afe6d2c6869191..803653bdcd569e 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -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; diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index 685a5dd2ccda85..845e3597365f0b 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -15632,14 +15632,14 @@ public void stepColor( public void moveToColorTemperature( DefaultClusterCallback callback, - Integer colorTemperature, + Integer colorTemperatureMireds, Integer transitionTime, Integer optionsMask, Integer optionsOverride) { moveToColorTemperature( chipClusterPtr, callback, - colorTemperature, + colorTemperatureMireds, transitionTime, optionsMask, optionsOverride, @@ -15648,7 +15648,7 @@ public void moveToColorTemperature( public void moveToColorTemperature( DefaultClusterCallback callback, - Integer colorTemperature, + Integer colorTemperatureMireds, Integer transitionTime, Integer optionsMask, Integer optionsOverride, @@ -15656,7 +15656,7 @@ public void moveToColorTemperature( moveToColorTemperature( chipClusterPtr, callback, - colorTemperature, + colorTemperatureMireds, transitionTime, optionsMask, optionsOverride, @@ -16043,7 +16043,7 @@ private native void stepColor( private native void moveToColorTemperature( long chipClusterPtr, DefaultClusterCallback Callback, - Integer colorTemperature, + Integer colorTemperatureMireds, Integer transitionTime, Integer optionsMask, Integer optionsOverride, diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java index ac8f462acbeaff..31dd1d8eef2dae 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java @@ -10842,10 +10842,12 @@ public Map> getCommandMap() { colorControlClusterInteractionInfoMap.put("stepColor", colorControlstepColorInteractionInfo); Map colorControlmoveToColorTemperatureCommandParams = new LinkedHashMap(); - CommandParameterInfo colorControlmoveToColorTemperaturecolorTemperatureCommandParameterInfo = - new CommandParameterInfo("colorTemperature", Integer.class, Integer.class); + CommandParameterInfo + colorControlmoveToColorTemperaturecolorTemperatureMiredsCommandParameterInfo = + new CommandParameterInfo("colorTemperatureMireds", Integer.class, Integer.class); colorControlmoveToColorTemperatureCommandParams.put( - "colorTemperature", colorControlmoveToColorTemperaturecolorTemperatureCommandParameterInfo); + "colorTemperatureMireds", + colorControlmoveToColorTemperaturecolorTemperatureMiredsCommandParameterInfo); CommandParameterInfo colorControlmoveToColorTemperaturetransitionTimeCommandParameterInfo = new CommandParameterInfo("transitionTime", Integer.class, Integer.class); @@ -10868,7 +10870,7 @@ public Map> getCommandMap() { ((ChipClusters.ColorControlCluster) cluster) .moveToColorTemperature( (DefaultClusterCallback) callback, - (Integer) commandArguments.get("colorTemperature"), + (Integer) commandArguments.get("colorTemperatureMireds"), (Integer) commandArguments.get("transitionTime"), (Integer) commandArguments.get("optionsMask"), (Integer) commandArguments.get("optionsOverride")); diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 037d72ce1eb9de..0154b9730c8257 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -4814,7 +4814,7 @@ class ChipClusters: "commandId": 0x0000000A, "commandName": "MoveToColorTemperature", "args": { - "colorTemperature": "int", + "colorTemperatureMireds": "int", "transitionTime": "int", "optionsMask": "int", "optionsOverride": "int", diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 6dd0c9ab982678..6107527a334060 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -19098,13 +19098,13 @@ class MoveToColorTemperature(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="colorTemperature", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="colorTemperatureMireds", Tag=0, Type=uint), ClusterObjectFieldDescriptor(Label="transitionTime", Tag=1, Type=uint), ClusterObjectFieldDescriptor(Label="optionsMask", Tag=2, Type=uint), ClusterObjectFieldDescriptor(Label="optionsOverride", Tag=3, Type=uint), ]) - colorTemperature: 'uint' = 0 + colorTemperatureMireds: 'uint' = 0 transitionTime: 'uint' = 0 optionsMask: 'uint' = 0 optionsOverride: 'uint' = 0 diff --git a/src/darwin/Framework/CHIP/templates/availability.yaml b/src/darwin/Framework/CHIP/templates/availability.yaml index dda61d2ad5efdc..1ea322864385f0 100644 --- a/src/darwin/Framework/CHIP/templates/availability.yaml +++ b/src/darwin/Framework/CHIP/templates/availability.yaml @@ -5021,6 +5021,9 @@ - userUniqueID GetUserResponse: - userUniqueID + ColorControl: + MoveToColorTemperature: + - colorTemperatureMireds structs: OTASoftwareUpdateRequestor: - ProviderLocation @@ -5622,6 +5625,9 @@ - userUniqueId GetUserResponse: - userUniqueId + ColorControl: + MoveToColorTemperature: + - colorTemperature structs: Descriptor: - DeviceType @@ -5875,6 +5881,9 @@ userUniqueID: userUniqueId GetUserResponse: userUniqueID: userUniqueId + ColorControl: + MoveToColorTemperature: + colorTemperatureMireds: colorTemperature structs: AccessControl: AccessControlEntryStruct: AccessControlEntry diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 66eacc15acbf73..40e42897be7eb8 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -67216,7 +67216,7 @@ - (void)moveToColorTemperatureWithParams:(MTRColorControlClusterMoveToColorTempe timedInvokeTimeoutMs.SetValue(params.timedInvokeTimeoutMs.unsignedShortValue); } } - request.colorTemperature = params.colorTemperature.unsignedShortValue; + request.colorTemperatureMireds = params.colorTemperatureMireds.unsignedShortValue; request.transitionTime = params.transitionTime.unsignedShortValue; request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index 8391f8b391bfe6..c5589bcdae0234 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -17773,7 +17773,7 @@ - (void)moveToColorTemperatureWithParams:(MTRColorControlClusterMoveToColorTempe if (timedInvokeTimeoutMsParam != nil) { timedInvokeTimeoutMs.SetValue(timedInvokeTimeoutMsParam.unsignedShortValue); } - request.colorTemperature = params.colorTemperature.unsignedShortValue; + request.colorTemperatureMireds = params.colorTemperatureMireds.unsignedShortValue; request.transitionTime = params.transitionTime.unsignedShortValue; request.optionsMask = params.optionsMask.unsignedCharValue; request.optionsOverride = params.optionsOverride.unsignedCharValue; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index e4ba36f787ae1e..31885d524ffdbe 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -4011,7 +4011,7 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRColorControlClusterMoveToColorTemperatureParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull colorTemperature API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull colorTemperatureMireds MTR_NEWLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nonnull transitionTime API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -4035,6 +4035,12 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; @end +@interface MTRColorControlClusterMoveToColorTemperatureParams (Deprecated) + +@property (nonatomic, copy) NSNumber * _Nonnull colorTemperature API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use colorTemperatureMireds"); +@end + API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRColorControlClusterEnhancedMoveToHueParams : NSObject diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index 2ecde9a646fc07..d897cf6be7ca78 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -5616,7 +5616,7 @@ - (instancetype)init { if (self = [super init]) { - _colorTemperature = @(0); + _colorTemperatureMireds = @(0); _transitionTime = @(0); @@ -5632,7 +5632,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRColorControlClusterMoveToColorTemperatureParams alloc] init]; - other.colorTemperature = self.colorTemperature; + other.colorTemperatureMireds = self.colorTemperatureMireds; other.transitionTime = self.transitionTime; other.optionsMask = self.optionsMask; other.optionsOverride = self.optionsOverride; @@ -5644,11 +5644,24 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { NSString * descriptionString = - [NSString stringWithFormat:@"<%@: colorTemperature:%@; transitionTime:%@; optionsMask:%@; optionsOverride:%@; >", - NSStringFromClass([self class]), _colorTemperature, _transitionTime, _optionsMask, _optionsOverride]; + [NSString stringWithFormat:@"<%@: colorTemperatureMireds:%@; transitionTime:%@; optionsMask:%@; optionsOverride:%@; >", + NSStringFromClass([self class]), _colorTemperatureMireds, _transitionTime, _optionsMask, _optionsOverride]; return descriptionString; } +@end + +@implementation MTRColorControlClusterMoveToColorTemperatureParams (Deprecated) + +- (void)setColorTemperature:(NSNumber * _Nonnull)colorTemperature +{ + self.colorTemperatureMireds = colorTemperature; +} + +- (NSNumber * _Nonnull)colorTemperature +{ + return self.colorTemperatureMireds; +} @end @implementation MTRColorControlClusterEnhancedMoveToHueParams - (instancetype)init diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index eaffc82c98ccd6..9f9e4f394f0fe4 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp @@ -14245,7 +14245,8 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kColorTemperature)), colorTemperature)); + ReturnErrorOnFailure( + DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kColorTemperatureMireds)), colorTemperatureMireds)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTransitionTime)), transitionTime)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsMask)), optionsMask)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kOptionsOverride)), optionsOverride)); @@ -14267,8 +14268,8 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } switch (TLV::TagNumFromTag(reader.GetTag())) { - case to_underlying(Fields::kColorTemperature): - ReturnErrorOnFailure(DataModel::Decode(reader, colorTemperature)); + case to_underlying(Fields::kColorTemperatureMireds): + ReturnErrorOnFailure(DataModel::Decode(reader, colorTemperatureMireds)); break; case to_underlying(Fields::kTransitionTime): ReturnErrorOnFailure(DataModel::Decode(reader, transitionTime)); diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h index 43d5fc6d34bfa8..6590c48c17a38c 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.h @@ -18307,10 +18307,10 @@ struct DecodableType namespace MoveToColorTemperature { enum class Fields { - kColorTemperature = 0, - kTransitionTime = 1, - kOptionsMask = 2, - kOptionsOverride = 3, + kColorTemperatureMireds = 0, + kTransitionTime = 1, + kOptionsMask = 2, + kOptionsOverride = 3, }; struct Type @@ -18320,10 +18320,10 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::MoveToColorTemperature::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - uint16_t colorTemperature = static_cast(0); - uint16_t transitionTime = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + uint16_t colorTemperatureMireds = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -18338,10 +18338,10 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::MoveToColorTemperature::Id; } static constexpr ClusterId GetClusterId() { return Clusters::ColorControl::Id; } - uint16_t colorTemperature = static_cast(0); - uint16_t transitionTime = static_cast(0); - uint8_t optionsMask = static_cast(0); - uint8_t optionsOverride = static_cast(0); + uint16_t colorTemperatureMireds = static_cast(0); + uint16_t transitionTime = static_cast(0); + uint8_t optionsMask = static_cast(0); + uint8_t optionsOverride = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace MoveToColorTemperature diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 714a7f24e1a55c..f4cbb7a92db5dc 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -5451,7 +5451,7 @@ class ColorControlMoveToColorTemperature : public ClusterCommand ColorControlMoveToColorTemperature(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("move-to-color-temperature", credsIssuerConfig) { - AddArgument("ColorTemperature", 0, UINT16_MAX, &mRequest.colorTemperature); + AddArgument("ColorTemperatureMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMireds); AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 68f0a27b578c48..2849648972b939 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -14215,10 +14215,10 @@ class Test_TC_CC_6_1Suite : public TestCommand VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C0a.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Type value; - value.colorTemperature = 310U; - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; + value.colorTemperatureMireds = 310U; + value.transitionTime = 0U; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColorTemperature::Id, value, chip::NullOptional @@ -14237,10 +14237,10 @@ class Test_TC_CC_6_1Suite : public TestCommand VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C0a.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Type value; - value.colorTemperature = 250U; - value.transitionTime = 300U; - value.optionsMask = 0U; - value.optionsOverride = 0U; + value.colorTemperatureMireds = 250U; + value.transitionTime = 300U; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColorTemperature::Id, value, chip::NullOptional @@ -14645,10 +14645,11 @@ class Test_TC_CC_6_2Suite : public TestCommand VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C0a.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Type value; - value.colorTemperature = static_cast((ColorTempPhysicalMinMiredsValue + ColorTempPhysicalMaxMiredsValue) / 2); - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; + value.colorTemperatureMireds = + static_cast((ColorTempPhysicalMinMiredsValue + ColorTempPhysicalMaxMiredsValue) / 2); + value.transitionTime = 0U; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColorTemperature::Id, value, chip::NullOptional @@ -15152,10 +15153,11 @@ class Test_TC_CC_6_3Suite : public TestCommand VerifyOrDo(!ShouldSkip("CC.S.F04 && CC.S.C0a.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Type value; - value.colorTemperature = static_cast((ColorTempPhysicalMinMiredsValue + ColorTempPhysicalMaxMiredsValue) / 2); - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; + value.colorTemperatureMireds = + static_cast((ColorTempPhysicalMinMiredsValue + ColorTempPhysicalMaxMiredsValue) / 2); + value.transitionTime = 0U; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColorTemperature::Id, value, chip::NullOptional @@ -17113,10 +17115,10 @@ class Test_TC_CC_8_1Suite : public TestCommand VerifyOrDo(!ShouldSkip("CC.S.C0a.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Type value; - value.colorTemperature = static_cast((ColorTempPhysicalMinMireds + ColorTempPhysicalMaxMireds) / 2); - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; + value.colorTemperatureMireds = static_cast((ColorTempPhysicalMinMireds + ColorTempPhysicalMaxMireds) / 2); + value.transitionTime = 0U; + value.optionsMask = 0U; + value.optionsOverride = 0U; return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToColorTemperature::Id, value, chip::NullOptional diff --git a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h index 37cf951894619a..82b58f558c753d 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -55896,7 +55896,7 @@ class ColorControlMoveToColorTemperature : public ClusterCommand { ColorControlMoveToColorTemperature() : ClusterCommand("move-to-color-temperature") { - AddArgument("ColorTemperature", 0, UINT16_MAX, &mRequest.colorTemperature); + AddArgument("ColorTemperatureMireds", 0, UINT16_MAX, &mRequest.colorTemperatureMireds); AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); AddArgument("OptionsMask", 0, UINT8_MAX, &mRequest.optionsMask); AddArgument("OptionsOverride", 0, UINT8_MAX, &mRequest.optionsOverride); @@ -55914,7 +55914,7 @@ class ColorControlMoveToColorTemperature : public ClusterCommand { __auto_type * params = [[MTRColorControlClusterMoveToColorTemperatureParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.colorTemperature = [NSNumber numberWithUnsignedShort:mRequest.colorTemperature]; + params.colorTemperatureMireds = [NSNumber numberWithUnsignedShort:mRequest.colorTemperatureMireds]; params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime]; params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask]; params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride]; diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index e95a4c214ff41e..33e3772b3d8ab6 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -17643,7 +17643,7 @@ class Test_TC_CC_6_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveToColorTemperatureParams alloc] init]; - params.colorTemperature = [NSNumber numberWithUnsignedShort:310U]; + params.colorTemperatureMireds = [NSNumber numberWithUnsignedShort:310U]; params.transitionTime = [NSNumber numberWithUnsignedShort:0U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U]; @@ -17678,7 +17678,7 @@ class Test_TC_CC_6_1 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); __auto_type * params = [[MTRColorControlClusterMoveToColorTemperatureParams alloc] init]; - params.colorTemperature = [NSNumber numberWithUnsignedShort:250U]; + params.colorTemperatureMireds = [NSNumber numberWithUnsignedShort:250U]; params.transitionTime = [NSNumber numberWithUnsignedShort:300U]; params.optionsMask = [NSNumber numberWithUnsignedChar:0U]; params.optionsOverride = [NSNumber numberWithUnsignedChar:0U];