From 14091379dec1e7a31bf528d383990b9532c24b53 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 11 Nov 2021 18:38:43 -0500 Subject: [PATCH] Faster chip-tool builds. (#11699) 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 fa8c67c090012c..10741799f6e8a6 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 081d8a42148cd3..dd3f54bf834010 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 @@ -4046,9 +4047,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: @@ -4072,9 +4072,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: @@ -4143,9 +4141,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: @@ -4173,9 +4169,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: @@ -4194,9 +4188,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: @@ -4271,9 +4263,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: @@ -4583,9 +4573,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: @@ -4759,9 +4748,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: @@ -4784,9 +4771,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: @@ -4927,9 +4912,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: @@ -4948,9 +4931,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: @@ -5167,9 +5148,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: @@ -6269,9 +6248,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: @@ -6297,9 +6274,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: @@ -6511,9 +6486,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: @@ -6538,9 +6511,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: @@ -6564,9 +6535,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: @@ -6591,9 +6560,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: @@ -6617,9 +6584,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: @@ -6644,9 +6609,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: @@ -6670,9 +6633,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: @@ -6697,9 +6658,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: @@ -6723,9 +6682,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: @@ -6749,9 +6706,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: @@ -6776,9 +6731,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: @@ -6802,9 +6755,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: @@ -7621,9 +7572,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: @@ -7650,9 +7599,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: @@ -7680,9 +7627,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: @@ -7709,9 +7654,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: @@ -7739,9 +7682,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: @@ -7767,9 +7708,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: @@ -7798,9 +7737,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: @@ -7827,9 +7764,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: @@ -7856,9 +7791,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: @@ -7885,9 +7818,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: @@ -7913,9 +7844,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: @@ -7943,9 +7872,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: @@ -7972,9 +7899,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: @@ -8000,9 +7925,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: @@ -8029,9 +7952,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: @@ -8061,9 +7982,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: @@ -8091,9 +8010,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: @@ -8121,9 +8038,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: @@ -8147,9 +8062,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: @@ -10679,9 +10592,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: @@ -10705,9 +10617,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: @@ -11030,9 +10941,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: @@ -11086,9 +10996,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: @@ -11107,9 +11016,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: @@ -11132,9 +11040,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: @@ -11157,9 +11064,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: @@ -11182,9 +11088,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: @@ -11208,9 +11113,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: @@ -11234,9 +11138,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: @@ -11259,9 +11162,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: @@ -11284,9 +11186,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: @@ -11309,9 +11210,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: @@ -11334,9 +11234,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: @@ -11359,9 +11258,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: @@ -11385,9 +11283,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: @@ -11411,9 +11308,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: @@ -11436,9 +11332,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: @@ -11464,9 +11359,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: @@ -11494,9 +11388,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: @@ -11524,9 +11417,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: @@ -11551,9 +11443,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: @@ -11584,9 +11475,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: @@ -11612,9 +11502,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: @@ -11637,9 +11526,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: @@ -11663,9 +11551,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: @@ -12319,9 +12206,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: @@ -12961,9 +12846,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: @@ -12982,9 +12866,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: @@ -13011,9 +12894,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: @@ -13523,9 +13405,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: @@ -13549,9 +13430,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: @@ -13575,9 +13454,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: @@ -13596,9 +13474,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: @@ -13621,9 +13497,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: @@ -13646,9 +13521,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: @@ -13753,9 +13627,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: @@ -13774,9 +13646,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: @@ -13802,9 +13673,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: @@ -14243,9 +14112,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: @@ -14337,9 +14205,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: @@ -14365,9 +14231,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: @@ -14391,9 +14255,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: @@ -14418,9 +14280,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: @@ -14448,9 +14308,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: @@ -14476,9 +14334,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: @@ -14502,9 +14358,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: @@ -14523,9 +14377,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: @@ -15347,9 +15199,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: @@ -15417,9 +15267,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: @@ -15443,9 +15291,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: @@ -15468,9 +15314,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: @@ -15489,9 +15333,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: @@ -15641,9 +15483,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: @@ -15662,9 +15503,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: @@ -15683,9 +15523,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: @@ -15704,9 +15543,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: @@ -15725,9 +15563,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: @@ -15746,9 +15583,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: @@ -15771,9 +15607,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: @@ -15796,9 +15631,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: @@ -15821,9 +15655,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: @@ -15842,9 +15675,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: @@ -15863,9 +15695,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: @@ -16209,9 +16040,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: @@ -16544,9 +16373,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: @@ -16572,9 +16400,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: @@ -16599,9 +16426,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: @@ -16626,9 +16452,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: @@ -16653,9 +16478,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: @@ -16680,9 +16504,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: @@ -16707,9 +16530,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: @@ -16735,9 +16557,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: @@ -16841,9 +16662,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: @@ -16867,9 +16687,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: @@ -16899,9 +16717,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: @@ -16975,9 +16792,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: @@ -17352,9 +17167,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: @@ -17380,9 +17193,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: @@ -17401,9 +17212,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: @@ -17422,9 +17231,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: @@ -17450,9 +17257,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: @@ -17471,9 +17276,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: @@ -18058,9 +17861,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: @@ -18083,9 +17885,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: @@ -18108,9 +17908,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: @@ -18133,9 +17932,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: @@ -18158,9 +17956,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: @@ -18183,9 +17980,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: @@ -18208,9 +18004,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: @@ -18233,9 +18027,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: @@ -18259,9 +18052,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: @@ -20414,9 +20206,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: @@ -20439,9 +20230,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: @@ -20466,9 +20256,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: @@ -20491,9 +20279,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: @@ -20517,9 +20304,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: @@ -20543,9 +20329,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: @@ -20569,9 +20354,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: @@ -20807,9 +20591,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: @@ -21218,9 +21000,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: @@ -21244,9 +21025,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: @@ -21269,9 +21048,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: @@ -21443,9 +21220,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: @@ -21867,9 +21643,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: @@ -21893,9 +21667,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: @@ -21919,9 +21692,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: @@ -21944,9 +21716,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: @@ -21969,9 +21740,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: @@ -21994,9 +21764,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: @@ -22015,9 +21784,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: @@ -22040,9 +21807,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: @@ -22061,9 +21827,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: @@ -22086,9 +21851,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: @@ -22107,9 +21871,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: @@ -23874,9 +23636,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: @@ -23895,9 +23655,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: @@ -23924,9 +23682,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: @@ -23956,9 +23712,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: @@ -23982,9 +23736,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: @@ -25319,9 +25071,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: @@ -27622,9 +27372,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: @@ -28154,9 +27902,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: @@ -28180,9 +27926,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: @@ -28205,9 +27949,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: @@ -28231,9 +27973,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: @@ -28256,9 +27996,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: @@ -28277,9 +28015,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: @@ -28298,9 +28034,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 0ef3913f356ec8..ca18821777e7e5 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(); } @@ -26086,9 +25923,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; @@ -26102,7 +25936,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(); } @@ -26111,9 +25947,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; @@ -26126,7 +25959,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(); } @@ -26187,9 +26022,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; @@ -26201,7 +26033,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(); } @@ -26337,9 +26171,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; @@ -26352,7 +26183,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(); } @@ -26378,9 +26211,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; @@ -26392,7 +26222,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(); } @@ -26401,9 +26233,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; @@ -26415,7 +26244,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(); } @@ -26424,9 +26255,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; @@ -26440,7 +26268,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(); } @@ -28080,9 +27910,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; @@ -28094,7 +27921,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(); } @@ -28103,9 +27932,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; @@ -28117,7 +27943,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(); } @@ -28126,9 +27954,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; @@ -28140,7 +27965,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(); } @@ -28153,9 +27980,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; @@ -28169,7 +27993,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(); } @@ -28182,9 +28008,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; @@ -28198,7 +28021,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(); } @@ -30235,9 +30060,6 @@ class TestCluster : public TestCommand CHIP_ERROR TestSendTestCommandToUnsupportedEndpoint_123() { - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevice, 200); - using RequestType = chip::app::Clusters::TestCluster::Commands::Test::Type; RequestType request; @@ -30249,7 +30071,9 @@ class TestCluster : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_123(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 200, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_123(uint8_t status) { NextTest(); } @@ -30324,9 +30148,6 @@ class TestCluster : public TestCommand CHIP_ERROR TestSendACommandWithAVendorIdAndEnum_128() { - chip::Controller::TestClusterClusterTest cluster; - cluster.Associate(mDevice, 1); - using RequestType = chip::app::Clusters::TestCluster::Commands::TestEnumsRequest::Type; RequestType request; @@ -30340,7 +30161,9 @@ class TestCluster : public TestCommand auto failure = [](void * context, EmberAfStatus status) { (static_cast(context))->OnFailureResponse_128(status); }; - return cluster.InvokeCommand(request, this, success, failure); + + ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevice, this, success, failure, 1, request)); + return CHIP_NO_ERROR; } void OnFailureResponse_128(uint8_t status) { ThrowFailureResponse(); } @@ -30451,9 +30274,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; @@ -30472,7 +30292,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(); } @@ -30485,9 +30307,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; @@ -30506,7 +30325,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(); } @@ -30519,9 +30340,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; @@ -30545,7 +30363,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(); } @@ -30558,9 +30378,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; @@ -30585,7 +30402,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(); } @@ -30598,9 +30417,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; @@ -30624,7 +30440,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(); } @@ -30656,9 +30474,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; @@ -30672,7 +30487,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(); } @@ -30686,9 +30503,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; @@ -30718,7 +30532,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(); } @@ -30731,9 +30547,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; @@ -30763,7 +30576,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(); } @@ -30776,9 +30591,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; @@ -30792,7 +30604,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(); } @@ -30816,9 +30630,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; @@ -30831,7 +30642,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(); } @@ -30846,9 +30659,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; @@ -30862,7 +30672,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(); } @@ -31596,9 +31408,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; @@ -31611,7 +31420,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(); } @@ -32007,9 +31818,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; @@ -32022,7 +31830,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(); } @@ -32048,9 +31858,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; @@ -32063,7 +31870,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(); } @@ -32353,9 +32162,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; @@ -32367,7 +32173,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(); } @@ -32419,9 +32227,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; @@ -32433,7 +32238,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(); } @@ -32461,9 +32268,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; @@ -32475,7 +32279,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