From 40d210ca95058179619931984651d26ddbb7a66d Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 10 Nov 2021 12:26:50 -0500 Subject: [PATCH] Faster chip-tool builds. Uses simpler templates for command sending to improve build times. --- examples/chip-tool/BUILD.gn | 1 + .../commands/common/CommandInvoker.h | 166 ++ examples/chip-tool/templates/commands.zapt | 5 +- .../templates/partials/test_cluster.zapt | 10 +- .../chip-tool/templates/tests-commands.zapt | 1 + src/app/chip_data_model.gni | 1 - src/app/zap-templates/app-templates.json | 5 - src/controller/CHIPCluster.h | 17 +- .../Framework/CHIP.xcodeproj/project.pbxproj | 4 - .../zap-generated/CHIPClustersInvoke.cpp | 18 - .../zap-generated/CHIPClustersInvoke.cpp | 18 - .../zap-generated/cluster/Commands.h | 778 +++------- .../chip-tool/zap-generated/test/Commands.h | 1366 +++++++---------- .../zap-generated/CHIPClustersInvoke.cpp | 969 ------------ .../zap-generated/CHIPClustersInvoke.cpp | 54 - .../zap-generated/CHIPClustersInvoke.cpp | 18 - .../zap-generated/CHIPClustersInvoke.cpp | 18 - .../zap-generated/CHIPClustersInvoke.cpp | 72 - .../zap-generated/CHIPClustersInvoke.cpp | 54 - .../zap-generated/CHIPClustersInvoke.cpp | 109 -- .../zap-generated/CHIPClustersInvoke.cpp | 18 - .../zap-generated/CHIPClustersInvoke.cpp | 64 - .../zap-generated/CHIPClustersInvoke.cpp | 135 -- .../zap-generated/CHIPClustersInvoke.cpp | 18 - .../zap-generated/CHIPClustersInvoke.cpp | 18 - 25 files changed, 1034 insertions(+), 2903 deletions(-) create mode 100644 examples/chip-tool/commands/common/CommandInvoker.h delete mode 100644 zzz_generated/all-clusters-app/zap-generated/CHIPClustersInvoke.cpp delete mode 100644 zzz_generated/bridge-app/zap-generated/CHIPClustersInvoke.cpp delete mode 100644 zzz_generated/controller-clusters/zap-generated/CHIPClustersInvoke.cpp delete mode 100644 zzz_generated/lighting-app/zap-generated/CHIPClustersInvoke.cpp delete mode 100644 zzz_generated/lock-app/zap-generated/CHIPClustersInvoke.cpp delete mode 100644 zzz_generated/ota-provider-app/zap-generated/CHIPClustersInvoke.cpp delete mode 100644 zzz_generated/ota-requestor-app/zap-generated/CHIPClustersInvoke.cpp delete mode 100644 zzz_generated/pump-app/zap-generated/CHIPClustersInvoke.cpp delete mode 100644 zzz_generated/pump-controller-app/zap-generated/CHIPClustersInvoke.cpp delete mode 100644 zzz_generated/temperature-measurement-app/zap-generated/CHIPClustersInvoke.cpp delete mode 100644 zzz_generated/thermostat/zap-generated/CHIPClustersInvoke.cpp delete mode 100644 zzz_generated/tv-app/zap-generated/CHIPClustersInvoke.cpp delete mode 100644 zzz_generated/tv-casting-app/zap-generated/CHIPClustersInvoke.cpp delete mode 100644 zzz_generated/window-app/zap-generated/CHIPClustersInvoke.cpp diff --git a/examples/chip-tool/BUILD.gn b/examples/chip-tool/BUILD.gn index 67551c0617e951..ee8c9aad70b045 100644 --- a/examples/chip-tool/BUILD.gn +++ b/examples/chip-tool/BUILD.gn @@ -30,6 +30,7 @@ executable("chip-tool") { "commands/common/CHIPCommand.cpp", "commands/common/CHIPCommand.h", "commands/common/Command.cpp", + "commands/common/CommandInvoker.h", "commands/common/Commands.cpp", "commands/discover/DiscoverCommand.cpp", "commands/discover/DiscoverCommissionablesCommand.cpp", diff --git a/examples/chip-tool/commands/common/CommandInvoker.h b/examples/chip-tool/commands/common/CommandInvoker.h new file mode 100644 index 00000000000000..30613dfc54710f --- /dev/null +++ b/examples/chip-tool/commands/common/CommandInvoker.h @@ -0,0 +1,166 @@ +/* + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ + +#pragma once + +#include +#include +#include +#include +#include + +namespace chip { +namespace Controller { +namespace detail { +template +class ResponseReceiver : public app::CommandSender::Callback +{ +public: + using SuccessCallback = void (*)(void * context, const ResponseType & data); + using FailureCallback = void (*)(void * context, EmberAfStatus status); + + virtual ~ResponseReceiver() {} + +protected: + ResponseReceiver(void * aContext, SuccessCallback aOnSuccess, FailureCallback aOnError) : + mContext(aContext), mOnSuccess(aOnSuccess), mOnError(aOnError) + {} + + inline void OnResponse(app::CommandSender * aCommandSender, const app::ConcreteCommandPath & aPath, + const app::StatusIB & aStatus, TLV::TLVReader * aData) override; + + void OnError(const app::CommandSender * aCommandSender, const app::StatusIB & aStatus, CHIP_ERROR aError) override + { + mOnError(mContext, app::ToEmberAfStatus(aStatus.mStatus)); + } + + void OnDone(app::CommandSender * aCommandSender) override + { + Platform::Delete(aCommandSender); + Platform::Delete(this); + } + +private: + void * mContext; + SuccessCallback mOnSuccess; + FailureCallback mOnError; +}; + +template +class CommandInvoker final : public ResponseReceiver +{ + using Super = ResponseReceiver; + +public: + CommandInvoker(void * aContext, typename Super::SuccessCallback aOnSuccess, typename Super::FailureCallback aOnError) : + Super(aContext, aOnSuccess, aOnError) + {} + + /** + * Use of CommandInvoker looks as follows: + * + * auto invoker = CommandInvoker::Alloc(args); + * VerifyOrReturnError(invoker != nullptr, CHIP_ERROR_NO_MEMORY); + * ReturnErrorOnFailure(invoker->InvokeCommand(args)); + * invoker.release(); // The invoker will deallocate itself now. + */ + static auto Alloc(void * aContext, typename Super::SuccessCallback aOnSuccess, typename Super::FailureCallback aOnError) + { + return Platform::MakeUnique(aContext, aOnSuccess, aOnError); + } + + CHIP_ERROR InvokeCommand(DeviceProxy * aDevice, EndpointId aEndpoint, const RequestType & aRequestData) + { + app::CommandPathParams commandPath = { aEndpoint, 0, RequestType::GetClusterId(), RequestType::GetCommandId(), + (app::CommandPathFlags::kEndpointIdValid) }; + auto commandSender = Platform::MakeUnique(this, aDevice->GetExchangeManager()); + VerifyOrReturnError(commandSender != nullptr, CHIP_ERROR_NO_MEMORY); + + ReturnErrorOnFailure(commandSender->AddRequestData(commandPath, aRequestData)); + ReturnErrorOnFailure(commandSender->SendCommandRequest(aDevice->GetSecureSession().Value())); + commandSender.release(); + return CHIP_NO_ERROR; + } +}; + +template +void ResponseReceiver::OnResponse(app::CommandSender * aCommandSender, const app::ConcreteCommandPath & aPath, + const app::StatusIB & aStatus, TLV::TLVReader * aData) +{ + ResponseType response; + CHIP_ERROR err = CHIP_NO_ERROR; + + // + // We're expecting response data in this variant of OnResponse. Consequently, aReader should always be + // non-null. If it is, it means we received a success status code instead, which is not what was expected. + // + VerifyOrExit(aData != nullptr, err = CHIP_ERROR_SCHEMA_MISMATCH); + + // + // Validate that the data response we received matches what we expect in terms of its cluster and command IDs. + // + VerifyOrExit(aPath.mClusterId == ResponseType::GetClusterId() && aPath.mCommandId == ResponseType::GetCommandId(), + err = CHIP_ERROR_SCHEMA_MISMATCH); + + err = app::DataModel::Decode(*aData, response); + SuccessOrExit(err); + + mOnSuccess(mContext, response); + +exit: + if (err != CHIP_NO_ERROR) + { + mOnError(mContext, app::ToEmberAfStatus(Protocols::InteractionModel::Status::Failure)); + } +} + +template <> +inline void ResponseReceiver::OnResponse(app::CommandSender * aCommandSender, + const app::ConcreteCommandPath & aPath, + const app::StatusIB & aStatus, TLV::TLVReader * aData) +{ + // + // If we got a valid reader, it means we received response data that we were not expecting to receive. + // + if (aData != nullptr) + { + mOnError(mContext, app::ToEmberAfStatus(Protocols::InteractionModel::Status::Failure)); + return; + } + + app::DataModel::NullObjectType nullResp; + mOnSuccess(mContext, nullResp); +} + +} // namespace detail + +template +CHIP_ERROR InvokeCommand(DeviceProxy * aDevice, void * aContext, + typename detail::CommandInvoker::SuccessCallback aSuccessCallback, + typename detail::CommandInvoker::FailureCallback aFailureCallback, EndpointId aEndpoint, + const RequestType & aRequestData) +{ + auto invoker = detail::CommandInvoker::Alloc(aContext, aSuccessCallback, aFailureCallback); + VerifyOrReturnError(invoker != nullptr, CHIP_ERROR_NO_MEMORY); + ReturnErrorOnFailure(invoker->InvokeCommand(aDevice, aEndpoint, aRequestData)); + invoker.release(); + return CHIP_NO_ERROR; +} + +} // namespace Controller +} // namespace chip diff --git a/examples/chip-tool/templates/commands.zapt b/examples/chip-tool/templates/commands.zapt index 0ef29f39e91a3d..f20e584ccb24b0 100644 --- a/examples/chip-tool/templates/commands.zapt +++ b/examples/chip-tool/templates/commands.zapt @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -411,9 +412,7 @@ public: {{/if}} {{/chip_cluster_command_non_expanded_arguments}} - chip::Controller::{{asUpperCamelCase parent.name}}Cluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, {{#if hasSpecificResponse}}On{{asUpperCamelCase parent.name}}{{asUpperCamelCase response.name}}Success{{else}}OnDefaultSuccess{{/if}}, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, {{#if hasSpecificResponse}}On{{asUpperCamelCase parent.name}}{{asUpperCamelCase response.name}}Success{{else}}OnDefaultSuccess{{/if}}, OnDefaultFailure, endpointId, mRequest); } private: diff --git a/examples/chip-tool/templates/partials/test_cluster.zapt b/examples/chip-tool/templates/partials/test_cluster.zapt index 336db62dfdadf4..52176922bded08 100644 --- a/examples/chip-tool/templates/partials/test_cluster.zapt +++ b/examples/chip-tool/templates/partials/test_cluster.zapt @@ -137,9 +137,6 @@ class {{filename}}: public TestCommand CHIP_ERROR {{>testCommand}}() { - chip::Controller::{{asUpperCamelCase cluster}}ClusterTest cluster; - cluster.Associate(mDevice, {{endpoint}}); - {{#if isCommand}} using RequestType = chip::app::Clusters::{{asUpperCamelCase cluster}}::Commands::{{asUpperCamelCase command}}::Type; @@ -155,8 +152,13 @@ class {{filename}}: public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast<{{filename}} *>(context))->OnFailureResponse_{{index}}(status); }; - {{#if async}}ReturnErrorOnFailure({{else}}return {{/if}}cluster.InvokeCommand(request, this, success, failure){{#if async}}){{/if}}; + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, {{endpoint}}, request)); + {{#unless async}}return CHIP_NO_ERROR;{{/unless}} {{else}} + chip::Controller::{{asUpperCamelCase cluster}}ClusterTest cluster; + cluster.Associate(mDevice, {{endpoint}}); + {{#chip_tests_item_parameters}} {{zapTypeToEncodableClusterObjectType type ns=parent.cluster}} {{asLowerCamelCase name}}Argument; {{>commandValue ns=parent.cluster container=(concat (asLowerCamelCase name) "Argument") definedValue=definedValue}} diff --git a/examples/chip-tool/templates/tests-commands.zapt b/examples/chip-tool/templates/tests-commands.zapt index 4f950dbcd8f825..1d4d2fdc2babac 100644 --- a/examples/chip-tool/templates/tests-commands.zapt +++ b/examples/chip-tool/templates/tests-commands.zapt @@ -3,6 +3,7 @@ #pragma once #include +#include {{>test_cluster tests=(getTests)}} diff --git a/src/app/chip_data_model.gni b/src/app/chip_data_model.gni index ceaf3a8ee97cd9..96205d8b0ca96b 100644 --- a/src/app/chip_data_model.gni +++ b/src/app/chip_data_model.gni @@ -156,7 +156,6 @@ template("chip_data_model") { sources += [ "${invoker.zap_pregenerated_dir}/CHIPClusters.cpp", "${invoker.zap_pregenerated_dir}/CHIPClusters.h", - "${invoker.zap_pregenerated_dir}/CHIPClustersInvoke.cpp", "${invoker.zap_pregenerated_dir}/attribute-size.cpp", "${invoker.zap_pregenerated_dir}/callback-stub.cpp", ] diff --git a/src/app/zap-templates/app-templates.json b/src/app/zap-templates/app-templates.json index 123c2b3a3501be..c2520049e329dd 100644 --- a/src/app/zap-templates/app-templates.json +++ b/src/app/zap-templates/app-templates.json @@ -83,11 +83,6 @@ "path": "templates/app/CHIPClusters-src.zapt", "name": "C++ ZCL API", "output": "CHIPClusters.cpp" - }, - { - "path": "templates/app/CHIPClustersInvoke-src.zapt", - "name": "C++ ZCL Invoke API", - "output": "CHIPClustersInvoke.cpp" } ] } diff --git a/src/controller/CHIPCluster.h b/src/controller/CHIPCluster.h index 18305be5759735..16a0423669724b 100644 --- a/src/controller/CHIPCluster.h +++ b/src/controller/CHIPCluster.h @@ -65,7 +65,22 @@ class DLL_EXPORT ClusterBase template CHIP_ERROR InvokeCommand(const RequestDataT & requestData, void * context, CommandResponseSuccessCallback successCb, - CommandResponseFailureCallback failureCb); + CommandResponseFailureCallback failureCb) + { + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); + + auto onSuccessCb = [context, successCb](const app::ConcreteCommandPath & commandPath, const app::StatusIB & aStatus, + const typename RequestDataT::ResponseType & responseData) { + successCb(context, responseData); + }; + + auto onFailureCb = [context, failureCb](const app::StatusIB & aStatus, CHIP_ERROR aError) { + failureCb(context, app::ToEmberAfStatus(aStatus.mStatus)); + }; + + return InvokeCommandRequest(mDevice->GetExchangeManager(), mDevice->GetSecureSession().Value(), mEndpoint, requestData, + onSuccessCb, onFailureCb); + }; /** * Functions for writing attributes. We have lots of different diff --git a/src/darwin/Framework/CHIP.xcodeproj/project.pbxproj b/src/darwin/Framework/CHIP.xcodeproj/project.pbxproj index 7dbf95475f3b0e..e3415b970cc8fd 100644 --- a/src/darwin/Framework/CHIP.xcodeproj/project.pbxproj +++ b/src/darwin/Framework/CHIP.xcodeproj/project.pbxproj @@ -38,7 +38,6 @@ 1ED276E026C57CF000547A89 /* CHIPCallbackBridge.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1ED276DF26C57CF000547A89 /* CHIPCallbackBridge.mm */; }; 1ED276E226C5812A00547A89 /* CHIPCluster.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1ED276E126C5812A00547A89 /* CHIPCluster.mm */; }; 1ED276E426C5832500547A89 /* CHIPCluster.h in Headers */ = {isa = PBXBuildFile; fileRef = 1ED276E326C5832500547A89 /* CHIPCluster.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 1EF900A0273AC39C006A4018 /* CHIPClustersInvoke.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EF9009E273AC39C006A4018 /* CHIPClustersInvoke.cpp */; }; 2C1B027A2641DB4E00780EF1 /* CHIPOperationalCredentialsDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2C1B02782641DB4E00780EF1 /* CHIPOperationalCredentialsDelegate.mm */; }; 2C1B027B2641DB4E00780EF1 /* CHIPOperationalCredentialsDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 2C1B02792641DB4E00780EF1 /* CHIPOperationalCredentialsDelegate.h */; }; 2C222AD0255C620600E446B9 /* CHIPDevice.h in Headers */ = {isa = PBXBuildFile; fileRef = 2C222ACE255C620600E446B9 /* CHIPDevice.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -125,7 +124,6 @@ 1ED276DF26C57CF000547A89 /* CHIPCallbackBridge.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = CHIPCallbackBridge.mm; path = "zap-generated/CHIPCallbackBridge.mm"; sourceTree = ""; }; 1ED276E126C5812A00547A89 /* CHIPCluster.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CHIPCluster.mm; sourceTree = ""; }; 1ED276E326C5832500547A89 /* CHIPCluster.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHIPCluster.h; sourceTree = ""; }; - 1EF9009E273AC39C006A4018 /* CHIPClustersInvoke.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CHIPClustersInvoke.cpp; path = "../../../../zzz_generated/controller-clusters/zap-generated/CHIPClustersInvoke.cpp"; sourceTree = ""; }; 2C1B02782641DB4E00780EF1 /* CHIPOperationalCredentialsDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = CHIPOperationalCredentialsDelegate.mm; sourceTree = ""; }; 2C1B02792641DB4E00780EF1 /* CHIPOperationalCredentialsDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHIPOperationalCredentialsDelegate.h; sourceTree = ""; }; 2C222ACE255C620600E446B9 /* CHIPDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CHIPDevice.h; sourceTree = ""; }; @@ -224,7 +222,6 @@ 1EC4CE5825CC26AB00D7304F /* CHIPGeneratedFiles */ = { isa = PBXGroup; children = ( - 1EF9009E273AC39C006A4018 /* CHIPClustersInvoke.cpp */, 1EC3238C271999E2002A8BF0 /* cluster-objects.cpp */, 1E16A8F926B9835600683C53 /* CHIPTestClustersObjc.h */, 1E16A8FA26B9835700683C53 /* CHIPTestClustersObjc.mm */, @@ -520,7 +517,6 @@ B2E0D7B6245B0B5C003C5B48 /* CHIPManualSetupPayloadParser.mm in Sources */, 1E85732826551A490050A4D9 /* attribute-table.cpp in Sources */, 1E85732626551A490050A4D9 /* attribute-storage.cpp in Sources */, - 1EF900A0273AC39C006A4018 /* CHIPClustersInvoke.cpp in Sources */, 1E85732C26551A490050A4D9 /* DataModelHandler.cpp in Sources */, 1E85733126551A490050A4D9 /* chip-message-send.cpp in Sources */, 1E85730F265519AE0050A4D9 /* attribute-size.cpp in Sources */, diff --git a/zzz_generated/all-clusters-app/zap-generated/CHIPClustersInvoke.cpp b/zzz_generated/all-clusters-app/zap-generated/CHIPClustersInvoke.cpp deleted file mode 100644 index 759d13c5028d26..00000000000000 --- a/zzz_generated/all-clusters-app/zap-generated/CHIPClustersInvoke.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP diff --git a/zzz_generated/bridge-app/zap-generated/CHIPClustersInvoke.cpp b/zzz_generated/bridge-app/zap-generated/CHIPClustersInvoke.cpp deleted file mode 100644 index 759d13c5028d26..00000000000000 --- a/zzz_generated/bridge-app/zap-generated/CHIPClustersInvoke.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index abe7a2e40c9e99..90114a874610e0 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include @@ -4012,9 +4013,8 @@ class AccountLoginGetSetupPIN : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000050E) command (0x00000000) on endpoint %" PRIu8, endpointId); - chip::Controller::AccountLoginCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnAccountLoginGetSetupPINResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnAccountLoginGetSetupPINResponseSuccess, OnDefaultFailure, endpointId, + mRequest); } private: @@ -4038,9 +4038,7 @@ class AccountLoginLogin : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000050E) command (0x00000001) on endpoint %" PRIu8, endpointId); - chip::Controller::AccountLoginCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -4109,9 +4107,7 @@ class AdministratorCommissioningOpenBasicCommissioningWindow : public ModelComma { ChipLogProgress(chipTool, "Sending cluster (0x0000003C) command (0x00000001) on endpoint %" PRIu8, endpointId); - chip::Controller::AdministratorCommissioningCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -4139,9 +4135,7 @@ class AdministratorCommissioningOpenCommissioningWindow : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000003C) command (0x00000000) on endpoint %" PRIu8, endpointId); - chip::Controller::AdministratorCommissioningCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -4160,9 +4154,7 @@ class AdministratorCommissioningRevokeCommissioning : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000003C) command (0x00000002) on endpoint %" PRIu8, endpointId); - chip::Controller::AdministratorCommissioningCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -4237,9 +4229,7 @@ class ApplicationBasicChangeStatus : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000050D) command (0x00000000) on endpoint %" PRIu8, endpointId); - chip::Controller::ApplicationBasicCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -4549,9 +4539,8 @@ class ApplicationLauncherLaunchApp : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000050C) command (0x00000000) on endpoint %" PRIu8, endpointId); - chip::Controller::ApplicationLauncherCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnApplicationLauncherLaunchAppResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnApplicationLauncherLaunchAppResponseSuccess, OnDefaultFailure, + endpointId, mRequest); } private: @@ -4725,9 +4714,7 @@ class AudioOutputRenameOutput : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000050B) command (0x00000001) on endpoint %" PRIu8, endpointId); - chip::Controller::AudioOutputCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -4750,9 +4737,7 @@ class AudioOutputSelectOutput : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000050B) command (0x00000000) on endpoint %" PRIu8, endpointId); - chip::Controller::AudioOutputCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -4893,9 +4878,7 @@ class BarrierControlBarrierControlGoToPercent : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000103) command (0x00000000) on endpoint %" PRIu8, endpointId); - chip::Controller::BarrierControlCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -4914,9 +4897,7 @@ class BarrierControlBarrierControlStop : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000103) command (0x00000001) on endpoint %" PRIu8, endpointId); - chip::Controller::BarrierControlCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -5133,9 +5114,7 @@ class BasicMfgSpecificPing : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000028) command (0x00000000) on endpoint %" PRIu8, endpointId); - chip::Controller::BasicCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -6235,9 +6214,7 @@ class BindingBind : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000F000) command (0x00000000) on endpoint %" PRIu8, endpointId); - chip::Controller::BindingCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -6263,9 +6240,7 @@ class BindingUnbind : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000F000) command (0x00000001) on endpoint %" PRIu8, endpointId); - chip::Controller::BindingCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -6477,9 +6452,7 @@ class BridgedActionsDisableAction : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x0000000A) on endpoint %" PRIu8, endpointId); - chip::Controller::BridgedActionsCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -6504,9 +6477,7 @@ class BridgedActionsDisableActionWithDuration : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x0000000B) on endpoint %" PRIu8, endpointId); - chip::Controller::BridgedActionsCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -6530,9 +6501,7 @@ class BridgedActionsEnableAction : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000008) on endpoint %" PRIu8, endpointId); - chip::Controller::BridgedActionsCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -6557,9 +6526,7 @@ class BridgedActionsEnableActionWithDuration : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000009) on endpoint %" PRIu8, endpointId); - chip::Controller::BridgedActionsCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -6583,9 +6550,7 @@ class BridgedActionsInstantAction : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000000) on endpoint %" PRIu8, endpointId); - chip::Controller::BridgedActionsCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -6610,9 +6575,7 @@ class BridgedActionsInstantActionWithTransition : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000001) on endpoint %" PRIu8, endpointId); - chip::Controller::BridgedActionsCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -6636,9 +6599,7 @@ class BridgedActionsPauseAction : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000005) on endpoint %" PRIu8, endpointId); - chip::Controller::BridgedActionsCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -6663,9 +6624,7 @@ class BridgedActionsPauseActionWithDuration : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000006) on endpoint %" PRIu8, endpointId); - chip::Controller::BridgedActionsCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -6689,9 +6648,7 @@ class BridgedActionsResumeAction : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000007) on endpoint %" PRIu8, endpointId); - chip::Controller::BridgedActionsCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -6715,9 +6672,7 @@ class BridgedActionsStartAction : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000002) on endpoint %" PRIu8, endpointId); - chip::Controller::BridgedActionsCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -6742,9 +6697,7 @@ class BridgedActionsStartActionWithDuration : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000003) on endpoint %" PRIu8, endpointId); - chip::Controller::BridgedActionsCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -6768,9 +6721,7 @@ class BridgedActionsStopAction : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000025) command (0x00000004) on endpoint %" PRIu8, endpointId); - chip::Controller::BridgedActionsCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -7587,9 +7538,7 @@ class ColorControlColorLoopSet : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000044) on endpoint %" PRIu8, endpointId); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -7616,9 +7565,7 @@ class ColorControlEnhancedMoveHue : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000041) on endpoint %" PRIu8, endpointId); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -7646,9 +7593,7 @@ class ColorControlEnhancedMoveToHue : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000040) on endpoint %" PRIu8, endpointId); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -7675,9 +7620,7 @@ class ColorControlEnhancedMoveToHueAndSaturation : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000043) on endpoint %" PRIu8, endpointId); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -7705,9 +7648,7 @@ class ColorControlEnhancedStepHue : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000042) on endpoint %" PRIu8, endpointId); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -7733,9 +7674,7 @@ class ColorControlMoveColor : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000008) on endpoint %" PRIu8, endpointId); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -7764,9 +7703,7 @@ class ColorControlMoveColorTemperature : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000004B) on endpoint %" PRIu8, endpointId); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -7793,9 +7730,7 @@ class ColorControlMoveHue : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000001) on endpoint %" PRIu8, endpointId); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -7822,9 +7757,7 @@ class ColorControlMoveSaturation : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000004) on endpoint %" PRIu8, endpointId); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -7851,9 +7784,7 @@ class ColorControlMoveToColor : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000007) on endpoint %" PRIu8, endpointId); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -7879,9 +7810,7 @@ class ColorControlMoveToColorTemperature : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000000A) on endpoint %" PRIu8, endpointId); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -7909,9 +7838,7 @@ class ColorControlMoveToHue : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000000) on endpoint %" PRIu8, endpointId); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -7938,9 +7865,7 @@ class ColorControlMoveToHueAndSaturation : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000006) on endpoint %" PRIu8, endpointId); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -7966,9 +7891,7 @@ class ColorControlMoveToSaturation : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000003) on endpoint %" PRIu8, endpointId); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -7995,9 +7918,7 @@ class ColorControlStepColor : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000009) on endpoint %" PRIu8, endpointId); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -8027,9 +7948,7 @@ class ColorControlStepColorTemperature : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x0000004C) on endpoint %" PRIu8, endpointId); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -8057,9 +7976,7 @@ class ColorControlStepHue : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000002) on endpoint %" PRIu8, endpointId); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -8087,9 +8004,7 @@ class ColorControlStepSaturation : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000005) on endpoint %" PRIu8, endpointId); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -8113,9 +8028,7 @@ class ColorControlStopMoveStep : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000300) command (0x00000047) on endpoint %" PRIu8, endpointId); - chip::Controller::ColorControlCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -10645,9 +10558,8 @@ class ContentLauncherLaunchContent : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000050A) command (0x00000000) on endpoint %" PRIu8, endpointId); - chip::Controller::ContentLauncherCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnContentLauncherLaunchContentResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnContentLauncherLaunchContentResponseSuccess, OnDefaultFailure, + endpointId, mRequest); } private: @@ -10671,9 +10583,8 @@ class ContentLauncherLaunchURL : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000050A) command (0x00000001) on endpoint %" PRIu8, endpointId); - chip::Controller::ContentLauncherCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnContentLauncherLaunchURLResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnContentLauncherLaunchURLResponseSuccess, OnDefaultFailure, + endpointId, mRequest); } private: @@ -10996,9 +10907,8 @@ class DiagnosticLogsRetrieveLogsRequest : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000032) command (0x00000000) on endpoint %" PRIu8, endpointId); - chip::Controller::DiagnosticLogsCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDiagnosticLogsRetrieveLogsResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDiagnosticLogsRetrieveLogsResponseSuccess, OnDefaultFailure, + endpointId, mRequest); } private: @@ -11052,9 +10962,8 @@ class DoorLockClearAllPins : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000008) on endpoint %" PRIu8, endpointId); - chip::Controller::DoorLockCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDoorLockClearAllPinsResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDoorLockClearAllPinsResponseSuccess, OnDefaultFailure, endpointId, + mRequest); } private: @@ -11073,9 +10982,8 @@ class DoorLockClearAllRfids : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000019) on endpoint %" PRIu8, endpointId); - chip::Controller::DoorLockCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDoorLockClearAllRfidsResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDoorLockClearAllRfidsResponseSuccess, OnDefaultFailure, endpointId, + mRequest); } private: @@ -11098,9 +11006,8 @@ class DoorLockClearHolidaySchedule : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000013) on endpoint %" PRIu8, endpointId); - chip::Controller::DoorLockCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDoorLockClearHolidayScheduleResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDoorLockClearHolidayScheduleResponseSuccess, OnDefaultFailure, + endpointId, mRequest); } private: @@ -11123,9 +11030,8 @@ class DoorLockClearPin : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000007) on endpoint %" PRIu8, endpointId); - chip::Controller::DoorLockCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDoorLockClearPinResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDoorLockClearPinResponseSuccess, OnDefaultFailure, endpointId, + mRequest); } private: @@ -11148,9 +11054,8 @@ class DoorLockClearRfid : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000018) on endpoint %" PRIu8, endpointId); - chip::Controller::DoorLockCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDoorLockClearRfidResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDoorLockClearRfidResponseSuccess, OnDefaultFailure, endpointId, + mRequest); } private: @@ -11174,9 +11079,8 @@ class DoorLockClearWeekdaySchedule : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000D) on endpoint %" PRIu8, endpointId); - chip::Controller::DoorLockCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDoorLockClearWeekdayScheduleResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDoorLockClearWeekdayScheduleResponseSuccess, OnDefaultFailure, + endpointId, mRequest); } private: @@ -11200,9 +11104,8 @@ class DoorLockClearYeardaySchedule : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000010) on endpoint %" PRIu8, endpointId); - chip::Controller::DoorLockCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDoorLockClearYeardayScheduleResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDoorLockClearYeardayScheduleResponseSuccess, OnDefaultFailure, + endpointId, mRequest); } private: @@ -11225,9 +11128,8 @@ class DoorLockGetHolidaySchedule : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000012) on endpoint %" PRIu8, endpointId); - chip::Controller::DoorLockCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDoorLockGetHolidayScheduleResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDoorLockGetHolidayScheduleResponseSuccess, OnDefaultFailure, + endpointId, mRequest); } private: @@ -11250,9 +11152,8 @@ class DoorLockGetLogRecord : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000004) on endpoint %" PRIu8, endpointId); - chip::Controller::DoorLockCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDoorLockGetLogRecordResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDoorLockGetLogRecordResponseSuccess, OnDefaultFailure, endpointId, + mRequest); } private: @@ -11275,9 +11176,8 @@ class DoorLockGetPin : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000006) on endpoint %" PRIu8, endpointId); - chip::Controller::DoorLockCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDoorLockGetPinResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDoorLockGetPinResponseSuccess, OnDefaultFailure, endpointId, + mRequest); } private: @@ -11300,9 +11200,8 @@ class DoorLockGetRfid : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000017) on endpoint %" PRIu8, endpointId); - chip::Controller::DoorLockCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDoorLockGetRfidResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDoorLockGetRfidResponseSuccess, OnDefaultFailure, endpointId, + mRequest); } private: @@ -11325,9 +11224,8 @@ class DoorLockGetUserType : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000015) on endpoint %" PRIu8, endpointId); - chip::Controller::DoorLockCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDoorLockGetUserTypeResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDoorLockGetUserTypeResponseSuccess, OnDefaultFailure, endpointId, + mRequest); } private: @@ -11351,9 +11249,8 @@ class DoorLockGetWeekdaySchedule : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000C) on endpoint %" PRIu8, endpointId); - chip::Controller::DoorLockCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDoorLockGetWeekdayScheduleResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDoorLockGetWeekdayScheduleResponseSuccess, OnDefaultFailure, + endpointId, mRequest); } private: @@ -11377,9 +11274,8 @@ class DoorLockGetYeardaySchedule : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000F) on endpoint %" PRIu8, endpointId); - chip::Controller::DoorLockCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDoorLockGetYeardayScheduleResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDoorLockGetYeardayScheduleResponseSuccess, OnDefaultFailure, + endpointId, mRequest); } private: @@ -11402,9 +11298,8 @@ class DoorLockLockDoor : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000000) on endpoint %" PRIu8, endpointId); - chip::Controller::DoorLockCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDoorLockLockDoorResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDoorLockLockDoorResponseSuccess, OnDefaultFailure, endpointId, + mRequest); } private: @@ -11430,9 +11325,8 @@ class DoorLockSetHolidaySchedule : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000011) on endpoint %" PRIu8, endpointId); - chip::Controller::DoorLockCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDoorLockSetHolidayScheduleResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDoorLockSetHolidayScheduleResponseSuccess, OnDefaultFailure, + endpointId, mRequest); } private: @@ -11460,9 +11354,8 @@ class DoorLockSetPin : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000005) on endpoint %" PRIu8, endpointId); - chip::Controller::DoorLockCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDoorLockSetPinResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDoorLockSetPinResponseSuccess, OnDefaultFailure, endpointId, + mRequest); } private: @@ -11490,9 +11383,8 @@ class DoorLockSetRfid : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000016) on endpoint %" PRIu8, endpointId); - chip::Controller::DoorLockCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDoorLockSetRfidResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDoorLockSetRfidResponseSuccess, OnDefaultFailure, endpointId, + mRequest); } private: @@ -11517,9 +11409,8 @@ class DoorLockSetUserType : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000014) on endpoint %" PRIu8, endpointId); - chip::Controller::DoorLockCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDoorLockSetUserTypeResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDoorLockSetUserTypeResponseSuccess, OnDefaultFailure, endpointId, + mRequest); } private: @@ -11550,9 +11441,8 @@ class DoorLockSetWeekdaySchedule : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000B) on endpoint %" PRIu8, endpointId); - chip::Controller::DoorLockCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDoorLockSetWeekdayScheduleResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDoorLockSetWeekdayScheduleResponseSuccess, OnDefaultFailure, + endpointId, mRequest); } private: @@ -11578,9 +11468,8 @@ class DoorLockSetYeardaySchedule : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x0000000E) on endpoint %" PRIu8, endpointId); - chip::Controller::DoorLockCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDoorLockSetYeardayScheduleResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDoorLockSetYeardayScheduleResponseSuccess, OnDefaultFailure, + endpointId, mRequest); } private: @@ -11603,9 +11492,8 @@ class DoorLockUnlockDoor : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000001) on endpoint %" PRIu8, endpointId); - chip::Controller::DoorLockCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDoorLockUnlockDoorResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDoorLockUnlockDoorResponseSuccess, OnDefaultFailure, endpointId, + mRequest); } private: @@ -11629,9 +11517,8 @@ class DoorLockUnlockWithTimeout : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000101) command (0x00000003) on endpoint %" PRIu8, endpointId); - chip::Controller::DoorLockCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDoorLockUnlockWithTimeoutResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDoorLockUnlockWithTimeoutResponseSuccess, OnDefaultFailure, + endpointId, mRequest); } private: @@ -12285,9 +12172,7 @@ class EthernetNetworkDiagnosticsResetCounts : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000037) command (0x00000000) on endpoint %" PRIu8, endpointId); - chip::Controller::EthernetNetworkDiagnosticsCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -12927,9 +12812,8 @@ class GeneralCommissioningArmFailSafe : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000030) command (0x00000000) on endpoint %" PRIu8, endpointId); - chip::Controller::GeneralCommissioningCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnGeneralCommissioningArmFailSafeResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnGeneralCommissioningArmFailSafeResponseSuccess, OnDefaultFailure, + endpointId, mRequest); } private: @@ -12948,9 +12832,8 @@ class GeneralCommissioningCommissioningComplete : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000030) command (0x00000004) on endpoint %" PRIu8, endpointId); - chip::Controller::GeneralCommissioningCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnGeneralCommissioningCommissioningCompleteResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnGeneralCommissioningCommissioningCompleteResponseSuccess, + OnDefaultFailure, endpointId, mRequest); } private: @@ -12977,9 +12860,8 @@ class GeneralCommissioningSetRegulatoryConfig : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000030) command (0x00000002) on endpoint %" PRIu8, endpointId); - chip::Controller::GeneralCommissioningCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnGeneralCommissioningSetRegulatoryConfigResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnGeneralCommissioningSetRegulatoryConfigResponseSuccess, + OnDefaultFailure, endpointId, mRequest); } private: @@ -13489,9 +13371,8 @@ class GroupsAddGroup : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000000) on endpoint %" PRIu8, endpointId); - chip::Controller::GroupsCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnGroupsAddGroupResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnGroupsAddGroupResponseSuccess, OnDefaultFailure, endpointId, + mRequest); } private: @@ -13515,9 +13396,7 @@ class GroupsAddGroupIfIdentifying : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000005) on endpoint %" PRIu8, endpointId); - chip::Controller::GroupsCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -13541,9 +13420,8 @@ class GroupsGetGroupMembership : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000002) on endpoint %" PRIu8, endpointId); - chip::Controller::GroupsCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnGroupsGetGroupMembershipResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnGroupsGetGroupMembershipResponseSuccess, OnDefaultFailure, + endpointId, mRequest); } private: @@ -13562,9 +13440,7 @@ class GroupsRemoveAllGroups : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000004) on endpoint %" PRIu8, endpointId); - chip::Controller::GroupsCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -13587,9 +13463,8 @@ class GroupsRemoveGroup : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000003) on endpoint %" PRIu8, endpointId); - chip::Controller::GroupsCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnGroupsRemoveGroupResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnGroupsRemoveGroupResponseSuccess, OnDefaultFailure, endpointId, + mRequest); } private: @@ -13612,9 +13487,8 @@ class GroupsViewGroup : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000004) command (0x00000001) on endpoint %" PRIu8, endpointId); - chip::Controller::GroupsCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnGroupsViewGroupResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnGroupsViewGroupResponseSuccess, OnDefaultFailure, endpointId, + mRequest); } private: @@ -13719,9 +13593,7 @@ class IdentifyIdentify : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000003) command (0x00000000) on endpoint %" PRIu8, endpointId); - chip::Controller::IdentifyCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -13740,9 +13612,8 @@ class IdentifyIdentifyQuery : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000003) command (0x00000001) on endpoint %" PRIu8, endpointId); - chip::Controller::IdentifyCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnIdentifyIdentifyQueryResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnIdentifyIdentifyQueryResponseSuccess, OnDefaultFailure, endpointId, + mRequest); } private: @@ -13768,9 +13639,7 @@ class IdentifyTriggerEffect : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000003) command (0x00000040) on endpoint %" PRIu8, endpointId); - chip::Controller::IdentifyCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -14209,9 +14078,8 @@ class KeypadInputSendKey : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000509) command (0x00000000) on endpoint %" PRIu8, endpointId); - chip::Controller::KeypadInputCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnKeypadInputSendKeyResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnKeypadInputSendKeyResponseSuccess, OnDefaultFailure, endpointId, + mRequest); } private: @@ -14303,9 +14171,7 @@ class LevelControlMove : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000001) on endpoint %" PRIu8, endpointId); - chip::Controller::LevelControlCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -14331,9 +14197,7 @@ class LevelControlMoveToLevel : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000000) on endpoint %" PRIu8, endpointId); - chip::Controller::LevelControlCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -14357,9 +14221,7 @@ class LevelControlMoveToLevelWithOnOff : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000004) on endpoint %" PRIu8, endpointId); - chip::Controller::LevelControlCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -14384,9 +14246,7 @@ class LevelControlMoveWithOnOff : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000005) on endpoint %" PRIu8, endpointId); - chip::Controller::LevelControlCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -14414,9 +14274,7 @@ class LevelControlStep : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000002) on endpoint %" PRIu8, endpointId); - chip::Controller::LevelControlCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -14442,9 +14300,7 @@ class LevelControlStepWithOnOff : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000006) on endpoint %" PRIu8, endpointId); - chip::Controller::LevelControlCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -14468,9 +14324,7 @@ class LevelControlStop : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000003) on endpoint %" PRIu8, endpointId); - chip::Controller::LevelControlCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -14489,9 +14343,7 @@ class LevelControlStopWithOnOff : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000008) command (0x00000007) on endpoint %" PRIu8, endpointId); - chip::Controller::LevelControlCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -15313,9 +15165,7 @@ class LowPowerSleep : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000508) command (0x00000000) on endpoint %" PRIu8, endpointId); - chip::Controller::LowPowerCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -15383,9 +15233,7 @@ class MediaInputHideInputStatus : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000002) on endpoint %" PRIu8, endpointId); - chip::Controller::MediaInputCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -15409,9 +15257,7 @@ class MediaInputRenameInput : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000003) on endpoint %" PRIu8, endpointId); - chip::Controller::MediaInputCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -15434,9 +15280,7 @@ class MediaInputSelectInput : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000000) on endpoint %" PRIu8, endpointId); - chip::Controller::MediaInputCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -15455,9 +15299,7 @@ class MediaInputShowInputStatus : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000507) command (0x00000001) on endpoint %" PRIu8, endpointId); - chip::Controller::MediaInputCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -15607,9 +15449,8 @@ class MediaPlaybackMediaFastForward : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000007) on endpoint %" PRIu8, endpointId); - chip::Controller::MediaPlaybackCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnMediaPlaybackMediaFastForwardResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnMediaPlaybackMediaFastForwardResponseSuccess, OnDefaultFailure, + endpointId, mRequest); } private: @@ -15628,9 +15469,8 @@ class MediaPlaybackMediaNext : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000005) on endpoint %" PRIu8, endpointId); - chip::Controller::MediaPlaybackCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnMediaPlaybackMediaNextResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnMediaPlaybackMediaNextResponseSuccess, OnDefaultFailure, endpointId, + mRequest); } private: @@ -15649,9 +15489,8 @@ class MediaPlaybackMediaPause : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000001) on endpoint %" PRIu8, endpointId); - chip::Controller::MediaPlaybackCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnMediaPlaybackMediaPauseResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnMediaPlaybackMediaPauseResponseSuccess, OnDefaultFailure, endpointId, + mRequest); } private: @@ -15670,9 +15509,8 @@ class MediaPlaybackMediaPlay : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000000) on endpoint %" PRIu8, endpointId); - chip::Controller::MediaPlaybackCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnMediaPlaybackMediaPlayResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnMediaPlaybackMediaPlayResponseSuccess, OnDefaultFailure, endpointId, + mRequest); } private: @@ -15691,9 +15529,8 @@ class MediaPlaybackMediaPrevious : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000004) on endpoint %" PRIu8, endpointId); - chip::Controller::MediaPlaybackCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnMediaPlaybackMediaPreviousResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnMediaPlaybackMediaPreviousResponseSuccess, OnDefaultFailure, + endpointId, mRequest); } private: @@ -15712,9 +15549,8 @@ class MediaPlaybackMediaRewind : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000006) on endpoint %" PRIu8, endpointId); - chip::Controller::MediaPlaybackCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnMediaPlaybackMediaRewindResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnMediaPlaybackMediaRewindResponseSuccess, OnDefaultFailure, + endpointId, mRequest); } private: @@ -15737,9 +15573,8 @@ class MediaPlaybackMediaSeek : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x0000000A) on endpoint %" PRIu8, endpointId); - chip::Controller::MediaPlaybackCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnMediaPlaybackMediaSeekResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnMediaPlaybackMediaSeekResponseSuccess, OnDefaultFailure, endpointId, + mRequest); } private: @@ -15762,9 +15597,8 @@ class MediaPlaybackMediaSkipBackward : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000009) on endpoint %" PRIu8, endpointId); - chip::Controller::MediaPlaybackCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnMediaPlaybackMediaSkipBackwardResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnMediaPlaybackMediaSkipBackwardResponseSuccess, OnDefaultFailure, + endpointId, mRequest); } private: @@ -15787,9 +15621,8 @@ class MediaPlaybackMediaSkipForward : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000008) on endpoint %" PRIu8, endpointId); - chip::Controller::MediaPlaybackCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnMediaPlaybackMediaSkipForwardResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnMediaPlaybackMediaSkipForwardResponseSuccess, OnDefaultFailure, + endpointId, mRequest); } private: @@ -15808,9 +15641,8 @@ class MediaPlaybackMediaStartOver : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000003) on endpoint %" PRIu8, endpointId); - chip::Controller::MediaPlaybackCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnMediaPlaybackMediaStartOverResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnMediaPlaybackMediaStartOverResponseSuccess, OnDefaultFailure, + endpointId, mRequest); } private: @@ -15829,9 +15661,8 @@ class MediaPlaybackMediaStop : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000506) command (0x00000002) on endpoint %" PRIu8, endpointId); - chip::Controller::MediaPlaybackCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnMediaPlaybackMediaStopResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnMediaPlaybackMediaStopResponseSuccess, OnDefaultFailure, endpointId, + mRequest); } private: @@ -16175,9 +16006,7 @@ class ModeSelectChangeToMode : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000050) command (0x00000000) on endpoint %" PRIu8, endpointId); - chip::Controller::ModeSelectCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -16510,9 +16339,8 @@ class NetworkCommissioningAddThreadNetwork : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000006) on endpoint %" PRIu8, endpointId); - chip::Controller::NetworkCommissioningCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnNetworkCommissioningAddThreadNetworkResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnNetworkCommissioningAddThreadNetworkResponseSuccess, + OnDefaultFailure, endpointId, mRequest); } private: @@ -16538,9 +16366,8 @@ class NetworkCommissioningAddWiFiNetwork : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000002) on endpoint %" PRIu8, endpointId); - chip::Controller::NetworkCommissioningCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnNetworkCommissioningAddWiFiNetworkResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnNetworkCommissioningAddWiFiNetworkResponseSuccess, OnDefaultFailure, + endpointId, mRequest); } private: @@ -16565,9 +16392,8 @@ class NetworkCommissioningDisableNetwork : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x0000000E) on endpoint %" PRIu8, endpointId); - chip::Controller::NetworkCommissioningCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnNetworkCommissioningDisableNetworkResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnNetworkCommissioningDisableNetworkResponseSuccess, OnDefaultFailure, + endpointId, mRequest); } private: @@ -16592,9 +16418,8 @@ class NetworkCommissioningEnableNetwork : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x0000000C) on endpoint %" PRIu8, endpointId); - chip::Controller::NetworkCommissioningCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnNetworkCommissioningEnableNetworkResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnNetworkCommissioningEnableNetworkResponseSuccess, OnDefaultFailure, + endpointId, mRequest); } private: @@ -16619,9 +16444,8 @@ class NetworkCommissioningRemoveNetwork : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x0000000A) on endpoint %" PRIu8, endpointId); - chip::Controller::NetworkCommissioningCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnNetworkCommissioningRemoveNetworkResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnNetworkCommissioningRemoveNetworkResponseSuccess, OnDefaultFailure, + endpointId, mRequest); } private: @@ -16646,9 +16470,8 @@ class NetworkCommissioningScanNetworks : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000000) on endpoint %" PRIu8, endpointId); - chip::Controller::NetworkCommissioningCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnNetworkCommissioningScanNetworksResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnNetworkCommissioningScanNetworksResponseSuccess, OnDefaultFailure, + endpointId, mRequest); } private: @@ -16673,9 +16496,8 @@ class NetworkCommissioningUpdateThreadNetwork : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000008) on endpoint %" PRIu8, endpointId); - chip::Controller::NetworkCommissioningCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnNetworkCommissioningUpdateThreadNetworkResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnNetworkCommissioningUpdateThreadNetworkResponseSuccess, + OnDefaultFailure, endpointId, mRequest); } private: @@ -16701,9 +16523,8 @@ class NetworkCommissioningUpdateWiFiNetwork : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000031) command (0x00000004) on endpoint %" PRIu8, endpointId); - chip::Controller::NetworkCommissioningCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnNetworkCommissioningUpdateWiFiNetworkResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnNetworkCommissioningUpdateWiFiNetworkResponseSuccess, + OnDefaultFailure, endpointId, mRequest); } private: @@ -16807,9 +16628,8 @@ class OtaSoftwareUpdateProviderApplyUpdateRequest : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000029) command (0x00000001) on endpoint %" PRIu8, endpointId); - chip::Controller::OtaSoftwareUpdateProviderCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnOtaSoftwareUpdateProviderApplyUpdateResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnOtaSoftwareUpdateProviderApplyUpdateResponseSuccess, + OnDefaultFailure, endpointId, mRequest); } private: @@ -16833,9 +16653,7 @@ class OtaSoftwareUpdateProviderNotifyUpdateApplied : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000029) command (0x00000002) on endpoint %" PRIu8, endpointId); - chip::Controller::OtaSoftwareUpdateProviderCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -16865,9 +16683,8 @@ class OtaSoftwareUpdateProviderQueryImage : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000029) command (0x00000000) on endpoint %" PRIu8, endpointId); - chip::Controller::OtaSoftwareUpdateProviderCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnOtaSoftwareUpdateProviderQueryImageResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnOtaSoftwareUpdateProviderQueryImageResponseSuccess, OnDefaultFailure, + endpointId, mRequest); } private: @@ -16941,9 +16758,7 @@ class OtaSoftwareUpdateRequestorAnnounceOtaProvider : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000002A) command (0x00000000) on endpoint %" PRIu8, endpointId); - chip::Controller::OtaSoftwareUpdateRequestorCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -17318,9 +17133,7 @@ class OnOffOff : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000000) on endpoint %" PRIu8, endpointId); - chip::Controller::OnOffCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -17346,9 +17159,7 @@ class OnOffOffWithEffect : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000040) on endpoint %" PRIu8, endpointId); - chip::Controller::OnOffCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -17367,9 +17178,7 @@ class OnOffOn : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000001) on endpoint %" PRIu8, endpointId); - chip::Controller::OnOffCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -17388,9 +17197,7 @@ class OnOffOnWithRecallGlobalScene : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000041) on endpoint %" PRIu8, endpointId); - chip::Controller::OnOffCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -17416,9 +17223,7 @@ class OnOffOnWithTimedOff : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000042) on endpoint %" PRIu8, endpointId); - chip::Controller::OnOffCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -17437,9 +17242,7 @@ class OnOffToggle : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000006) command (0x00000002) on endpoint %" PRIu8, endpointId); - chip::Controller::OnOffCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -18024,9 +17827,8 @@ class OperationalCredentialsAddNOC : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000006) on endpoint %" PRIu8, endpointId); - chip::Controller::OperationalCredentialsCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnOperationalCredentialsNOCResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnOperationalCredentialsNOCResponseSuccess, OnDefaultFailure, + endpointId, mRequest); } private: @@ -18049,9 +17851,7 @@ class OperationalCredentialsAddTrustedRootCertificate : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x0000000B) on endpoint %" PRIu8, endpointId); - chip::Controller::OperationalCredentialsCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -18074,9 +17874,8 @@ class OperationalCredentialsAttestationRequest : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000000) on endpoint %" PRIu8, endpointId); - chip::Controller::OperationalCredentialsCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnOperationalCredentialsAttestationResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnOperationalCredentialsAttestationResponseSuccess, OnDefaultFailure, + endpointId, mRequest); } private: @@ -18099,9 +17898,8 @@ class OperationalCredentialsCertificateChainRequest : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000002) on endpoint %" PRIu8, endpointId); - chip::Controller::OperationalCredentialsCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnOperationalCredentialsCertificateChainResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnOperationalCredentialsCertificateChainResponseSuccess, + OnDefaultFailure, endpointId, mRequest); } private: @@ -18124,9 +17922,8 @@ class OperationalCredentialsOpCSRRequest : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000004) on endpoint %" PRIu8, endpointId); - chip::Controller::OperationalCredentialsCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnOperationalCredentialsOpCSRResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnOperationalCredentialsOpCSRResponseSuccess, OnDefaultFailure, + endpointId, mRequest); } private: @@ -18149,9 +17946,8 @@ class OperationalCredentialsRemoveFabric : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x0000000A) on endpoint %" PRIu8, endpointId); - chip::Controller::OperationalCredentialsCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnOperationalCredentialsNOCResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnOperationalCredentialsNOCResponseSuccess, OnDefaultFailure, + endpointId, mRequest); } private: @@ -18174,9 +17970,7 @@ class OperationalCredentialsRemoveTrustedRootCertificate : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x0000000C) on endpoint %" PRIu8, endpointId); - chip::Controller::OperationalCredentialsCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -18199,9 +17993,8 @@ class OperationalCredentialsUpdateFabricLabel : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000009) on endpoint %" PRIu8, endpointId); - chip::Controller::OperationalCredentialsCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnOperationalCredentialsNOCResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnOperationalCredentialsNOCResponseSuccess, OnDefaultFailure, + endpointId, mRequest); } private: @@ -18225,9 +18018,8 @@ class OperationalCredentialsUpdateNOC : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000003E) command (0x00000007) on endpoint %" PRIu8, endpointId); - chip::Controller::OperationalCredentialsCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnOperationalCredentialsNOCResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnOperationalCredentialsNOCResponseSuccess, OnDefaultFailure, + endpointId, mRequest); } private: @@ -20380,9 +20172,8 @@ class ScenesAddScene : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000000) on endpoint %" PRIu8, endpointId); - chip::Controller::ScenesCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnScenesAddSceneResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnScenesAddSceneResponseSuccess, OnDefaultFailure, endpointId, + mRequest); } private: @@ -20405,9 +20196,8 @@ class ScenesGetSceneMembership : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000006) on endpoint %" PRIu8, endpointId); - chip::Controller::ScenesCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnScenesGetSceneMembershipResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnScenesGetSceneMembershipResponseSuccess, OnDefaultFailure, + endpointId, mRequest); } private: @@ -20432,9 +20222,7 @@ class ScenesRecallScene : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000005) on endpoint %" PRIu8, endpointId); - chip::Controller::ScenesCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -20457,9 +20245,8 @@ class ScenesRemoveAllScenes : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000003) on endpoint %" PRIu8, endpointId); - chip::Controller::ScenesCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnScenesRemoveAllScenesResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnScenesRemoveAllScenesResponseSuccess, OnDefaultFailure, endpointId, + mRequest); } private: @@ -20483,9 +20270,8 @@ class ScenesRemoveScene : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000002) on endpoint %" PRIu8, endpointId); - chip::Controller::ScenesCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnScenesRemoveSceneResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnScenesRemoveSceneResponseSuccess, OnDefaultFailure, endpointId, + mRequest); } private: @@ -20509,9 +20295,8 @@ class ScenesStoreScene : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000004) on endpoint %" PRIu8, endpointId); - chip::Controller::ScenesCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnScenesStoreSceneResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnScenesStoreSceneResponseSuccess, OnDefaultFailure, endpointId, + mRequest); } private: @@ -20535,9 +20320,8 @@ class ScenesViewScene : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000005) command (0x00000001) on endpoint %" PRIu8, endpointId); - chip::Controller::ScenesCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnScenesViewSceneResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnScenesViewSceneResponseSuccess, OnDefaultFailure, endpointId, + mRequest); } private: @@ -20773,9 +20557,7 @@ class SoftwareDiagnosticsResetWatermarks : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000034) command (0x00000000) on endpoint %" PRIu8, endpointId); - chip::Controller::SoftwareDiagnosticsCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -21184,9 +20966,8 @@ class TvChannelChangeChannel : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000504) command (0x00000000) on endpoint %" PRIu8, endpointId); - chip::Controller::TvChannelCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnTvChannelChangeChannelResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnTvChannelChangeChannelResponseSuccess, OnDefaultFailure, endpointId, + mRequest); } private: @@ -21210,9 +20991,7 @@ class TvChannelChangeChannelByNumber : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000504) command (0x00000001) on endpoint %" PRIu8, endpointId); - chip::Controller::TvChannelCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -21235,9 +21014,7 @@ class TvChannelSkipChannel : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000504) command (0x00000002) on endpoint %" PRIu8, endpointId); - chip::Controller::TvChannelCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -21409,9 +21186,8 @@ class TargetNavigatorNavigateTarget : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000505) command (0x00000000) on endpoint %" PRIu8, endpointId); - chip::Controller::TargetNavigatorCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnTargetNavigatorNavigateTargetResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnTargetNavigatorNavigateTargetResponseSuccess, OnDefaultFailure, + endpointId, mRequest); } private: @@ -21833,9 +21609,7 @@ class TestClusterTest : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000050F) command (0x00000000) on endpoint %" PRIu8, endpointId); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -21859,9 +21633,8 @@ class TestClusterTestAddArguments : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000050F) command (0x00000004) on endpoint %" PRIu8, endpointId); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnTestClusterTestAddArgumentsResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnTestClusterTestAddArgumentsResponseSuccess, OnDefaultFailure, + endpointId, mRequest); } private: @@ -21885,9 +21658,8 @@ class TestClusterTestEnumsRequest : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000050F) command (0x0000000E) on endpoint %" PRIu8, endpointId); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnTestClusterTestEnumsResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnTestClusterTestEnumsResponseSuccess, OnDefaultFailure, endpointId, + mRequest); } private: @@ -21910,9 +21682,8 @@ class TestClusterTestListInt8UArgumentRequest : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000050F) command (0x0000000A) on endpoint %" PRIu8, endpointId); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnTestClusterBooleanResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnTestClusterBooleanResponseSuccess, OnDefaultFailure, endpointId, + mRequest); } private: @@ -21935,9 +21706,8 @@ class TestClusterTestListInt8UReverseRequest : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000050F) command (0x0000000D) on endpoint %" PRIu8, endpointId); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnTestClusterTestListInt8UReverseResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnTestClusterTestListInt8UReverseResponseSuccess, OnDefaultFailure, + endpointId, mRequest); } private: @@ -21960,9 +21730,8 @@ class TestClusterTestListStructArgumentRequest : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000050F) command (0x00000009) on endpoint %" PRIu8, endpointId); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnTestClusterBooleanResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnTestClusterBooleanResponseSuccess, OnDefaultFailure, endpointId, + mRequest); } private: @@ -21981,9 +21750,7 @@ class TestClusterTestNotHandled : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000050F) command (0x00000001) on endpoint %" PRIu8, endpointId); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -22006,9 +21773,8 @@ class TestClusterTestNullableOptionalRequest : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000050F) command (0x0000000F) on endpoint %" PRIu8, endpointId); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnTestClusterTestNullableOptionalResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnTestClusterTestNullableOptionalResponseSuccess, OnDefaultFailure, + endpointId, mRequest); } private: @@ -22027,9 +21793,8 @@ class TestClusterTestSpecific : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000050F) command (0x00000002) on endpoint %" PRIu8, endpointId); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnTestClusterTestSpecificResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnTestClusterTestSpecificResponseSuccess, OnDefaultFailure, endpointId, + mRequest); } private: @@ -22052,9 +21817,8 @@ class TestClusterTestStructArgumentRequest : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000050F) command (0x00000007) on endpoint %" PRIu8, endpointId); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnTestClusterBooleanResponseSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnTestClusterBooleanResponseSuccess, OnDefaultFailure, endpointId, + mRequest); } private: @@ -22073,9 +21837,7 @@ class TestClusterTestUnknownCommand : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x0000050F) command (0x00000003) on endpoint %" PRIu8, endpointId); - chip::Controller::TestClusterCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -23840,9 +23602,7 @@ class ThermostatClearWeeklySchedule : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000003) on endpoint %" PRIu8, endpointId); - chip::Controller::ThermostatCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -23861,9 +23621,7 @@ class ThermostatGetRelayStatusLog : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000004) on endpoint %" PRIu8, endpointId); - chip::Controller::ThermostatCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -23890,9 +23648,7 @@ class ThermostatGetWeeklySchedule : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000002) on endpoint %" PRIu8, endpointId); - chip::Controller::ThermostatCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -23922,9 +23678,7 @@ class ThermostatSetWeeklySchedule : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000001) on endpoint %" PRIu8, endpointId); - chip::Controller::ThermostatCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -23948,9 +23702,7 @@ class ThermostatSetpointRaiseLower : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000201) command (0x00000000) on endpoint %" PRIu8, endpointId); - chip::Controller::ThermostatCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -25285,9 +25037,7 @@ class ThreadNetworkDiagnosticsResetCounts : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000035) command (0x00000000) on endpoint %" PRIu8, endpointId); - chip::Controller::ThreadNetworkDiagnosticsCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -27588,9 +27338,7 @@ class WiFiNetworkDiagnosticsResetCounts : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000036) command (0x00000000) on endpoint %" PRIu8, endpointId); - chip::Controller::WiFiNetworkDiagnosticsCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -28120,9 +27868,7 @@ class WindowCoveringDownOrClose : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000001) on endpoint %" PRIu8, endpointId); - chip::Controller::WindowCoveringCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -28146,9 +27892,7 @@ class WindowCoveringGoToLiftPercentage : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000005) on endpoint %" PRIu8, endpointId); - chip::Controller::WindowCoveringCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -28171,9 +27915,7 @@ class WindowCoveringGoToLiftValue : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000004) on endpoint %" PRIu8, endpointId); - chip::Controller::WindowCoveringCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -28197,9 +27939,7 @@ class WindowCoveringGoToTiltPercentage : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000008) on endpoint %" PRIu8, endpointId); - chip::Controller::WindowCoveringCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -28222,9 +27962,7 @@ class WindowCoveringGoToTiltValue : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000007) on endpoint %" PRIu8, endpointId); - chip::Controller::WindowCoveringCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -28243,9 +27981,7 @@ class WindowCoveringStopMotion : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000002) on endpoint %" PRIu8, endpointId); - chip::Controller::WindowCoveringCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: @@ -28264,9 +28000,7 @@ class WindowCoveringUpOrOpen : public ModelCommand { ChipLogProgress(chipTool, "Sending cluster (0x00000102) command (0x00000000) on endpoint %" PRIu8, endpointId); - chip::Controller::WindowCoveringCluster cluster; - cluster.Associate(device, endpointId); - return cluster.InvokeCommand(mRequest, this, OnDefaultSuccess, OnDefaultFailure); + return chip::Controller::InvokeCommand(device, this, OnDefaultSuccess, OnDefaultFailure, endpointId, mRequest); } private: diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index f0b0a209ca674a..41da7d5badf535 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -19,6 +19,7 @@ #pragma once +#include #include class Test_TC_BI_1_1 : public TestCommand @@ -5750,9 +5751,6 @@ class Test_TC_CC_3_1 : public TestCommand CHIP_ERROR TestTurnOnLightForColorControlTests_0() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -5764,7 +5762,9 @@ class Test_TC_CC_3_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_0(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } @@ -5790,9 +5790,6 @@ class Test_TC_CC_3_1 : public TestCommand CHIP_ERROR TestMoveToHueShortestDistanceCommand_2() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::MoveToHue::Type; RequestType request; @@ -5809,7 +5806,9 @@ class Test_TC_CC_3_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_2(uint8_t status) { ThrowFailureResponse(); } @@ -5818,9 +5817,6 @@ class Test_TC_CC_3_1 : public TestCommand CHIP_ERROR TestMoveToHueLongestDistanceCommand_3() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::MoveToHue::Type; RequestType request; @@ -5837,7 +5833,9 @@ class Test_TC_CC_3_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_3(uint8_t status) { ThrowFailureResponse(); } @@ -5846,9 +5844,6 @@ class Test_TC_CC_3_1 : public TestCommand CHIP_ERROR TestMoveToHueUpCommand_4() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::MoveToHue::Type; RequestType request; @@ -5865,7 +5860,9 @@ class Test_TC_CC_3_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_4(uint8_t status) { ThrowFailureResponse(); } @@ -5874,9 +5871,6 @@ class Test_TC_CC_3_1 : public TestCommand CHIP_ERROR TestMoveToHueDownCommand_5() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::MoveToHue::Type; RequestType request; @@ -5893,7 +5887,9 @@ class Test_TC_CC_3_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_5(uint8_t status) { ThrowFailureResponse(); } @@ -5902,9 +5898,6 @@ class Test_TC_CC_3_1 : public TestCommand CHIP_ERROR TestTurnOffLightThatWeTurnedOn_6() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -5916,7 +5909,9 @@ class Test_TC_CC_3_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_6(uint8_t status) { ThrowFailureResponse(); } @@ -6042,9 +6037,6 @@ class Test_TC_CC_3_2 : public TestCommand CHIP_ERROR TestTurnOnLightForColorControlTests_0() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -6056,7 +6048,9 @@ class Test_TC_CC_3_2 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_0(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } @@ -6082,9 +6076,6 @@ class Test_TC_CC_3_2 : public TestCommand CHIP_ERROR TestMoveHueUpCommand_2() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::MoveHue::Type; RequestType request; @@ -6100,7 +6091,9 @@ class Test_TC_CC_3_2 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_2(uint8_t status) { ThrowFailureResponse(); } @@ -6109,9 +6102,6 @@ class Test_TC_CC_3_2 : public TestCommand CHIP_ERROR TestMoveHueStopCommand_3() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::MoveHue::Type; RequestType request; @@ -6127,7 +6117,9 @@ class Test_TC_CC_3_2 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_3(uint8_t status) { ThrowFailureResponse(); } @@ -6136,9 +6128,6 @@ class Test_TC_CC_3_2 : public TestCommand CHIP_ERROR TestMoveHueDownCommand_4() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::MoveHue::Type; RequestType request; @@ -6154,7 +6143,9 @@ class Test_TC_CC_3_2 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_4(uint8_t status) { ThrowFailureResponse(); } @@ -6163,9 +6154,6 @@ class Test_TC_CC_3_2 : public TestCommand CHIP_ERROR TestMoveHueStopCommand_5() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::MoveHue::Type; RequestType request; @@ -6181,7 +6169,9 @@ class Test_TC_CC_3_2 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_5(uint8_t status) { ThrowFailureResponse(); } @@ -6190,9 +6180,6 @@ class Test_TC_CC_3_2 : public TestCommand CHIP_ERROR TestTurnOffLightThatWeTurnedOn_6() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -6204,7 +6191,9 @@ class Test_TC_CC_3_2 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_6(uint8_t status) { ThrowFailureResponse(); } @@ -6322,9 +6311,6 @@ class Test_TC_CC_3_3 : public TestCommand CHIP_ERROR TestTurnOnLightForColorControlTests_0() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -6336,7 +6322,9 @@ class Test_TC_CC_3_3 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_0(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } @@ -6362,9 +6350,6 @@ class Test_TC_CC_3_3 : public TestCommand CHIP_ERROR TestStepHueUpCommand_2() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::StepHue::Type; RequestType request; @@ -6381,7 +6366,9 @@ class Test_TC_CC_3_3 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_2(uint8_t status) { ThrowFailureResponse(); } @@ -6390,9 +6377,6 @@ class Test_TC_CC_3_3 : public TestCommand CHIP_ERROR TestStepHueDownCommand_3() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::StepHue::Type; RequestType request; @@ -6409,7 +6393,9 @@ class Test_TC_CC_3_3 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_3(uint8_t status) { ThrowFailureResponse(); } @@ -6418,9 +6404,6 @@ class Test_TC_CC_3_3 : public TestCommand CHIP_ERROR TestTurnOffLightThatWeTurnedOn_4() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -6432,7 +6415,9 @@ class Test_TC_CC_3_3 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_4(uint8_t status) { ThrowFailureResponse(); } @@ -6546,9 +6531,6 @@ class Test_TC_CC_4_1 : public TestCommand CHIP_ERROR TestTurnOnLightForColorControlTests_0() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -6560,7 +6542,9 @@ class Test_TC_CC_4_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_0(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } @@ -6586,9 +6570,6 @@ class Test_TC_CC_4_1 : public TestCommand CHIP_ERROR TestMoveToSaturationCommand_2() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::MoveToSaturation::Type; RequestType request; @@ -6604,7 +6585,9 @@ class Test_TC_CC_4_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_2(uint8_t status) { ThrowFailureResponse(); } @@ -6613,9 +6596,6 @@ class Test_TC_CC_4_1 : public TestCommand CHIP_ERROR TestTurnOffLightThatWeTurnedOn_3() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -6627,7 +6607,9 @@ class Test_TC_CC_4_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_3(uint8_t status) { ThrowFailureResponse(); } @@ -6745,9 +6727,6 @@ class Test_TC_CC_4_2 : public TestCommand CHIP_ERROR TestTurnOnLightForColorControlTests_0() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -6759,7 +6738,9 @@ class Test_TC_CC_4_2 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_0(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } @@ -6785,9 +6766,6 @@ class Test_TC_CC_4_2 : public TestCommand CHIP_ERROR TestMoveSaturationUpCommand_2() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type; RequestType request; @@ -6803,7 +6781,9 @@ class Test_TC_CC_4_2 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_2(uint8_t status) { ThrowFailureResponse(); } @@ -6812,9 +6792,6 @@ class Test_TC_CC_4_2 : public TestCommand CHIP_ERROR TestMoveSaturationDownCommand_3() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type; RequestType request; @@ -6830,7 +6807,9 @@ class Test_TC_CC_4_2 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_3(uint8_t status) { ThrowFailureResponse(); } @@ -6839,9 +6818,6 @@ class Test_TC_CC_4_2 : public TestCommand CHIP_ERROR TestTurnOffLightThatWeTurnedOn_4() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -6853,7 +6829,9 @@ class Test_TC_CC_4_2 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_4(uint8_t status) { ThrowFailureResponse(); } @@ -6971,9 +6949,6 @@ class Test_TC_CC_4_3 : public TestCommand CHIP_ERROR TestTurnOnLightForColorControlTests_0() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -6985,7 +6960,9 @@ class Test_TC_CC_4_3 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_0(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } @@ -7011,9 +6988,6 @@ class Test_TC_CC_4_3 : public TestCommand CHIP_ERROR TestStepSaturationUpCommand_2() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::StepSaturation::Type; RequestType request; @@ -7030,7 +7004,9 @@ class Test_TC_CC_4_3 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_2(uint8_t status) { ThrowFailureResponse(); } @@ -7039,9 +7015,6 @@ class Test_TC_CC_4_3 : public TestCommand CHIP_ERROR TestStepSaturationDownCommand_3() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::StepSaturation::Type; RequestType request; @@ -7058,7 +7031,9 @@ class Test_TC_CC_4_3 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_3(uint8_t status) { ThrowFailureResponse(); } @@ -7067,9 +7042,6 @@ class Test_TC_CC_4_3 : public TestCommand CHIP_ERROR TestTurnOffLightThatWeTurnedOn_4() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -7081,7 +7053,9 @@ class Test_TC_CC_4_3 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_4(uint8_t status) { ThrowFailureResponse(); } @@ -7195,9 +7169,6 @@ class Test_TC_CC_4_4 : public TestCommand CHIP_ERROR TestTurnOnLightForColorControlTests_0() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -7209,7 +7180,9 @@ class Test_TC_CC_4_4 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_0(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } @@ -7235,9 +7208,6 @@ class Test_TC_CC_4_4 : public TestCommand CHIP_ERROR TestMoveToCurrentHueAndSaturationCommand_2() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::MoveToHueAndSaturation::Type; RequestType request; @@ -7254,7 +7224,9 @@ class Test_TC_CC_4_4 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_2(uint8_t status) { ThrowFailureResponse(); } @@ -7263,9 +7235,6 @@ class Test_TC_CC_4_4 : public TestCommand CHIP_ERROR TestTurnOffLightThatWeTurnedOn_3() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -7277,7 +7246,9 @@ class Test_TC_CC_4_4 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_3(uint8_t status) { ThrowFailureResponse(); } @@ -7391,9 +7362,6 @@ class Test_TC_CC_5_1 : public TestCommand CHIP_ERROR TestTurnOnLightForColorControlTests_0() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -7405,7 +7373,9 @@ class Test_TC_CC_5_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_0(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } @@ -7431,9 +7401,6 @@ class Test_TC_CC_5_1 : public TestCommand CHIP_ERROR TestMoveToColorCommand_2() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::MoveToColor::Type; RequestType request; @@ -7450,7 +7417,9 @@ class Test_TC_CC_5_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_2(uint8_t status) { ThrowFailureResponse(); } @@ -7459,9 +7428,6 @@ class Test_TC_CC_5_1 : public TestCommand CHIP_ERROR TestTurnOffLightThatWeTurnedOn_3() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -7473,7 +7439,9 @@ class Test_TC_CC_5_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_3(uint8_t status) { ThrowFailureResponse(); } @@ -7591,9 +7559,6 @@ class Test_TC_CC_5_2 : public TestCommand CHIP_ERROR TestTurnOnLightForColorControlTests_0() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -7605,7 +7570,9 @@ class Test_TC_CC_5_2 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_0(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } @@ -7631,9 +7598,6 @@ class Test_TC_CC_5_2 : public TestCommand CHIP_ERROR TestMoveColorCommand_2() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::MoveColor::Type; RequestType request; @@ -7649,7 +7613,9 @@ class Test_TC_CC_5_2 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_2(uint8_t status) { ThrowFailureResponse(); } @@ -7658,9 +7624,6 @@ class Test_TC_CC_5_2 : public TestCommand CHIP_ERROR TestStopMoveStepCommand_3() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type; RequestType request; @@ -7674,7 +7637,9 @@ class Test_TC_CC_5_2 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_3(uint8_t status) { ThrowFailureResponse(); } @@ -7683,9 +7648,6 @@ class Test_TC_CC_5_2 : public TestCommand CHIP_ERROR TestTurnOffLightThatWeTurnedOn_4() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -7697,7 +7659,9 @@ class Test_TC_CC_5_2 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_4(uint8_t status) { ThrowFailureResponse(); } @@ -7811,9 +7775,6 @@ class Test_TC_CC_5_3 : public TestCommand CHIP_ERROR TestTurnOnLightForColorControlTests_0() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -7825,7 +7786,9 @@ class Test_TC_CC_5_3 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_0(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } @@ -7851,9 +7814,6 @@ class Test_TC_CC_5_3 : public TestCommand CHIP_ERROR TestStepColorCommand_2() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::StepColor::Type; RequestType request; @@ -7870,7 +7830,9 @@ class Test_TC_CC_5_3 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_2(uint8_t status) { ThrowFailureResponse(); } @@ -7879,9 +7841,6 @@ class Test_TC_CC_5_3 : public TestCommand CHIP_ERROR TestTurnOffLightThatWeTurnedOn_3() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -7893,7 +7852,9 @@ class Test_TC_CC_5_3 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_3(uint8_t status) { ThrowFailureResponse(); } @@ -8007,9 +7968,6 @@ class Test_TC_CC_6_1 : public TestCommand CHIP_ERROR TestTurnOnLightForColorControlTests_0() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -8021,7 +7979,9 @@ class Test_TC_CC_6_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_0(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } @@ -8047,9 +8007,6 @@ class Test_TC_CC_6_1 : public TestCommand CHIP_ERROR TestMoveToColorTemperatureCommand_2() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Type; RequestType request; @@ -8065,7 +8022,9 @@ class Test_TC_CC_6_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_2(uint8_t status) { ThrowFailureResponse(); } @@ -8074,9 +8033,6 @@ class Test_TC_CC_6_1 : public TestCommand CHIP_ERROR TestTurnOffLightThatWeTurnedOn_3() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -8088,7 +8044,9 @@ class Test_TC_CC_6_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_3(uint8_t status) { ThrowFailureResponse(); } @@ -8210,9 +8168,6 @@ class Test_TC_CC_6_2 : public TestCommand CHIP_ERROR TestTurnOnLightForColorControlTests_0() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -8224,7 +8179,9 @@ class Test_TC_CC_6_2 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_0(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } @@ -8250,9 +8207,6 @@ class Test_TC_CC_6_2 : public TestCommand CHIP_ERROR TestMoveUpColorTemperatureCommand_2() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type; RequestType request; @@ -8270,7 +8224,9 @@ class Test_TC_CC_6_2 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_2(uint8_t status) { ThrowFailureResponse(); } @@ -8279,9 +8235,6 @@ class Test_TC_CC_6_2 : public TestCommand CHIP_ERROR TestStopColorTemperatureCommand_3() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type; RequestType request; @@ -8299,7 +8252,9 @@ class Test_TC_CC_6_2 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_3(uint8_t status) { ThrowFailureResponse(); } @@ -8308,9 +8263,6 @@ class Test_TC_CC_6_2 : public TestCommand CHIP_ERROR TestMoveDownColorTemperatureCommand_4() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type; RequestType request; @@ -8328,7 +8280,9 @@ class Test_TC_CC_6_2 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_4(uint8_t status) { ThrowFailureResponse(); } @@ -8337,9 +8291,6 @@ class Test_TC_CC_6_2 : public TestCommand CHIP_ERROR TestTurnOffLightThatWeTurnedOn_5() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -8351,7 +8302,9 @@ class Test_TC_CC_6_2 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_5(uint8_t status) { ThrowFailureResponse(); } @@ -8469,9 +8422,6 @@ class Test_TC_CC_6_3 : public TestCommand CHIP_ERROR TestTurnOnLightForColorControlTests_0() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -8483,7 +8433,9 @@ class Test_TC_CC_6_3 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_0(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } @@ -8509,9 +8461,6 @@ class Test_TC_CC_6_3 : public TestCommand CHIP_ERROR TestStepUpColorTemperatureCommand_2() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::StepColorTemperature::Type; RequestType request; @@ -8530,7 +8479,9 @@ class Test_TC_CC_6_3 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_2(uint8_t status) { ThrowFailureResponse(); } @@ -8539,9 +8490,6 @@ class Test_TC_CC_6_3 : public TestCommand CHIP_ERROR TestStepDownColorTemperatureCommand_3() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::StepColorTemperature::Type; RequestType request; @@ -8560,7 +8508,9 @@ class Test_TC_CC_6_3 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_3(uint8_t status) { ThrowFailureResponse(); } @@ -8569,9 +8519,6 @@ class Test_TC_CC_6_3 : public TestCommand CHIP_ERROR TestTurnOffLightThatWeTurnedOn_4() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -8583,7 +8530,9 @@ class Test_TC_CC_6_3 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_4(uint8_t status) { ThrowFailureResponse(); } @@ -8712,9 +8661,6 @@ class Test_TC_CC_7_1 : public TestCommand CHIP_ERROR TestTurnOnLightForColorControlTests_0() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -8726,7 +8672,9 @@ class Test_TC_CC_7_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_0(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } @@ -8752,9 +8700,6 @@ class Test_TC_CC_7_1 : public TestCommand CHIP_ERROR TestEnhancedMoveToHueCommand_2() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type; RequestType request; @@ -8771,7 +8716,9 @@ class Test_TC_CC_7_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_2(uint8_t status) { ThrowFailureResponse(); } @@ -8797,9 +8744,6 @@ class Test_TC_CC_7_1 : public TestCommand CHIP_ERROR TestTurnOffLightThatWeTurnedOn_4() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -8811,7 +8755,9 @@ class Test_TC_CC_7_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_4(uint8_t status) { ThrowFailureResponse(); } @@ -8937,9 +8883,6 @@ class Test_TC_CC_7_2 : public TestCommand CHIP_ERROR TestTurnOnLightForColorControlTests_0() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -8951,7 +8894,9 @@ class Test_TC_CC_7_2 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_0(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } @@ -8977,9 +8922,6 @@ class Test_TC_CC_7_2 : public TestCommand CHIP_ERROR TestEnhancedMoveHueDownCommand_2() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type; RequestType request; @@ -8995,7 +8937,9 @@ class Test_TC_CC_7_2 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_2(uint8_t status) { ThrowFailureResponse(); } @@ -9004,9 +8948,6 @@ class Test_TC_CC_7_2 : public TestCommand CHIP_ERROR TestEnhancedMoveHueStopCommand_3() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type; RequestType request; @@ -9022,7 +8963,9 @@ class Test_TC_CC_7_2 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_3(uint8_t status) { ThrowFailureResponse(); } @@ -9031,9 +8974,6 @@ class Test_TC_CC_7_2 : public TestCommand CHIP_ERROR TestEnhancedMoveHueUpCommand_4() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type; RequestType request; @@ -9049,7 +8989,9 @@ class Test_TC_CC_7_2 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_4(uint8_t status) { ThrowFailureResponse(); } @@ -9058,9 +9000,6 @@ class Test_TC_CC_7_2 : public TestCommand CHIP_ERROR TestEnhancedMoveHueStopCommand_5() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type; RequestType request; @@ -9076,7 +9015,9 @@ class Test_TC_CC_7_2 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_5(uint8_t status) { ThrowFailureResponse(); } @@ -9085,9 +9026,6 @@ class Test_TC_CC_7_2 : public TestCommand CHIP_ERROR TestTurnOffLightThatWeTurnedOn_6() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -9099,7 +9037,9 @@ class Test_TC_CC_7_2 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_6(uint8_t status) { ThrowFailureResponse(); } @@ -9217,9 +9157,6 @@ class Test_TC_CC_7_3 : public TestCommand CHIP_ERROR TestTurnOnLightForColorControlTests_0() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -9231,7 +9168,9 @@ class Test_TC_CC_7_3 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_0(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } @@ -9257,9 +9196,6 @@ class Test_TC_CC_7_3 : public TestCommand CHIP_ERROR TestEnhancedStepHueUpCommand_2() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Type; RequestType request; @@ -9276,7 +9212,9 @@ class Test_TC_CC_7_3 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_2(uint8_t status) { ThrowFailureResponse(); } @@ -9285,9 +9223,6 @@ class Test_TC_CC_7_3 : public TestCommand CHIP_ERROR TestEnhancedStepHueDownCommand_3() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Type; RequestType request; @@ -9304,7 +9239,9 @@ class Test_TC_CC_7_3 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_3(uint8_t status) { ThrowFailureResponse(); } @@ -9313,9 +9250,6 @@ class Test_TC_CC_7_3 : public TestCommand CHIP_ERROR TestTurnOffLightThatWeTurnedOn_4() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -9327,7 +9261,9 @@ class Test_TC_CC_7_3 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_4(uint8_t status) { ThrowFailureResponse(); } @@ -9441,9 +9377,6 @@ class Test_TC_CC_7_4 : public TestCommand CHIP_ERROR TestTurnOnLightForColorControlTests_0() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -9455,7 +9388,9 @@ class Test_TC_CC_7_4 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_0(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } @@ -9481,9 +9416,6 @@ class Test_TC_CC_7_4 : public TestCommand CHIP_ERROR TestEnhancedMoveToHueAndSaturationCommand_2() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type; RequestType request; @@ -9500,7 +9432,9 @@ class Test_TC_CC_7_4 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_2(uint8_t status) { ThrowFailureResponse(); } @@ -9509,9 +9443,6 @@ class Test_TC_CC_7_4 : public TestCommand CHIP_ERROR TestTurnOffLightThatWeTurnedOn_3() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -9523,7 +9454,9 @@ class Test_TC_CC_7_4 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_3(uint8_t status) { ThrowFailureResponse(); } @@ -9761,9 +9694,6 @@ class Test_TC_CC_8_1 : public TestCommand CHIP_ERROR TestTurnOnLightForColorControlTests_0() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -9775,7 +9705,9 @@ class Test_TC_CC_8_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_0(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } @@ -9801,9 +9733,6 @@ class Test_TC_CC_8_1 : public TestCommand CHIP_ERROR TestColorLoopSetCommandSetAllAttributs_2() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -9822,7 +9751,9 @@ class Test_TC_CC_8_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_2(uint8_t status) { ThrowFailureResponse(); } @@ -9899,9 +9830,6 @@ class Test_TC_CC_8_1 : public TestCommand CHIP_ERROR TestColorLoopSetCommandStartColorLoop_7() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -9920,7 +9848,9 @@ class Test_TC_CC_8_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_7(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_7(uint8_t status) { ThrowFailureResponse(); } @@ -9946,9 +9876,6 @@ class Test_TC_CC_8_1 : public TestCommand CHIP_ERROR TestColorLoopSetCommandSetDirectionAndTimeWhileRunning_9() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -9967,7 +9894,9 @@ class Test_TC_CC_8_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_9(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_9(uint8_t status) { ThrowFailureResponse(); } @@ -10010,9 +9939,6 @@ class Test_TC_CC_8_1 : public TestCommand CHIP_ERROR TestColorLoopSetCommandSetDirectionWhileRunning_12() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -10031,7 +9957,9 @@ class Test_TC_CC_8_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_12(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_12(uint8_t status) { ThrowFailureResponse(); } @@ -10057,9 +9985,6 @@ class Test_TC_CC_8_1 : public TestCommand CHIP_ERROR TestTurnOffLightThatWeTurnedOn_14() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -10071,7 +9996,9 @@ class Test_TC_CC_8_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_14(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_14(uint8_t status) { ThrowFailureResponse(); } @@ -10459,9 +10386,6 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestPreconditionTurnOnLightForColorControlTests_0() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -10473,7 +10397,9 @@ class Test_TC_CC_9_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_0(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } @@ -10499,9 +10425,6 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_2() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -10520,7 +10443,9 @@ class Test_TC_CC_9_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_2(uint8_t status) { ThrowFailureResponse(); } @@ -10546,9 +10471,6 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_4() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -10567,7 +10489,9 @@ class Test_TC_CC_9_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_4(uint8_t status) { ThrowFailureResponse(); } @@ -10593,9 +10517,6 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_6() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -10614,7 +10535,9 @@ class Test_TC_CC_9_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_6(uint8_t status) { ThrowFailureResponse(); } @@ -10640,9 +10563,6 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_8() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -10661,7 +10581,9 @@ class Test_TC_CC_9_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_8(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_8(uint8_t status) { ThrowFailureResponse(); } @@ -10687,9 +10609,6 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_10() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -10708,7 +10627,9 @@ class Test_TC_CC_9_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_10(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_10(uint8_t status) { ThrowFailureResponse(); } @@ -10734,9 +10655,6 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_12() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -10755,7 +10673,9 @@ class Test_TC_CC_9_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_12(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_12(uint8_t status) { ThrowFailureResponse(); } @@ -10781,9 +10701,6 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_14() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -10802,7 +10719,9 @@ class Test_TC_CC_9_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_14(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_14(uint8_t status) { ThrowFailureResponse(); } @@ -10828,9 +10747,6 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_16() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -10849,7 +10765,9 @@ class Test_TC_CC_9_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_16(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_16(uint8_t status) { ThrowFailureResponse(); } @@ -10875,9 +10793,6 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_18() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -10896,7 +10811,9 @@ class Test_TC_CC_9_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_18(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_18(uint8_t status) { ThrowFailureResponse(); } @@ -10922,9 +10839,6 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestEnhancedMoveToHueCommand10_20() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type; RequestType request; @@ -10941,7 +10855,9 @@ class Test_TC_CC_9_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_20(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_20(uint8_t status) { ThrowFailureResponse(); } @@ -10969,9 +10885,6 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_23() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -10990,7 +10903,9 @@ class Test_TC_CC_9_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_23(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_23(uint8_t status) { ThrowFailureResponse(); } @@ -11016,9 +10931,6 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_25() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -11037,7 +10949,9 @@ class Test_TC_CC_9_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_25(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_25(uint8_t status) { ThrowFailureResponse(); } @@ -11063,9 +10977,6 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_27() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -11084,7 +10995,9 @@ class Test_TC_CC_9_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_27(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_27(uint8_t status) { ThrowFailureResponse(); } @@ -11110,9 +11023,6 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_29() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -11131,7 +11041,9 @@ class Test_TC_CC_9_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_29(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_29(uint8_t status) { ThrowFailureResponse(); } @@ -11157,9 +11069,6 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_31() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -11178,7 +11087,9 @@ class Test_TC_CC_9_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_31(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_31(uint8_t status) { ThrowFailureResponse(); } @@ -11204,9 +11115,6 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_33() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -11225,7 +11133,9 @@ class Test_TC_CC_9_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_33(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_33(uint8_t status) { ThrowFailureResponse(); } @@ -11251,9 +11161,6 @@ class Test_TC_CC_9_1 : public TestCommand CHIP_ERROR TestTurnOffLightForColorControlTests_35() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -11265,7 +11172,9 @@ class Test_TC_CC_9_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_35(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_35(uint8_t status) { ThrowFailureResponse(); } @@ -11458,9 +11367,6 @@ class Test_TC_CC_9_2 : public TestCommand CHIP_ERROR TestPreconditionTurnOnLightForColorControlTests_0() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -11472,7 +11378,9 @@ class Test_TC_CC_9_2 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_0(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } @@ -11498,9 +11406,6 @@ class Test_TC_CC_9_2 : public TestCommand CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_2() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -11519,7 +11424,9 @@ class Test_TC_CC_9_2 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_2(uint8_t status) { ThrowFailureResponse(); } @@ -11596,9 +11503,6 @@ class Test_TC_CC_9_2 : public TestCommand CHIP_ERROR TestColorLoopSetCommandSetAllAttributes_7() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -11617,7 +11521,9 @@ class Test_TC_CC_9_2 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_7(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_7(uint8_t status) { ThrowFailureResponse(); } @@ -11643,9 +11549,6 @@ class Test_TC_CC_9_2 : public TestCommand CHIP_ERROR TestColorLoopSetCommandStartColorLoop_9() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -11664,7 +11567,9 @@ class Test_TC_CC_9_2 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_9(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_9(uint8_t status) { ThrowFailureResponse(); } @@ -11690,9 +11595,6 @@ class Test_TC_CC_9_2 : public TestCommand CHIP_ERROR TestColorLoopSetCommandStartColorLoop_11() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -11711,7 +11613,9 @@ class Test_TC_CC_9_2 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_11(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_11(uint8_t status) { ThrowFailureResponse(); } @@ -11737,9 +11641,6 @@ class Test_TC_CC_9_2 : public TestCommand CHIP_ERROR TestTurnOffLightForColorControlTests_13() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -11751,7 +11652,9 @@ class Test_TC_CC_9_2 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_13(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_13(uint8_t status) { ThrowFailureResponse(); } @@ -11944,9 +11847,6 @@ class Test_TC_CC_9_3 : public TestCommand CHIP_ERROR TestPreconditionTurnOnLightForColorControlTests_0() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -11958,7 +11858,9 @@ class Test_TC_CC_9_3 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_0(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } @@ -11984,9 +11886,6 @@ class Test_TC_CC_9_3 : public TestCommand CHIP_ERROR TestSendsColorLoopSetCommandSetAllAttributes_2() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -12005,7 +11904,9 @@ class Test_TC_CC_9_3 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_2(uint8_t status) { ThrowFailureResponse(); } @@ -12082,9 +11983,6 @@ class Test_TC_CC_9_3 : public TestCommand CHIP_ERROR TestColorLoopSetCommandSetAllAttributes_7() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -12103,7 +12001,9 @@ class Test_TC_CC_9_3 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_7(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_7(uint8_t status) { ThrowFailureResponse(); } @@ -12129,9 +12029,6 @@ class Test_TC_CC_9_3 : public TestCommand CHIP_ERROR TestColorLoopSetCommandStartColorLoop_9() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -12150,7 +12047,9 @@ class Test_TC_CC_9_3 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_9(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_9(uint8_t status) { ThrowFailureResponse(); } @@ -12176,9 +12075,6 @@ class Test_TC_CC_9_3 : public TestCommand CHIP_ERROR TestColorLoopSetCommandStartColorLoop_11() { - chip::Controller::ColorControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type; RequestType request; @@ -12197,7 +12093,9 @@ class Test_TC_CC_9_3 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_11(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_11(uint8_t status) { ThrowFailureResponse(); } @@ -12223,9 +12121,6 @@ class Test_TC_CC_9_3 : public TestCommand CHIP_ERROR TestTurnOffLightForColorControlTests_13() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -12237,7 +12132,9 @@ class Test_TC_CC_9_3 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_13(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_13(uint8_t status) { ThrowFailureResponse(); } @@ -13973,9 +13870,6 @@ class Test_TC_LVL_2_1 : public TestCommand CHIP_ERROR TestSendsAMoveToLevelCommand_1() { - chip::Controller::LevelControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type; RequestType request; @@ -13991,7 +13885,9 @@ class Test_TC_LVL_2_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_1(uint8_t status) { ThrowFailureResponse(); } @@ -14019,9 +13915,6 @@ class Test_TC_LVL_2_1 : public TestCommand CHIP_ERROR TestSendsAMoveToLevelCommand_4() { - chip::Controller::LevelControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type; RequestType request; @@ -14037,7 +13930,9 @@ class Test_TC_LVL_2_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_4(uint8_t status) { ThrowFailureResponse(); } @@ -14082,9 +13977,6 @@ class Test_TC_LVL_2_1 : public TestCommand CHIP_ERROR TestSendsAMoveToLevelCommand_8() { - chip::Controller::LevelControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type; RequestType request; @@ -14100,7 +13992,9 @@ class Test_TC_LVL_2_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_8(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_8(uint8_t status) { ThrowFailureResponse(); } @@ -14128,9 +14022,6 @@ class Test_TC_LVL_2_1 : public TestCommand CHIP_ERROR TestResetLevelTo0_11() { - chip::Controller::LevelControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type; RequestType request; @@ -14146,7 +14037,9 @@ class Test_TC_LVL_2_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_11(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_11(uint8_t status) { ThrowFailureResponse(); } @@ -14372,9 +14265,6 @@ class Test_TC_LVL_3_1 : public TestCommand CHIP_ERROR TestSendsAMoveUpCommand_2() { - chip::Controller::LevelControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::LevelControl::Commands::Move::Type; RequestType request; @@ -14390,7 +14280,9 @@ class Test_TC_LVL_3_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_2(uint8_t status) { ThrowFailureResponse(); } @@ -14435,9 +14327,6 @@ class Test_TC_LVL_3_1 : public TestCommand CHIP_ERROR TestSendsAMoveDownCommand_6() { - chip::Controller::LevelControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::LevelControl::Commands::Move::Type; RequestType request; @@ -14453,7 +14342,9 @@ class Test_TC_LVL_3_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_6(uint8_t status) { ThrowFailureResponse(); } @@ -14514,9 +14405,6 @@ class Test_TC_LVL_3_1 : public TestCommand CHIP_ERROR TestSendsAMoveUpCommandAtDefaultMoveRate_11() { - chip::Controller::LevelControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::LevelControl::Commands::Move::Type; RequestType request; @@ -14532,7 +14420,9 @@ class Test_TC_LVL_3_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_11(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_11(uint8_t status) { ThrowFailureResponse(); } @@ -14682,9 +14572,6 @@ class Test_TC_LVL_4_1 : public TestCommand CHIP_ERROR TestSendingOnCommand_0() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -14696,7 +14583,9 @@ class Test_TC_LVL_4_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_0(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } @@ -14705,9 +14594,6 @@ class Test_TC_LVL_4_1 : public TestCommand CHIP_ERROR TestPreconditionDutLevelIsSetTo0x80_1() { - chip::Controller::LevelControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::LevelControl::Commands::Step::Type; RequestType request; @@ -14724,7 +14610,9 @@ class Test_TC_LVL_4_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_1(uint8_t status) { ThrowFailureResponse(); } @@ -14752,9 +14640,6 @@ class Test_TC_LVL_4_1 : public TestCommand CHIP_ERROR TestSendsStepDownCommandToDut_4() { - chip::Controller::LevelControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::LevelControl::Commands::Step::Type; RequestType request; @@ -14771,7 +14656,9 @@ class Test_TC_LVL_4_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_4(uint8_t status) { ThrowFailureResponse(); } @@ -14799,9 +14686,6 @@ class Test_TC_LVL_4_1 : public TestCommand CHIP_ERROR TestSendsAStepUpCommand_7() { - chip::Controller::LevelControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::LevelControl::Commands::Step::Type; RequestType request; @@ -14818,7 +14702,9 @@ class Test_TC_LVL_4_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_7(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_7(uint8_t status) { ThrowFailureResponse(); } @@ -14846,9 +14732,6 @@ class Test_TC_LVL_4_1 : public TestCommand CHIP_ERROR TestSendingOffCommand_10() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -14860,7 +14743,9 @@ class Test_TC_LVL_4_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_10(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_10(uint8_t status) { ThrowFailureResponse(); } @@ -14945,9 +14830,6 @@ class Test_TC_LVL_5_1 : public TestCommand CHIP_ERROR TestSendingOnCommand_0() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -14959,7 +14841,9 @@ class Test_TC_LVL_5_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_0(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } @@ -14968,9 +14852,6 @@ class Test_TC_LVL_5_1 : public TestCommand CHIP_ERROR TestPreconditionDutLevelIsSetTo0x80_1() { - chip::Controller::LevelControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::LevelControl::Commands::Step::Type; RequestType request; @@ -14987,7 +14868,9 @@ class Test_TC_LVL_5_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_1(uint8_t status) { ThrowFailureResponse(); } @@ -14998,9 +14881,6 @@ class Test_TC_LVL_5_1 : public TestCommand CHIP_ERROR TestSendsAMoveUpCommandToDut_3() { - chip::Controller::LevelControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::LevelControl::Commands::Move::Type; RequestType request; @@ -15016,7 +14896,9 @@ class Test_TC_LVL_5_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_3(uint8_t status) { ThrowFailureResponse(); } @@ -15027,9 +14909,6 @@ class Test_TC_LVL_5_1 : public TestCommand CHIP_ERROR TestSendsStopCommandToDut_5() { - chip::Controller::LevelControlClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::LevelControl::Commands::Stop::Type; RequestType request; @@ -15043,7 +14922,9 @@ class Test_TC_LVL_5_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_5(uint8_t status) { ThrowFailureResponse(); } @@ -15052,9 +14933,6 @@ class Test_TC_LVL_5_1 : public TestCommand CHIP_ERROR TestSendingOffCommand_6() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -15066,7 +14944,9 @@ class Test_TC_LVL_5_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_6(uint8_t status) { ThrowFailureResponse(); } @@ -15203,9 +15083,6 @@ class Test_TC_MC_2_1 : public TestCommand CHIP_ERROR TestPutTheDeviceIntoLowPowerMode_0() { - chip::Controller::LowPowerClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::LowPower::Commands::Sleep::Type; RequestType request; @@ -15217,7 +15094,9 @@ class Test_TC_MC_2_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_0(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } @@ -17103,9 +16982,6 @@ class Test_TC_OO_2_2 : public TestCommand CHIP_ERROR TestSendOffCommand_0() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -17117,7 +16993,9 @@ class Test_TC_OO_2_2 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_0(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } @@ -17143,9 +17021,6 @@ class Test_TC_OO_2_2 : public TestCommand CHIP_ERROR TestSendOnCommand_2() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -17157,7 +17032,9 @@ class Test_TC_OO_2_2 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_2(uint8_t status) { ThrowFailureResponse(); } @@ -17183,9 +17060,6 @@ class Test_TC_OO_2_2 : public TestCommand CHIP_ERROR TestSendOffCommand_4() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -17197,7 +17071,9 @@ class Test_TC_OO_2_2 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_4(uint8_t status) { ThrowFailureResponse(); } @@ -17223,9 +17099,6 @@ class Test_TC_OO_2_2 : public TestCommand CHIP_ERROR TestSendToggleCommand_6() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::Toggle::Type; RequestType request; @@ -17237,7 +17110,9 @@ class Test_TC_OO_2_2 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_6(uint8_t status) { ThrowFailureResponse(); } @@ -17263,9 +17138,6 @@ class Test_TC_OO_2_2 : public TestCommand CHIP_ERROR TestSendToggleCommand_8() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::Toggle::Type; RequestType request; @@ -17277,7 +17149,9 @@ class Test_TC_OO_2_2 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_8(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_8(uint8_t status) { ThrowFailureResponse(); } @@ -17303,9 +17177,6 @@ class Test_TC_OO_2_2 : public TestCommand CHIP_ERROR TestSendOnCommand_10() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -17317,7 +17188,9 @@ class Test_TC_OO_2_2 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_10(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_10(uint8_t status) { ThrowFailureResponse(); } @@ -17343,9 +17216,6 @@ class Test_TC_OO_2_2 : public TestCommand CHIP_ERROR TestSendOffCommand_12() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -17357,7 +17227,9 @@ class Test_TC_OO_2_2 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_12(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_12(uint8_t status) { ThrowFailureResponse(); } @@ -17945,9 +17817,6 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestSendOnCommand_0() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -17959,7 +17828,9 @@ class Test_TC_OO_2_3 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_0(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } @@ -18004,9 +17875,6 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestSendOnCommand_4() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -18018,7 +17886,9 @@ class Test_TC_OO_2_3 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_4(uint8_t status) { ThrowFailureResponse(); } @@ -18063,9 +17933,6 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestSendOnCommand_8() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -18077,7 +17944,9 @@ class Test_TC_OO_2_3 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_8(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_8(uint8_t status) { ThrowFailureResponse(); } @@ -18156,9 +18025,6 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestSendOnCommand_14() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -18170,7 +18036,9 @@ class Test_TC_OO_2_3 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_14(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_14(uint8_t status) { ThrowFailureResponse(); } @@ -18230,9 +18098,6 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestSendOffCommand_18() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -18244,7 +18109,9 @@ class Test_TC_OO_2_3 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_18(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_18(uint8_t status) { ThrowFailureResponse(); } @@ -18338,9 +18205,6 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestSendOnCommand_24() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -18352,7 +18216,9 @@ class Test_TC_OO_2_3 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_24(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_24(uint8_t status) { ThrowFailureResponse(); } @@ -18395,9 +18261,6 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestSendOffCommand_27() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -18409,7 +18272,9 @@ class Test_TC_OO_2_3 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_27(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_27(uint8_t status) { ThrowFailureResponse(); } @@ -18486,9 +18351,6 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestSendOnCommand_32() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -18500,7 +18362,9 @@ class Test_TC_OO_2_3 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_32(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_32(uint8_t status) { ThrowFailureResponse(); } @@ -18560,9 +18424,6 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestSendOffCommand_36() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -18574,7 +18435,9 @@ class Test_TC_OO_2_3 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_36(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_36(uint8_t status) { ThrowFailureResponse(); } @@ -18719,9 +18582,6 @@ class Test_TC_OO_2_3 : public TestCommand CHIP_ERROR TestSendOffCommand_45() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -18733,7 +18593,9 @@ class Test_TC_OO_2_3 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_45(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_45(uint8_t status) { ThrowFailureResponse(); } @@ -24373,9 +24235,6 @@ class Test_TC_WNCV_3_1 : public TestCommand CHIP_ERROR Test1aThAdjustsTheTheDutToANonOpenPosition_0() { - chip::Controller::WindowCoveringClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::WindowCovering::Commands::DownOrClose::Type; RequestType request; @@ -24387,7 +24246,9 @@ class Test_TC_WNCV_3_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_0(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } @@ -24396,9 +24257,6 @@ class Test_TC_WNCV_3_1 : public TestCommand CHIP_ERROR Test2aThSendsUpOrOpenCommandToDut_1() { - chip::Controller::WindowCoveringClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::WindowCovering::Commands::UpOrOpen::Type; RequestType request; @@ -24410,7 +24268,9 @@ class Test_TC_WNCV_3_1 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_1(uint8_t status) { ThrowFailureResponse(); } @@ -24506,9 +24366,6 @@ class Test_TC_WNCV_3_2 : public TestCommand CHIP_ERROR Test1aThAdjustsTheTheDutToANonClosedPosition_0() { - chip::Controller::WindowCoveringClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::WindowCovering::Commands::UpOrOpen::Type; RequestType request; @@ -24520,7 +24377,9 @@ class Test_TC_WNCV_3_2 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_0(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } @@ -24529,9 +24388,6 @@ class Test_TC_WNCV_3_2 : public TestCommand CHIP_ERROR Test2aThSendsDownOrCloseCommandToDut_1() { - chip::Controller::WindowCoveringClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::WindowCovering::Commands::DownOrClose::Type; RequestType request; @@ -24543,7 +24399,9 @@ class Test_TC_WNCV_3_2 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_1(uint8_t status) { ThrowFailureResponse(); } @@ -24639,9 +24497,6 @@ class Test_TC_WNCV_3_3 : public TestCommand CHIP_ERROR Test1aThAdjustsTheTheDutToANonOpenPosition_0() { - chip::Controller::WindowCoveringClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::WindowCovering::Commands::UpOrOpen::Type; RequestType request; @@ -24653,7 +24508,9 @@ class Test_TC_WNCV_3_3 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_0(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } @@ -24662,9 +24519,6 @@ class Test_TC_WNCV_3_3 : public TestCommand CHIP_ERROR Test2aThSendsStopMotionCommandToDut_1() { - chip::Controller::WindowCoveringClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::WindowCovering::Commands::StopMotion::Type; RequestType request; @@ -24676,7 +24530,9 @@ class Test_TC_WNCV_3_3 : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_1(uint8_t status) { ThrowFailureResponse(); } @@ -24797,9 +24653,6 @@ class TV_TargetNavigatorCluster : public TestCommand CHIP_ERROR TestNavigateTargetCommand_1() { - chip::Controller::TargetNavigatorClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::TargetNavigator::Commands::NavigateTarget::Type; RequestType request; @@ -24813,7 +24666,9 @@ class TV_TargetNavigatorCluster : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_1(uint8_t status) { ThrowFailureResponse(); } @@ -24927,9 +24782,6 @@ class TV_AudioOutputCluster : public TestCommand CHIP_ERROR TestSelectOutputCommand_1() { - chip::Controller::AudioOutputClusterTest cluster; - cluster.Associate(mDevice, 2); - using RequestType = chip::app::Clusters::AudioOutput::Commands::SelectOutput::Type; RequestType request; @@ -24942,7 +24794,9 @@ class TV_AudioOutputCluster : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 2, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_1(uint8_t status) { ThrowFailureResponse(); } @@ -24951,9 +24805,6 @@ class TV_AudioOutputCluster : public TestCommand CHIP_ERROR TestRenameOutputCommand_2() { - chip::Controller::AudioOutputClusterTest cluster; - cluster.Associate(mDevice, 2); - using RequestType = chip::app::Clusters::AudioOutput::Commands::RenameOutput::Type; RequestType request; @@ -24967,7 +24818,9 @@ class TV_AudioOutputCluster : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 2, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_2(uint8_t status) { ThrowFailureResponse(); } @@ -25092,9 +24945,6 @@ class TV_ApplicationLauncherCluster : public TestCommand CHIP_ERROR TestLaunchAppCommand_1() { - chip::Controller::ApplicationLauncherClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ApplicationLauncher::Commands::LaunchApp::Type; RequestType request; @@ -25109,7 +24959,9 @@ class TV_ApplicationLauncherCluster : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_1(uint8_t status) { ThrowFailureResponse(); } @@ -25208,9 +25060,6 @@ class TV_KeypadInputCluster : public TestCommand CHIP_ERROR TestSendKeyCommand_0() { - chip::Controller::KeypadInputClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::KeypadInput::Commands::SendKey::Type; RequestType request; @@ -25223,7 +25072,9 @@ class TV_KeypadInputCluster : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_0(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } @@ -25288,9 +25139,6 @@ class TV_AccountLoginCluster : public TestCommand CHIP_ERROR TestGetSetupPinCommand_0() { - chip::Controller::AccountLoginClusterTest cluster; - cluster.Associate(mDevice, 3); - using RequestType = chip::app::Clusters::AccountLogin::Commands::GetSetupPIN::Type; RequestType request; @@ -25303,7 +25151,9 @@ class TV_AccountLoginCluster : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_0(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 3, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } @@ -25312,9 +25162,6 @@ class TV_AccountLoginCluster : public TestCommand CHIP_ERROR TestLoginCommand_1() { - chip::Controller::AccountLoginClusterTest cluster; - cluster.Associate(mDevice, 3); - using RequestType = chip::app::Clusters::AccountLogin::Commands::Login::Type; RequestType request; @@ -25328,7 +25175,9 @@ class TV_AccountLoginCluster : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 3, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_1(uint8_t status) { ThrowFailureResponse(); } @@ -25510,9 +25359,6 @@ class TV_ApplicationBasicCluster : public TestCommand CHIP_ERROR TestChangeStatusCommand_0() { - chip::Controller::ApplicationBasicClusterTest cluster; - cluster.Associate(mDevice, 3); - using RequestType = chip::app::Clusters::ApplicationBasic::Commands::ChangeStatus::Type; RequestType request; @@ -25525,7 +25371,9 @@ class TV_ApplicationBasicCluster : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_0(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 3, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } @@ -25677,9 +25525,6 @@ class TV_MediaPlaybackCluster : public TestCommand CHIP_ERROR TestMediaPlaybackPlayCommand_0() { - chip::Controller::MediaPlaybackClusterTest cluster; - cluster.Associate(mDevice, 3); - using RequestType = chip::app::Clusters::MediaPlayback::Commands::MediaPlay::Type; RequestType request; @@ -25691,7 +25536,9 @@ class TV_MediaPlaybackCluster : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_0(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 3, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } @@ -25704,9 +25551,6 @@ class TV_MediaPlaybackCluster : public TestCommand CHIP_ERROR TestMediaPlaybackPauseCommand_1() { - chip::Controller::MediaPlaybackClusterTest cluster; - cluster.Associate(mDevice, 3); - using RequestType = chip::app::Clusters::MediaPlayback::Commands::MediaPause::Type; RequestType request; @@ -25718,7 +25562,9 @@ class TV_MediaPlaybackCluster : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 3, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_1(uint8_t status) { ThrowFailureResponse(); } @@ -25731,9 +25577,6 @@ class TV_MediaPlaybackCluster : public TestCommand CHIP_ERROR TestMediaPlaybackStopCommand_2() { - chip::Controller::MediaPlaybackClusterTest cluster; - cluster.Associate(mDevice, 3); - using RequestType = chip::app::Clusters::MediaPlayback::Commands::MediaStop::Type; RequestType request; @@ -25745,7 +25588,9 @@ class TV_MediaPlaybackCluster : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 3, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_2(uint8_t status) { ThrowFailureResponse(); } @@ -25758,9 +25603,6 @@ class TV_MediaPlaybackCluster : public TestCommand CHIP_ERROR TestMediaPlaybackStartOverCommand_3() { - chip::Controller::MediaPlaybackClusterTest cluster; - cluster.Associate(mDevice, 3); - using RequestType = chip::app::Clusters::MediaPlayback::Commands::MediaStartOver::Type; RequestType request; @@ -25772,7 +25614,9 @@ class TV_MediaPlaybackCluster : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 3, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_3(uint8_t status) { ThrowFailureResponse(); } @@ -25785,9 +25629,6 @@ class TV_MediaPlaybackCluster : public TestCommand CHIP_ERROR TestMediaPlaybackPreviousCommand_4() { - chip::Controller::MediaPlaybackClusterTest cluster; - cluster.Associate(mDevice, 3); - using RequestType = chip::app::Clusters::MediaPlayback::Commands::MediaPrevious::Type; RequestType request; @@ -25799,7 +25640,9 @@ class TV_MediaPlaybackCluster : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 3, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_4(uint8_t status) { ThrowFailureResponse(); } @@ -25812,9 +25655,6 @@ class TV_MediaPlaybackCluster : public TestCommand CHIP_ERROR TestMediaPlaybackNextCommand_5() { - chip::Controller::MediaPlaybackClusterTest cluster; - cluster.Associate(mDevice, 3); - using RequestType = chip::app::Clusters::MediaPlayback::Commands::MediaNext::Type; RequestType request; @@ -25826,7 +25666,9 @@ class TV_MediaPlaybackCluster : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 3, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_5(uint8_t status) { ThrowFailureResponse(); } @@ -25839,9 +25681,6 @@ class TV_MediaPlaybackCluster : public TestCommand CHIP_ERROR TestMediaPlaybackRewindCommand_6() { - chip::Controller::MediaPlaybackClusterTest cluster; - cluster.Associate(mDevice, 3); - using RequestType = chip::app::Clusters::MediaPlayback::Commands::MediaRewind::Type; RequestType request; @@ -25853,7 +25692,9 @@ class TV_MediaPlaybackCluster : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 3, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_6(uint8_t status) { ThrowFailureResponse(); } @@ -25866,9 +25707,6 @@ class TV_MediaPlaybackCluster : public TestCommand CHIP_ERROR TestMediaPlaybackFastForwardCommand_7() { - chip::Controller::MediaPlaybackClusterTest cluster; - cluster.Associate(mDevice, 3); - using RequestType = chip::app::Clusters::MediaPlayback::Commands::MediaFastForward::Type; RequestType request; @@ -25880,7 +25718,9 @@ class TV_MediaPlaybackCluster : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_7(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 3, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_7(uint8_t status) { ThrowFailureResponse(); } @@ -25893,9 +25733,6 @@ class TV_MediaPlaybackCluster : public TestCommand CHIP_ERROR TestMediaPlaybackSkipForwardCommand_8() { - chip::Controller::MediaPlaybackClusterTest cluster; - cluster.Associate(mDevice, 3); - using RequestType = chip::app::Clusters::MediaPlayback::Commands::MediaSkipForward::Type; RequestType request; @@ -25908,7 +25745,9 @@ class TV_MediaPlaybackCluster : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_8(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 3, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_8(uint8_t status) { ThrowFailureResponse(); } @@ -25921,9 +25760,6 @@ class TV_MediaPlaybackCluster : public TestCommand CHIP_ERROR TestMediaPlaybackSkipBackwardCommand_9() { - chip::Controller::MediaPlaybackClusterTest cluster; - cluster.Associate(mDevice, 3); - using RequestType = chip::app::Clusters::MediaPlayback::Commands::MediaSkipBackward::Type; RequestType request; @@ -25936,7 +25772,9 @@ class TV_MediaPlaybackCluster : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_9(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 3, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_9(uint8_t status) { ThrowFailureResponse(); } @@ -25949,9 +25787,6 @@ class TV_MediaPlaybackCluster : public TestCommand CHIP_ERROR TestMediaPlaybackSeekCommand_10() { - chip::Controller::MediaPlaybackClusterTest cluster; - cluster.Associate(mDevice, 3); - using RequestType = chip::app::Clusters::MediaPlayback::Commands::MediaSeek::Type; RequestType request; @@ -25964,7 +25799,9 @@ class TV_MediaPlaybackCluster : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_10(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 3, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_10(uint8_t status) { ThrowFailureResponse(); } @@ -26082,9 +25919,6 @@ class TV_TvChannelCluster : public TestCommand CHIP_ERROR TestChangeChannelByNumberCommand_1() { - chip::Controller::TvChannelClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::TvChannel::Commands::ChangeChannelByNumber::Type; RequestType request; @@ -26098,7 +25932,9 @@ class TV_TvChannelCluster : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_1(uint8_t status) { ThrowFailureResponse(); } @@ -26107,9 +25943,6 @@ class TV_TvChannelCluster : public TestCommand CHIP_ERROR TestSkipChannelCommand_2() { - chip::Controller::TvChannelClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::TvChannel::Commands::SkipChannel::Type; RequestType request; @@ -26122,7 +25955,9 @@ class TV_TvChannelCluster : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_2(uint8_t status) { ThrowFailureResponse(); } @@ -26183,9 +26018,6 @@ class TV_LowPowerCluster : public TestCommand CHIP_ERROR TestSleepInputStatusCommand_0() { - chip::Controller::LowPowerClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::LowPower::Commands::Sleep::Type; RequestType request; @@ -26197,7 +26029,9 @@ class TV_LowPowerCluster : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_0(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } @@ -26331,9 +26165,6 @@ class TV_MediaInputCluster : public TestCommand CHIP_ERROR TestSelectInputCommand_1() { - chip::Controller::MediaInputClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::MediaInput::Commands::SelectInput::Type; RequestType request; @@ -26346,7 +26177,9 @@ class TV_MediaInputCluster : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_1(uint8_t status) { ThrowFailureResponse(); } @@ -26372,9 +26205,6 @@ class TV_MediaInputCluster : public TestCommand CHIP_ERROR TestHideInputStatusCommand_3() { - chip::Controller::MediaInputClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::MediaInput::Commands::HideInputStatus::Type; RequestType request; @@ -26386,7 +26216,9 @@ class TV_MediaInputCluster : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_3(uint8_t status) { ThrowFailureResponse(); } @@ -26395,9 +26227,6 @@ class TV_MediaInputCluster : public TestCommand CHIP_ERROR TestShowInputStatusCommand_4() { - chip::Controller::MediaInputClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::MediaInput::Commands::ShowInputStatus::Type; RequestType request; @@ -26409,7 +26238,9 @@ class TV_MediaInputCluster : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_4(uint8_t status) { ThrowFailureResponse(); } @@ -26418,9 +26249,6 @@ class TV_MediaInputCluster : public TestCommand CHIP_ERROR TestRenameInputCommand_5() { - chip::Controller::MediaInputClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::MediaInput::Commands::RenameInput::Type; RequestType request; @@ -26434,7 +26262,9 @@ class TV_MediaInputCluster : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_5(uint8_t status) { ThrowFailureResponse(); } @@ -28049,9 +27879,6 @@ class TestCluster : public TestCommand CHIP_ERROR TestSendTestCommand_0() { - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::TestCluster::Commands::Test::Type; RequestType request; @@ -28063,7 +27890,9 @@ class TestCluster : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_0(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } @@ -28072,9 +27901,6 @@ class TestCluster : public TestCommand CHIP_ERROR TestSendTestNotHandledCommand_1() { - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::TestCluster::Commands::TestNotHandled::Type; RequestType request; @@ -28086,7 +27912,9 @@ class TestCluster : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_1(uint8_t status) { NextTest(); } @@ -28095,9 +27923,6 @@ class TestCluster : public TestCommand CHIP_ERROR TestSendTestSpecificCommand_2() { - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::TestCluster::Commands::TestSpecific::Type; RequestType request; @@ -28109,7 +27934,9 @@ class TestCluster : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_2(uint8_t status) { ThrowFailureResponse(); } @@ -28122,9 +27949,6 @@ class TestCluster : public TestCommand CHIP_ERROR TestSendTestAddArgumentsCommand_3() { - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type; RequestType request; @@ -28138,7 +27962,9 @@ class TestCluster : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_3(uint8_t status) { ThrowFailureResponse(); } @@ -28151,9 +27977,6 @@ class TestCluster : public TestCommand CHIP_ERROR TestSendFailingTestAddArgumentsCommand_4() { - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type; RequestType request; @@ -28167,7 +27990,9 @@ class TestCluster : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_4(uint8_t status) { NextTest(); } @@ -30160,9 +29985,6 @@ class TestCluster : public TestCommand CHIP_ERROR TestSendTestCommandToUnsupportedEndpoint_121() { - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevice, 200); - using RequestType = chip::app::Clusters::TestCluster::Commands::Test::Type; RequestType request; @@ -30174,7 +29996,9 @@ class TestCluster : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_121(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 200, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_121(uint8_t status) { NextTest(); } @@ -30249,9 +30073,6 @@ class TestCluster : public TestCommand CHIP_ERROR TestSendACommandWithAVendorIdAndEnum_126() { - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::TestCluster::Commands::TestEnumsRequest::Type; RequestType request; @@ -30265,7 +30086,9 @@ class TestCluster : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_126(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_126(uint8_t status) { ThrowFailureResponse(); } @@ -30376,9 +30199,6 @@ class TestClusterComplexTypes : public TestCommand CHIP_ERROR TestSendTestCommandWithStructArgumentAndArg1bIsTrue_0() { - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::TestCluster::Commands::TestStructArgumentRequest::Type; RequestType request; @@ -30397,7 +30217,9 @@ class TestClusterComplexTypes : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_0(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } @@ -30410,9 +30232,6 @@ class TestClusterComplexTypes : public TestCommand CHIP_ERROR TestSendTestCommandWithStructArgumentAndArg1bIsFalse_1() { - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::TestCluster::Commands::TestStructArgumentRequest::Type; RequestType request; @@ -30431,7 +30250,9 @@ class TestClusterComplexTypes : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_1(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_1(uint8_t status) { ThrowFailureResponse(); } @@ -30444,9 +30265,6 @@ class TestClusterComplexTypes : public TestCommand CHIP_ERROR TestSendTestCommandWithListOfInt8uAndNoneOfThemIsSetTo0_2() { - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::TestCluster::Commands::TestListInt8UArgumentRequest::Type; RequestType request; @@ -30470,7 +30288,9 @@ class TestClusterComplexTypes : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_2(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_2(uint8_t status) { ThrowFailureResponse(); } @@ -30483,9 +30303,6 @@ class TestClusterComplexTypes : public TestCommand CHIP_ERROR TestSendTestCommandWithListOfInt8uAndOneOfThemIsSetTo0_3() { - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::TestCluster::Commands::TestListInt8UArgumentRequest::Type; RequestType request; @@ -30510,7 +30327,9 @@ class TestClusterComplexTypes : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_3(uint8_t status) { ThrowFailureResponse(); } @@ -30523,9 +30342,6 @@ class TestClusterComplexTypes : public TestCommand CHIP_ERROR TestSendTestCommandWithListOfInt8uAndGetItReversed_4() { - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseRequest::Type; RequestType request; @@ -30549,7 +30365,9 @@ class TestClusterComplexTypes : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_4(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_4(uint8_t status) { ThrowFailureResponse(); } @@ -30581,9 +30399,6 @@ class TestClusterComplexTypes : public TestCommand CHIP_ERROR TestSendTestCommandWithEmptyListOfInt8uAndGetAnEmptyListBack_5() { - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseRequest::Type; RequestType request; @@ -30597,7 +30412,9 @@ class TestClusterComplexTypes : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_5(uint8_t status) { ThrowFailureResponse(); } @@ -30611,9 +30428,6 @@ class TestClusterComplexTypes : public TestCommand CHIP_ERROR TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsTrue_6() { - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::TestCluster::Commands::TestListStructArgumentRequest::Type; RequestType request; @@ -30643,7 +30457,9 @@ class TestClusterComplexTypes : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_6(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_6(uint8_t status) { ThrowFailureResponse(); } @@ -30656,9 +30472,6 @@ class TestClusterComplexTypes : public TestCommand CHIP_ERROR TestSendTestCommandWithListOfStructArgumentAndArg1bOfFirstItemIsFalse_7() { - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::TestCluster::Commands::TestListStructArgumentRequest::Type; RequestType request; @@ -30688,7 +30501,9 @@ class TestClusterComplexTypes : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_7(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_7(uint8_t status) { ThrowFailureResponse(); } @@ -30701,9 +30516,6 @@ class TestClusterComplexTypes : public TestCommand CHIP_ERROR TestSendTestCommandWithOptionalArgSet_8() { - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type; RequestType request; @@ -30717,7 +30529,9 @@ class TestClusterComplexTypes : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_8(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_8(uint8_t status) { ThrowFailureResponse(); } @@ -30741,9 +30555,6 @@ class TestClusterComplexTypes : public TestCommand CHIP_ERROR TestSendTestCommandWithoutItsOptionalArg_9() { - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type; RequestType request; @@ -30756,7 +30567,9 @@ class TestClusterComplexTypes : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_9(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_9(uint8_t status) { ThrowFailureResponse(); } @@ -30771,9 +30584,6 @@ class TestClusterComplexTypes : public TestCommand CHIP_ERROR TestSendTestCommandWithOptionalArgSetToNull_10() { - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type; RequestType request; @@ -30787,7 +30597,9 @@ class TestClusterComplexTypes : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_10(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_10(uint8_t status) { ThrowFailureResponse(); } @@ -31521,9 +31333,6 @@ class TestIdentifyCluster : public TestCommand CHIP_ERROR TestSendIdentifyCommandAndExpectSuccessResponse_0() { - chip::Controller::IdentifyClusterTest cluster; - cluster.Associate(mDevice, 0); - using RequestType = chip::app::Clusters::Identify::Commands::Identify::Type; RequestType request; @@ -31536,7 +31345,9 @@ class TestIdentifyCluster : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_0(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 0, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } @@ -31932,9 +31743,6 @@ class TestModeSelectCluster : public TestCommand CHIP_ERROR TestChangeToSupportedMode_5() { - chip::Controller::ModeSelectClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Type; RequestType request; @@ -31947,7 +31755,9 @@ class TestModeSelectCluster : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_5(uint8_t status) { ThrowFailureResponse(); } @@ -31973,9 +31783,6 @@ class TestModeSelectCluster : public TestCommand CHIP_ERROR TestChangeToUnsupportedMode_7() { - chip::Controller::ModeSelectClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Type; RequestType request; @@ -31988,7 +31795,9 @@ class TestModeSelectCluster : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_7(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_7(uint8_t status) { NextTest(); } @@ -32278,9 +32087,6 @@ class TestSubscribe_OnOff : public TestCommand CHIP_ERROR TestSetOnOffAttributeToFalse_0() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -32292,7 +32098,9 @@ class TestSubscribe_OnOff : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_0(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_0(uint8_t status) { ThrowFailureResponse(); } @@ -32344,9 +32152,6 @@ class TestSubscribe_OnOff : public TestCommand CHIP_ERROR TestTurnOnTheLightToSeeAttributeChange_3() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::On::Type; RequestType request; @@ -32358,7 +32163,9 @@ class TestSubscribe_OnOff : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_3(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_3(uint8_t status) { ThrowFailureResponse(); } @@ -32386,9 +32193,6 @@ class TestSubscribe_OnOff : public TestCommand CHIP_ERROR TestTurnOffTheLightToSeeAttributeChange_5() { - chip::Controller::OnOffClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::OnOff::Commands::Off::Type; RequestType request; @@ -32400,7 +32204,9 @@ class TestSubscribe_OnOff : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_5(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_5(uint8_t status) { ThrowFailureResponse(); } diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClustersInvoke.cpp b/zzz_generated/controller-clusters/zap-generated/CHIPClustersInvoke.cpp deleted file mode 100644 index 9f908fa20b91e8..00000000000000 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClustersInvoke.cpp +++ /dev/null @@ -1,969 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -#include "CHIPClusters.h" - -#include -#include - -namespace chip { - -using namespace app::Clusters; -using namespace System; -using namespace Encoding::LittleEndian; - -namespace Controller { - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::AccountLogin::Commands::GetSetupPIN::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::AccountLogin::Commands::Login::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR -ClusterBase::InvokeCommand( - const chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR -ClusterBase::InvokeCommand( - const chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR -ClusterBase::InvokeCommand( - const chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::ApplicationBasic::Commands::ChangeStatus::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::ApplicationLauncher::Commands::LaunchApp::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::AudioOutput::Commands::RenameOutput::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::AudioOutput::Commands::SelectOutput::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::BarrierControl::Commands::BarrierControlGoToPercent::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::BarrierControl::Commands::BarrierControlGoToPercent::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::BarrierControl::Commands::BarrierControlStop::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::Basic::Commands::MfgSpecificPing::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::Binding::Commands::Bind::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::Binding::Commands::Unbind::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::BridgedActions::Commands::DisableAction::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::BridgedActions::Commands::DisableActionWithDuration::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::BridgedActions::Commands::DisableActionWithDuration::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::BridgedActions::Commands::EnableAction::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::BridgedActions::Commands::EnableActionWithDuration::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::BridgedActions::Commands::EnableActionWithDuration::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::BridgedActions::Commands::InstantAction::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::BridgedActions::Commands::InstantActionWithTransition::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::BridgedActions::Commands::InstantActionWithTransition::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::BridgedActions::Commands::PauseAction::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::BridgedActions::Commands::PauseActionWithDuration::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::BridgedActions::Commands::PauseActionWithDuration::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::BridgedActions::Commands::ResumeAction::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::BridgedActions::Commands::StartAction::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::BridgedActions::Commands::StartActionWithDuration::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::BridgedActions::Commands::StartActionWithDuration::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::BridgedActions::Commands::StopAction::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::ColorControl::Commands::ColorLoopSet::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::ColorControl::Commands::EnhancedMoveHue::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHue::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::ColorControl::Commands::EnhancedMoveToHueAndSaturation::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::ColorControl::Commands::EnhancedStepHue::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::ColorControl::Commands::MoveColor::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::ColorControl::Commands::MoveColorTemperature::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::ColorControl::Commands::MoveHue::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::ColorControl::Commands::MoveSaturation::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::ColorControl::Commands::MoveToColor::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::ColorControl::Commands::MoveToColorTemperature::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::ColorControl::Commands::MoveToHue::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::ColorControl::Commands::MoveToHueAndSaturation::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::ColorControl::Commands::MoveToHueAndSaturation::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::ColorControl::Commands::MoveToSaturation::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::ColorControl::Commands::StepColor::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::ColorControl::Commands::StepColorTemperature::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::ColorControl::Commands::StepHue::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::ColorControl::Commands::StepSaturation::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::ColorControl::Commands::StopMoveStep::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::ContentLauncher::Commands::LaunchContent::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::ContentLauncher::Commands::LaunchURL::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsRequest::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::DoorLock::Commands::ClearAllPins::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::DoorLock::Commands::ClearAllRfids::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::DoorLock::Commands::ClearHolidaySchedule::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::DoorLock::Commands::ClearPin::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::DoorLock::Commands::ClearRfid::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::DoorLock::Commands::ClearWeekdaySchedule::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::DoorLock::Commands::ClearYeardaySchedule::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::DoorLock::Commands::GetLogRecord::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::DoorLock::Commands::GetPin::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::DoorLock::Commands::GetRfid::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::DoorLock::Commands::GetUserType::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::DoorLock::Commands::GetWeekdaySchedule::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::DoorLock::Commands::GetYeardaySchedule::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::DoorLock::Commands::LockDoor::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::DoorLock::Commands::SetPin::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::DoorLock::Commands::SetRfid::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::DoorLock::Commands::SetUserType::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::DoorLock::Commands::SetWeekdaySchedule::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::DoorLock::Commands::SetYeardaySchedule::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::DoorLock::Commands::UnlockWithTimeout::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::EthernetNetworkDiagnostics::Commands::ResetCounts::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::EthernetNetworkDiagnostics::Commands::ResetCounts::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafe::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfig::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfig::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::Groups::Commands::AddGroup::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::Groups::Commands::AddGroupIfIdentifying::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::Groups::Commands::GetGroupMembership::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::Groups::Commands::RemoveAllGroups::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::Groups::Commands::RemoveGroup::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::Groups::Commands::ViewGroup::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::Identify::Commands::Identify::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::Identify::Commands::IdentifyQuery::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::Identify::Commands::TriggerEffect::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::KeypadInput::Commands::SendKey::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::LevelControl::Commands::Move::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::LevelControl::Commands::MoveWithOnOff::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::LevelControl::Commands::Step::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::LevelControl::Commands::StepWithOnOff::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::LevelControl::Commands::Stop::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::LevelControl::Commands::StopWithOnOff::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::LowPower::Commands::Sleep::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::MediaInput::Commands::HideInputStatus::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::MediaInput::Commands::RenameInput::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::MediaInput::Commands::SelectInput::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::MediaInput::Commands::ShowInputStatus::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::MediaPlayback::Commands::MediaFastForward::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::MediaPlayback::Commands::MediaNext::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::MediaPlayback::Commands::MediaPause::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::MediaPlayback::Commands::MediaPlay::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::MediaPlayback::Commands::MediaPrevious::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::MediaPlayback::Commands::MediaRewind::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::MediaPlayback::Commands::MediaSeek::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::MediaPlayback::Commands::MediaSkipBackward::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::MediaPlayback::Commands::MediaSkipForward::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::MediaPlayback::Commands::MediaStartOver::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::MediaPlayback::Commands::MediaStop::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::NetworkCommissioning::Commands::AddThreadNetwork::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::NetworkCommissioning::Commands::AddThreadNetwork::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::NetworkCommissioning::Commands::AddWiFiNetwork::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::NetworkCommissioning::Commands::AddWiFiNetwork::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::NetworkCommissioning::Commands::DisableNetwork::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::NetworkCommissioning::Commands::DisableNetwork::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::NetworkCommissioning::Commands::EnableNetwork::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::NetworkCommissioning::Commands::RemoveNetwork::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworks::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::NetworkCommissioning::Commands::UpdateThreadNetwork::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::NetworkCommissioning::Commands::UpdateThreadNetwork::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::NetworkCommissioning::Commands::UpdateWiFiNetwork::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::NetworkCommissioning::Commands::UpdateWiFiNetwork::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImage::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImage::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR -ClusterBase::InvokeCommand( - const chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOtaProvider::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOtaProvider::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::OnOff::Commands::Off::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::OnOff::Commands::OffWithEffect::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::OnOff::Commands::On::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::OnOff::Commands::OnWithRecallGlobalScene::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::OnOff::Commands::Toggle::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::OperationalCredentials::Commands::AddNOC::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR -ClusterBase::InvokeCommand( - const chip::app::Clusters::OperationalCredentials::Commands::AddTrustedRootCertificate::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::OperationalCredentials::Commands::AddTrustedRootCertificate::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::OperationalCredentials::Commands::AttestationRequest::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::OperationalCredentials::Commands::AttestationRequest::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR -ClusterBase::InvokeCommand( - const chip::app::Clusters::OperationalCredentials::Commands::CertificateChainRequest::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::OperationalCredentials::Commands::CertificateChainRequest::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::OperationalCredentials::Commands::OpCSRRequest::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::OperationalCredentials::Commands::OpCSRRequest::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR -ClusterBase::InvokeCommand( - const chip::app::Clusters::OperationalCredentials::Commands::RemoveTrustedRootCertificate::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::OperationalCredentials::Commands::RemoveTrustedRootCertificate::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::OperationalCredentials::Commands::UpdateFabricLabel::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::OperationalCredentials::Commands::UpdateFabricLabel::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::OperationalCredentials::Commands::UpdateNOC::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::Scenes::Commands::AddScene::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::Scenes::Commands::GetSceneMembership::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::Scenes::Commands::RecallScene::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::Scenes::Commands::RemoveAllScenes::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::Scenes::Commands::RemoveScene::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::Scenes::Commands::StoreScene::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::Scenes::Commands::ViewScene::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::SoftwareDiagnostics::Commands::ResetWatermarks::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::SoftwareDiagnostics::Commands::ResetWatermarks::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::TvChannel::Commands::ChangeChannel::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::TvChannel::Commands::ChangeChannelByNumber::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::TvChannel::Commands::SkipChannel::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::TargetNavigator::Commands::NavigateTarget::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::TestCluster::Commands::Test::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::TestCluster::Commands::TestAddArguments::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::TestCluster::Commands::TestEnumsRequest::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::TestCluster::Commands::TestListInt8UArgumentRequest::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::TestCluster::Commands::TestListInt8UArgumentRequest::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseRequest::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::TestCluster::Commands::TestListInt8UReverseRequest::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::TestCluster::Commands::TestListStructArgumentRequest::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::TestCluster::Commands::TestListStructArgumentRequest::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::TestCluster::Commands::TestNotHandled::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::TestCluster::Commands::TestNullableOptionalRequest::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::TestCluster::Commands::TestSpecific::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::TestCluster::Commands::TestStructArgumentRequest::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::TestCluster::Commands::TestStructArgumentRequest::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::TestCluster::Commands::TestUnknownCommand::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::Thermostat::Commands::ClearWeeklySchedule::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::Thermostat::Commands::GetRelayStatusLog::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::Thermostat::Commands::GetWeeklySchedule::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::Thermostat::Commands::SetWeeklySchedule::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::ThreadNetworkDiagnostics::Commands::ResetCounts::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::ThreadNetworkDiagnostics::Commands::ResetCounts::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::WiFiNetworkDiagnostics::Commands::ResetCounts::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::WindowCovering::Commands::DownOrClose::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::WindowCovering::Commands::GoToLiftPercentage::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::WindowCovering::Commands::GoToLiftValue::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::WindowCovering::Commands::GoToTiltPercentage::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::WindowCovering::Commands::GoToTiltValue::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::WindowCovering::Commands::StopMotion::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::WindowCovering::Commands::UpOrOpen::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template -CHIP_ERROR ClusterBase::InvokeCommand(const RequestDataT & requestData, void * context, - CommandResponseSuccessCallback successCb, - CommandResponseFailureCallback failureCb) -{ - VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - - auto onSuccessCb = [context, successCb](const app::ConcreteCommandPath & commandPath, const app::StatusIB & aStatus, - const typename RequestDataT::ResponseType & responseData) { - successCb(context, responseData); - }; - - auto onFailureCb = [context, failureCb](const app::StatusIB & aStatus, CHIP_ERROR aError) { - failureCb(context, app::ToEmberAfStatus(aStatus.mStatus)); - }; - - return InvokeCommandRequest(mDevice->GetExchangeManager(), mDevice->GetSecureSession().Value(), mEndpoint, requestData, - onSuccessCb, onFailureCb); -}; - -} // namespace Controller -} // namespace chip diff --git a/zzz_generated/lighting-app/zap-generated/CHIPClustersInvoke.cpp b/zzz_generated/lighting-app/zap-generated/CHIPClustersInvoke.cpp deleted file mode 100644 index 23dd8f54d065ab..00000000000000 --- a/zzz_generated/lighting-app/zap-generated/CHIPClustersInvoke.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -#include "CHIPClusters.h" - -#include -#include - -namespace chip { - -using namespace app::Clusters; -using namespace System; -using namespace Encoding::LittleEndian; - -namespace Controller { - -template -CHIP_ERROR ClusterBase::InvokeCommand(const RequestDataT & requestData, void * context, - CommandResponseSuccessCallback successCb, - CommandResponseFailureCallback failureCb) -{ - VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - - auto onSuccessCb = [context, successCb](const app::ConcreteCommandPath & commandPath, const app::StatusIB & aStatus, - const typename RequestDataT::ResponseType & responseData) { - successCb(context, responseData); - }; - - auto onFailureCb = [context, failureCb](const app::StatusIB & aStatus, CHIP_ERROR aError) { - failureCb(context, app::ToEmberAfStatus(aStatus.mStatus)); - }; - - return InvokeCommandRequest(mDevice->GetExchangeManager(), mDevice->GetSecureSession().Value(), mEndpoint, requestData, - onSuccessCb, onFailureCb); -}; - -} // namespace Controller -} // namespace chip diff --git a/zzz_generated/lock-app/zap-generated/CHIPClustersInvoke.cpp b/zzz_generated/lock-app/zap-generated/CHIPClustersInvoke.cpp deleted file mode 100644 index 759d13c5028d26..00000000000000 --- a/zzz_generated/lock-app/zap-generated/CHIPClustersInvoke.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP diff --git a/zzz_generated/ota-provider-app/zap-generated/CHIPClustersInvoke.cpp b/zzz_generated/ota-provider-app/zap-generated/CHIPClustersInvoke.cpp deleted file mode 100644 index 759d13c5028d26..00000000000000 --- a/zzz_generated/ota-provider-app/zap-generated/CHIPClustersInvoke.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP diff --git a/zzz_generated/ota-requestor-app/zap-generated/CHIPClustersInvoke.cpp b/zzz_generated/ota-requestor-app/zap-generated/CHIPClustersInvoke.cpp deleted file mode 100644 index e96a465a005b5c..00000000000000 --- a/zzz_generated/ota-requestor-app/zap-generated/CHIPClustersInvoke.cpp +++ /dev/null @@ -1,72 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -#include "CHIPClusters.h" - -#include -#include - -namespace chip { - -using namespace app::Clusters; -using namespace System; -using namespace Encoding::LittleEndian; - -namespace Controller { - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImage::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImage::Type::ResponseType>, - CommandResponseFailureCallback); - -template -CHIP_ERROR ClusterBase::InvokeCommand(const RequestDataT & requestData, void * context, - CommandResponseSuccessCallback successCb, - CommandResponseFailureCallback failureCb) -{ - VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - - auto onSuccessCb = [context, successCb](const app::ConcreteCommandPath & commandPath, const app::StatusIB & aStatus, - const typename RequestDataT::ResponseType & responseData) { - successCb(context, responseData); - }; - - auto onFailureCb = [context, failureCb](const app::StatusIB & aStatus, CHIP_ERROR aError) { - failureCb(context, app::ToEmberAfStatus(aStatus.mStatus)); - }; - - return InvokeCommandRequest(mDevice->GetExchangeManager(), mDevice->GetSecureSession().Value(), mEndpoint, requestData, - onSuccessCb, onFailureCb); -}; - -} // namespace Controller -} // namespace chip diff --git a/zzz_generated/pump-app/zap-generated/CHIPClustersInvoke.cpp b/zzz_generated/pump-app/zap-generated/CHIPClustersInvoke.cpp deleted file mode 100644 index 23dd8f54d065ab..00000000000000 --- a/zzz_generated/pump-app/zap-generated/CHIPClustersInvoke.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -#include "CHIPClusters.h" - -#include -#include - -namespace chip { - -using namespace app::Clusters; -using namespace System; -using namespace Encoding::LittleEndian; - -namespace Controller { - -template -CHIP_ERROR ClusterBase::InvokeCommand(const RequestDataT & requestData, void * context, - CommandResponseSuccessCallback successCb, - CommandResponseFailureCallback failureCb) -{ - VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - - auto onSuccessCb = [context, successCb](const app::ConcreteCommandPath & commandPath, const app::StatusIB & aStatus, - const typename RequestDataT::ResponseType & responseData) { - successCb(context, responseData); - }; - - auto onFailureCb = [context, failureCb](const app::StatusIB & aStatus, CHIP_ERROR aError) { - failureCb(context, app::ToEmberAfStatus(aStatus.mStatus)); - }; - - return InvokeCommandRequest(mDevice->GetExchangeManager(), mDevice->GetSecureSession().Value(), mEndpoint, requestData, - onSuccessCb, onFailureCb); -}; - -} // namespace Controller -} // namespace chip diff --git a/zzz_generated/pump-controller-app/zap-generated/CHIPClustersInvoke.cpp b/zzz_generated/pump-controller-app/zap-generated/CHIPClustersInvoke.cpp deleted file mode 100644 index fa2d919cc3bd87..00000000000000 --- a/zzz_generated/pump-controller-app/zap-generated/CHIPClustersInvoke.cpp +++ /dev/null @@ -1,109 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -#include "CHIPClusters.h" - -#include -#include - -namespace chip { - -using namespace app::Clusters; -using namespace System; -using namespace Encoding::LittleEndian; - -namespace Controller { - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::LevelControl::Commands::Move::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::LevelControl::Commands::MoveWithOnOff::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::LevelControl::Commands::Step::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::LevelControl::Commands::StepWithOnOff::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::LevelControl::Commands::Stop::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::LevelControl::Commands::StopWithOnOff::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::OnOff::Commands::Off::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::OnOff::Commands::On::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::OnOff::Commands::Toggle::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template -CHIP_ERROR ClusterBase::InvokeCommand(const RequestDataT & requestData, void * context, - CommandResponseSuccessCallback successCb, - CommandResponseFailureCallback failureCb) -{ - VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - - auto onSuccessCb = [context, successCb](const app::ConcreteCommandPath & commandPath, const app::StatusIB & aStatus, - const typename RequestDataT::ResponseType & responseData) { - successCb(context, responseData); - }; - - auto onFailureCb = [context, failureCb](const app::StatusIB & aStatus, CHIP_ERROR aError) { - failureCb(context, app::ToEmberAfStatus(aStatus.mStatus)); - }; - - return InvokeCommandRequest(mDevice->GetExchangeManager(), mDevice->GetSecureSession().Value(), mEndpoint, requestData, - onSuccessCb, onFailureCb); -}; - -} // namespace Controller -} // namespace chip diff --git a/zzz_generated/temperature-measurement-app/zap-generated/CHIPClustersInvoke.cpp b/zzz_generated/temperature-measurement-app/zap-generated/CHIPClustersInvoke.cpp deleted file mode 100644 index 759d13c5028d26..00000000000000 --- a/zzz_generated/temperature-measurement-app/zap-generated/CHIPClustersInvoke.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP diff --git a/zzz_generated/thermostat/zap-generated/CHIPClustersInvoke.cpp b/zzz_generated/thermostat/zap-generated/CHIPClustersInvoke.cpp deleted file mode 100644 index 0ccec23a26e1e6..00000000000000 --- a/zzz_generated/thermostat/zap-generated/CHIPClustersInvoke.cpp +++ /dev/null @@ -1,64 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -#include "CHIPClusters.h" - -#include -#include - -namespace chip { - -using namespace app::Clusters; -using namespace System; -using namespace Encoding::LittleEndian; - -namespace Controller { - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::Identify::Commands::Identify::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::Identify::Commands::IdentifyQuery::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template -CHIP_ERROR ClusterBase::InvokeCommand(const RequestDataT & requestData, void * context, - CommandResponseSuccessCallback successCb, - CommandResponseFailureCallback failureCb) -{ - VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - - auto onSuccessCb = [context, successCb](const app::ConcreteCommandPath & commandPath, const app::StatusIB & aStatus, - const typename RequestDataT::ResponseType & responseData) { - successCb(context, responseData); - }; - - auto onFailureCb = [context, failureCb](const app::StatusIB & aStatus, CHIP_ERROR aError) { - failureCb(context, app::ToEmberAfStatus(aStatus.mStatus)); - }; - - return InvokeCommandRequest(mDevice->GetExchangeManager(), mDevice->GetSecureSession().Value(), mEndpoint, requestData, - onSuccessCb, onFailureCb); -}; - -} // namespace Controller -} // namespace chip diff --git a/zzz_generated/tv-app/zap-generated/CHIPClustersInvoke.cpp b/zzz_generated/tv-app/zap-generated/CHIPClustersInvoke.cpp deleted file mode 100644 index ff7b2aa7d9afe5..00000000000000 --- a/zzz_generated/tv-app/zap-generated/CHIPClustersInvoke.cpp +++ /dev/null @@ -1,135 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP - -#include "CHIPClusters.h" - -#include -#include - -namespace chip { - -using namespace app::Clusters; -using namespace System; -using namespace Encoding::LittleEndian; - -namespace Controller { - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafe::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfig::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfig::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::NetworkCommissioning::Commands::DisableNetwork::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::NetworkCommissioning::Commands::DisableNetwork::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::NetworkCommissioning::Commands::EnableNetwork::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::NetworkCommissioning::Commands::RemoveNetwork::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworks::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::OperationalCredentials::Commands::AddNOC::Type &, void *, - CommandResponseSuccessCallback, - CommandResponseFailureCallback); - -template CHIP_ERROR -ClusterBase::InvokeCommand( - const chip::app::Clusters::OperationalCredentials::Commands::AddTrustedRootCertificate::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::OperationalCredentials::Commands::AddTrustedRootCertificate::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::OperationalCredentials::Commands::AttestationRequest::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::OperationalCredentials::Commands::AttestationRequest::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR -ClusterBase::InvokeCommand( - const chip::app::Clusters::OperationalCredentials::Commands::CertificateChainRequest::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::OperationalCredentials::Commands::CertificateChainRequest::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::OperationalCredentials::Commands::OpCSRRequest::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::OperationalCredentials::Commands::OpCSRRequest::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type::ResponseType>, - CommandResponseFailureCallback); - -template CHIP_ERROR ClusterBase::InvokeCommand( - const chip::app::Clusters::OperationalCredentials::Commands::UpdateFabricLabel::Type &, void *, - CommandResponseSuccessCallback< - typename chip::app::Clusters::OperationalCredentials::Commands::UpdateFabricLabel::Type::ResponseType>, - CommandResponseFailureCallback); - -template -CHIP_ERROR ClusterBase::InvokeCommand(const RequestDataT & requestData, void * context, - CommandResponseSuccessCallback successCb, - CommandResponseFailureCallback failureCb) -{ - VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - - auto onSuccessCb = [context, successCb](const app::ConcreteCommandPath & commandPath, const app::StatusIB & aStatus, - const typename RequestDataT::ResponseType & responseData) { - successCb(context, responseData); - }; - - auto onFailureCb = [context, failureCb](const app::StatusIB & aStatus, CHIP_ERROR aError) { - failureCb(context, app::ToEmberAfStatus(aStatus.mStatus)); - }; - - return InvokeCommandRequest(mDevice->GetExchangeManager(), mDevice->GetSecureSession().Value(), mEndpoint, requestData, - onSuccessCb, onFailureCb); -}; - -} // namespace Controller -} // namespace chip diff --git a/zzz_generated/tv-casting-app/zap-generated/CHIPClustersInvoke.cpp b/zzz_generated/tv-casting-app/zap-generated/CHIPClustersInvoke.cpp deleted file mode 100644 index 759d13c5028d26..00000000000000 --- a/zzz_generated/tv-casting-app/zap-generated/CHIPClustersInvoke.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP diff --git a/zzz_generated/window-app/zap-generated/CHIPClustersInvoke.cpp b/zzz_generated/window-app/zap-generated/CHIPClustersInvoke.cpp deleted file mode 100644 index 759d13c5028d26..00000000000000 --- a/zzz_generated/window-app/zap-generated/CHIPClustersInvoke.cpp +++ /dev/null @@ -1,18 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// THIS FILE IS GENERATED BY ZAP