diff --git a/examples/chip-tool/BUILD.gn b/examples/chip-tool/BUILD.gn index 0ac0324703f36a..0d5925b976ae57 100644 --- a/examples/chip-tool/BUILD.gn +++ b/examples/chip-tool/BUILD.gn @@ -45,7 +45,6 @@ executable("chip-tool") { "commands/pairing/PairingCommand.cpp", "commands/payload/AdditionalDataParseCommand.cpp", "commands/payload/SetupPayloadParseCommand.cpp", - "commands/reporting/ReportingCommand.cpp", "commands/tests/TestCommand.cpp", "config/PersistentStorage.cpp", "main.cpp", diff --git a/examples/chip-tool/commands/reporting/ReportingCommand.cpp b/examples/chip-tool/commands/reporting/ReportingCommand.cpp deleted file mode 100644 index 7e627f4ba2a1b3..00000000000000 --- a/examples/chip-tool/commands/reporting/ReportingCommand.cpp +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (c) 2020 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. - * - */ - -#include "ReportingCommand.h" - -#include "../common/Commands.h" -#include -#include - -using namespace ::chip; - -CHIP_ERROR ReportingCommand::RunCommand() -{ - CHIP_ERROR err = - CurrentCommissioner().GetConnectedDevice(mNodeId, &mOnDeviceConnectedCallback, &mOnDeviceConnectionFailureCallback); - VerifyOrExit( - err == CHIP_NO_ERROR, - ChipLogError(chipTool, "Failed in initiating connection to the device: %" PRIu64 ", error %s", mNodeId, ErrorStr(err))); - -exit: - return err; -} - -void ReportingCommand::OnDeviceConnectedFn(void * context, chip::OperationalDeviceProxy * device) -{ - ReportingCommand * command = reinterpret_cast(context); - VerifyOrReturn(command != nullptr, - ChipLogError(chipTool, "Device connected, but cannot send the command, as the context is null")); - - chip::Controller::BasicCluster cluster; - cluster.Associate(device, command->mEndPointId); - - command->AddReportCallbacks(command->mNodeId, command->mEndPointId); - - CHIP_ERROR err = cluster.MfgSpecificPing(nullptr, nullptr); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Controller, "Init failure! Ping failure: %s", ErrorStr(err)); - command->SetCommandExitStatus(err); - } -} - -void ReportingCommand::OnDeviceConnectionFailureFn(void * context, NodeId deviceId, CHIP_ERROR err) -{ - ChipLogError(chipTool, "Failed in connecting to the device %" PRIu64 ". Error %s", deviceId, ErrorStr(err)); - - ReportingCommand * command = reinterpret_cast(context); - VerifyOrReturn(command != nullptr, ChipLogError(chipTool, "ReportingCommand context is null")); - command->SetCommandExitStatus(err); -} diff --git a/examples/chip-tool/commands/reporting/ReportingCommand.h b/examples/chip-tool/commands/reporting/ReportingCommand.h deleted file mode 100644 index 609e11daf602ba..00000000000000 --- a/examples/chip-tool/commands/reporting/ReportingCommand.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * 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 "../../config/PersistentStorage.h" -#include "../common/CHIPCommand.h" - -class ReportingCommand : public CHIPCommand -{ -public: - ReportingCommand(const char * commandName) : - CHIPCommand(commandName), mOnDeviceConnectedCallback(OnDeviceConnectedFn, this), - mOnDeviceConnectionFailureCallback(OnDeviceConnectionFailureFn, this) - { - AddArgument("node-id", 0, UINT64_MAX, &mNodeId); - AddArgument("endpoint-id", CHIP_ZCL_ENDPOINT_MIN, CHIP_ZCL_ENDPOINT_MAX, &mEndPointId); - } - - /////////// CHIPCommand Interface ///////// - CHIP_ERROR RunCommand() override; - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(UINT16_MAX); } - - virtual void AddReportCallbacks(NodeId remoteId, uint8_t endPointId) = 0; - -private: - NodeId mNodeId; - uint8_t mEndPointId; - - static void OnDeviceConnectedFn(void * context, chip::OperationalDeviceProxy * device); - static void OnDeviceConnectionFailureFn(void * context, NodeId deviceId, CHIP_ERROR error); - - chip::Callback::Callback mOnDeviceConnectedCallback; - chip::Callback::Callback mOnDeviceConnectionFailureCallback; -}; diff --git a/examples/chip-tool/main.cpp b/examples/chip-tool/main.cpp index c767020c72d160..bbf11968b00404 100644 --- a/examples/chip-tool/main.cpp +++ b/examples/chip-tool/main.cpp @@ -23,7 +23,6 @@ #include "commands/payload/Commands.h" #include -#include #include // ================================================================================ @@ -35,7 +34,6 @@ int main(int argc, char * argv[]) registerCommandsDiscover(commands); registerCommandsPayload(commands); registerCommandsPairing(commands); - registerCommandsReporting(commands); registerCommandsTests(commands); registerClusters(commands); diff --git a/examples/chip-tool/templates/reporting-commands.zapt b/examples/chip-tool/templates/reporting-commands.zapt deleted file mode 100644 index a0d10f149d49a4..00000000000000 --- a/examples/chip-tool/templates/reporting-commands.zapt +++ /dev/null @@ -1,71 +0,0 @@ -{{> header}} - -#pragma once - -#include -#include "../cluster/Commands.h" // For the LogValue bits and read callbacks - -typedef void (*UnsupportedAttributeCallback)(void * context); - -class Listen : public ReportingCommand -{ -public: - Listen() : ReportingCommand("listen") - { - } - - ~Listen() - { -{{#chip_client_clusters}} -{{#chip_server_cluster_attributes}} -{{#if isReportableAttribute}} -{{#unless isList}} -{{#unless (isStrEqual chipCallback.name "Unsupported")}} - delete onReport{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}Callback; -{{/unless}} -{{/unless}} -{{/if}} -{{/chip_server_cluster_attributes}} -{{/chip_client_clusters}} - } - - void AddReportCallbacks(NodeId remoteId, uint8_t endpointId) override - { - chip::app::CHIPDeviceCallbacksMgr & callbacksMgr = chip::app::CHIPDeviceCallbacksMgr::GetInstance(); -{{#chip_client_clusters}} -{{#chip_server_cluster_attributes}} -{{#if isReportableAttribute}} -{{#unless isList}} -{{#unless (isStrEqual chipCallback.name "Unsupported")}} - callbacksMgr.AddReportCallback(remoteId, endpointId, {{asHex parent.code 4}}, {{asHex code 4}}, onReport{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}Callback->Cancel(), BasicAttributeFilter<{{chipCallback.name}}AttributeCallback>); -{{/unless}} -{{/unless}} -{{/if}} -{{/chip_server_cluster_attributes}} -{{/chip_client_clusters}} - } - -private: -{{#chip_client_clusters}} -{{#chip_server_cluster_attributes}} -{{#if isReportableAttribute}} -{{#unless isList}} -{{#unless (isStrEqual chipCallback.name "Unsupported")}} - chip::Callback::Callback * onReport{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}Callback = new chip::Callback::Callback(Read{{asUpperCamelCase parent.name}}{{asUpperCamelCase name}}::OnAttributeResponse, this); - {{/unless}} -{{/unless}} -{{/if}} -{{/chip_server_cluster_attributes}} -{{/chip_client_clusters}} -}; - -void registerCommandsReporting(Commands & commands) -{ - const char * clusterName = "Reporting"; - - commands_list clusterCommands = { - make_unique(), - }; - - commands.Register(clusterName, clusterCommands); -} diff --git a/examples/chip-tool/templates/templates.json b/examples/chip-tool/templates/templates.json index 17afafd04192de..e56bcf9f99c1f5 100644 --- a/examples/chip-tool/templates/templates.json +++ b/examples/chip-tool/templates/templates.json @@ -43,11 +43,6 @@ "name": "Cluster Commands header", "output": "cluster/Commands.h" }, - { - "path": "reporting-commands.zapt", - "name": "Reporting Commands header", - "output": "reporting/Commands.h" - }, { "path": "tests-commands.zapt", "name": "Tests Commands header", diff --git a/src/app/DeviceControllerInteractionModelDelegate.h b/src/app/DeviceControllerInteractionModelDelegate.h index 91301bb9fed637..5e5c2f980a1d90 100644 --- a/src/app/DeviceControllerInteractionModelDelegate.h +++ b/src/app/DeviceControllerInteractionModelDelegate.h @@ -17,15 +17,12 @@ namespace Controller { * * TODO:(#8967) Implementation of CommandSender::Callback should be removed after switching to ClusterObjects. */ -class DeviceControllerInteractionModelDelegate : public chip::app::ReadClient::Callback, - public chip::app::CommandSender::Callback, +class DeviceControllerInteractionModelDelegate : public chip::app::CommandSender::Callback, public chip::app::WriteClient::Callback, public chip::app::InteractionModelDelegate { public: - DeviceControllerInteractionModelDelegate() : mBufferedReadAdapter(*this) {} - - app::BufferedReadCallback & GetBufferedCallback() { return mBufferedReadAdapter; } + DeviceControllerInteractionModelDelegate() {} void OnResponse(app::CommandSender * apCommandSender, const app::ConcreteCommandPath & aPath, const chip::app::StatusIB & aStatus, TLV::TLVReader * aData) override @@ -72,83 +69,6 @@ class DeviceControllerInteractionModelDelegate : public chip::app::ReadClient::C } void OnDone(app::WriteClient * apWriteClient) override {} - - void OnEventData(const app::ReadClient * apReadClient, const app::EventHeader & aEventHeader, TLV::TLVReader * apData, - const app::StatusIB * apStatus) override - {} - - void OnAttributeData(const app::ReadClient * apReadClient, const app::ConcreteDataAttributePath & aPath, - TLV::TLVReader * apData, const app::StatusIB & aStatus) override - { - // - // We shouldn't be getting list item operations in the provided path since that should be handled by the buffered read - // callback. If we do, that's a bug. - // - VerifyOrDie(!aPath.IsListItemOperation()); - - IMReadReportAttributesResponseCallback(apReadClient, &aPath, apData, aStatus.mStatus); - } - - void OnSubscriptionEstablished(const app::ReadClient * apReadClient) override - { - IMSubscribeResponseCallback(apReadClient, EMBER_ZCL_STATUS_SUCCESS); - } - - void OnError(const app::ReadClient * apReadClient, CHIP_ERROR aError) override - { - app::ClusterInfo path; - path.mNodeId = apReadClient->GetPeerNodeId(); - IMReadReportAttributesResponseCallback(apReadClient, nullptr, nullptr, Protocols::InteractionModel::Status::Failure); - } - - void OnDone(app::ReadClient * apReadClient) override - { - if (apReadClient->IsSubscriptionType()) - { - this->FreeAttributePathParam(reinterpret_cast(apReadClient)); - } - } - - // TODO: FreeAttributePathParam and AllocateAttributePathParam are used by CHIPDevice.cpp for getting a long-live attribute path - // object. - void FreeAttributePathParam(uint64_t applicationId) - { - for (auto & item : mAttributePathTransactionMapPool) - { - if (item.ApplicationId == applicationId) - { - item.ApplicationId = UINT64_MAX; - } - } - } - - // TODO: We only support allocating one path, should support multiple path later. - app::AttributePathParams * AllocateAttributePathParam(size_t n, uint64_t applicationId) - { - if (n > 1) - { - return nullptr; - } - for (auto & item : mAttributePathTransactionMapPool) - { - if (item.ApplicationId == UINT64_MAX) - { - item.ApplicationId = applicationId; - return &item.Params; - } - } - return nullptr; - } - -private: - struct AttributePathTransactionMap - { - uint64_t ApplicationId = UINT64_MAX; - app::AttributePathParams Params; - }; - - app::BufferedReadCallback mBufferedReadAdapter; - AttributePathTransactionMap mAttributePathTransactionMapPool[CHIP_DEVICE_CONTROLLER_SUBSCRIPTION_ATTRIBUTE_PATH_POOL_SIZE]; }; } // namespace Controller diff --git a/src/app/DeviceProxy.cpp b/src/app/DeviceProxy.cpp index 66167ee18b0bd3..0e374cff5bc385 100644 --- a/src/app/DeviceProxy.cpp +++ b/src/app/DeviceProxy.cpp @@ -68,55 +68,6 @@ void DeviceProxy::CancelIMResponseHandler(void * commandObj) mCallbacksMgr.CancelResponseCallback(transactionId, 0 /* seqNum, always 0 for IM before #6559 */); } -void DeviceProxy::AddReportHandler(EndpointId endpoint, ClusterId cluster, AttributeId attribute, - Callback::Cancelable * onReportCallback, app::TLVDataFilter tlvDataFilter) -{ - mCallbacksMgr.AddReportCallback(GetDeviceId(), endpoint, cluster, attribute, onReportCallback, tlvDataFilter); -} - -CHIP_ERROR DeviceProxy::SendSubscribeAttributeRequest(app::AttributePathParams aPath, uint16_t mMinIntervalFloorSeconds, - uint16_t mMaxIntervalCeilingSeconds, Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) -{ - VerifyOrReturnLogError(IsSecureConnected(), CHIP_ERROR_INCORRECT_STATE); - - uint8_t seqNum = GetNextSequenceNumber(); - - app::AttributePathParams * path = GetInteractionModelDelegate()->AllocateAttributePathParam(1, seqNum); - - VerifyOrReturnError(path != nullptr, CHIP_ERROR_NO_MEMORY); - - *path = aPath; - - app::ReadClient * readClient = nullptr; - ReturnErrorOnFailure(chip::app::InteractionModelEngine::GetInstance()->NewReadClient( - &readClient, app::ReadClient::InteractionType::Subscribe, &GetInteractionModelDelegate()->GetBufferedCallback())); - - // The application context is used to identify different requests from client application the type of it is intptr_t, here we - // use the seqNum. - VerifyOrReturnError(GetSecureSession().HasValue(), CHIP_ERROR_INCORRECT_STATE); - app::ReadPrepareParams params(GetSecureSession().Value()); - params.mpAttributePathParamsList = path; - params.mAttributePathParamsListSize = 1; - params.mMinIntervalFloorSeconds = mMinIntervalFloorSeconds; - params.mMaxIntervalCeilingSeconds = mMaxIntervalCeilingSeconds; - params.mKeepSubscriptions = false; - - CHIP_ERROR err = readClient->SendRequest(params); - if (err != CHIP_NO_ERROR) - { - GetInteractionModelDelegate()->FreeAttributePathParam(reinterpret_cast(readClient)); - readClient->Shutdown(); - return err; - } - - if (onSuccessCallback != nullptr || onFailureCallback != nullptr) - { - AddIMResponseHandler(readClient, onSuccessCallback, onFailureCallback); - } - return CHIP_NO_ERROR; -} - CHIP_ERROR DeviceProxy::SendWriteAttributeRequest(app::WriteClientHandle aHandle, Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { diff --git a/src/app/DeviceProxy.h b/src/app/DeviceProxy.h index 15378279cf3ddb..50684140aabb54 100644 --- a/src/app/DeviceProxy.h +++ b/src/app/DeviceProxy.h @@ -51,9 +51,6 @@ class DLL_EXPORT DeviceProxy virtual bool GetAddress(Inet::IPAddress & addr, uint16_t & port) const { return false; } - virtual CHIP_ERROR SendSubscribeAttributeRequest(app::AttributePathParams aPath, uint16_t mMinIntervalFloorSeconds, - uint16_t mMaxIntervalCeilingSeconds, Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback); virtual CHIP_ERROR ShutdownSubscriptions() { return CHIP_ERROR_NOT_IMPLEMENTED; } virtual CHIP_ERROR SendWriteAttributeRequest(app::WriteClientHandle aHandle, Callback::Cancelable * onSuccessCallback, @@ -61,9 +58,6 @@ class DLL_EXPORT DeviceProxy virtual CHIP_ERROR SendCommands(app::CommandSender * commandObj); - virtual void AddReportHandler(EndpointId endpoint, ClusterId cluster, AttributeId attribute, - Callback::Cancelable * onReportCallback, app::TLVDataFilter tlvDataFilter); - // Interaction model uses the object and callback interface instead of sequence number to mark different transactions. virtual void AddIMResponseHandler(void * commandObj, Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, app::TLVDataFilter tlvDataFilter = nullptr); diff --git a/src/app/tests/TestCHIPDeviceCallbacksMgr.cpp b/src/app/tests/TestCHIPDeviceCallbacksMgr.cpp index 52b43c1cb19203..a500d79befae11 100644 --- a/src/app/tests/TestCHIPDeviceCallbacksMgr.cpp +++ b/src/app/tests/TestCHIPDeviceCallbacksMgr.cpp @@ -292,149 +292,6 @@ void ShouldFailGetCanceledResponseCallback(nlTestSuite * testSuite, void * apCon } } -void ShouldGetSingleReportCallback(nlTestSuite * testSuite, void * apContext) -{ - auto & callbacks = CHIPDeviceCallbacksMgr::GetInstance(); - - static constexpr NodeId kTestNodeId = 0x9b3780f93739918d; - static constexpr EndpointId kTestEndpointId = 0x20; - static constexpr ClusterId kTestClusterId = 0x9103; - static constexpr AttributeId kTestAttributeId = 0x2232; - - struct CallbackContext - { - nlTestSuite * const testSuite; - } callbackContext = { testSuite }; - - const auto onReport = [](void * opaqueContext, uint64_t value) { - CallbackContext & context = *static_cast(opaqueContext); - - // Not called. - NL_TEST_ASSERT(context.testSuite, false); - }; - - const auto reportFilter = [](TLV::TLVReader * reader, Callback::Cancelable * callback, Callback::Cancelable * failureCallback) { - IgnoreUnusedVariable(reader); - IgnoreUnusedVariable(callback); - IgnoreUnusedVariable(failureCallback); - }; - - Callback::Callback reportCallback{ onReport, &callbackContext }; - - { - Callback::Cancelable * reportCancelable = nullptr; - TLVDataFilter filter = nullptr; - CHIP_ERROR error = - callbacks.GetReportCallback(kTestNodeId, kTestEndpointId, kTestClusterId, kTestAttributeId, &reportCancelable, &filter); - NL_TEST_ASSERT(testSuite, error == CHIP_ERROR_KEY_NOT_FOUND); - NL_TEST_ASSERT(testSuite, reportCancelable == nullptr); - NL_TEST_ASSERT(testSuite, filter == nullptr); - } - - { - CHIP_ERROR error = callbacks.AddReportCallback(kTestNodeId, kTestEndpointId, kTestClusterId, kTestAttributeId, - reportCallback.Cancel(), reportFilter); - NL_TEST_ASSERT(testSuite, error == CHIP_NO_ERROR); - } - - { - Callback::Cancelable * reportCancelable = nullptr; - TLVDataFilter filter = nullptr; - CHIP_ERROR error = - callbacks.GetReportCallback(kTestNodeId, kTestEndpointId, kTestClusterId, kTestAttributeId, &reportCancelable, &filter); - NL_TEST_ASSERT(testSuite, error == CHIP_NO_ERROR); - - auto outReportCallback = decltype(reportCallback)::FromCancelable(reportCancelable); - - NL_TEST_ASSERT(testSuite, outReportCallback == &reportCallback); - NL_TEST_ASSERT(testSuite, filter == reportFilter); - } - - { - Callback::Cancelable * reportCancelable = nullptr; - TLVDataFilter filter = nullptr; - CHIP_ERROR error = - callbacks.GetReportCallback(kTestNodeId, kTestEndpointId, kTestClusterId, kTestAttributeId, &reportCancelable, &filter); - NL_TEST_ASSERT(testSuite, error == CHIP_NO_ERROR); - - auto outReportCallback = decltype(reportCallback)::FromCancelable(reportCancelable); - - NL_TEST_ASSERT(testSuite, outReportCallback == &reportCallback); - NL_TEST_ASSERT(testSuite, filter == reportFilter); - } -} - -void ShouldFailGetCanceledReportCallback(nlTestSuite * testSuite, void * apContext) -{ - auto & callbacks = CHIPDeviceCallbacksMgr::GetInstance(); - - static constexpr NodeId kTestNodeId = 0x9b3780f93739918d; - static constexpr EndpointId kTestEndpointId = 0x20; - static constexpr ClusterId kTestClusterId = 0x9103; - static constexpr AttributeId kTestAttributeId = 0x2232; - - struct CallbackContext - { - nlTestSuite * const testSuite; - } callbackContext = { testSuite }; - - const auto onReport = [](void * opaqueContext, uint64_t value) { - CallbackContext & context = *static_cast(opaqueContext); - - // Not called. - NL_TEST_ASSERT(context.testSuite, false); - }; - - const auto reportFilter = [](TLV::TLVReader * reader, Callback::Cancelable * callback, Callback::Cancelable * failureCallback) { - IgnoreUnusedVariable(reader); - IgnoreUnusedVariable(callback); - IgnoreUnusedVariable(failureCallback); - }; - - Callback::Callback reportCallback{ onReport, &callbackContext }; - - { - Callback::Cancelable * reportCancelable = nullptr; - TLVDataFilter filter = nullptr; - CHIP_ERROR error = - callbacks.GetReportCallback(kTestNodeId, kTestEndpointId, kTestClusterId, kTestAttributeId, &reportCancelable, &filter); - NL_TEST_ASSERT(testSuite, error == CHIP_ERROR_KEY_NOT_FOUND); - NL_TEST_ASSERT(testSuite, reportCancelable == nullptr); - NL_TEST_ASSERT(testSuite, filter == nullptr); - } - - { - CHIP_ERROR error = callbacks.AddReportCallback(kTestNodeId, kTestEndpointId, kTestClusterId, kTestAttributeId, - reportCallback.Cancel(), reportFilter); - NL_TEST_ASSERT(testSuite, error == CHIP_NO_ERROR); - } - - { - Callback::Cancelable * reportCancelable = nullptr; - TLVDataFilter filter = nullptr; - CHIP_ERROR error = - callbacks.GetReportCallback(kTestNodeId, kTestEndpointId, kTestClusterId, kTestAttributeId, &reportCancelable, &filter); - NL_TEST_ASSERT(testSuite, error == CHIP_NO_ERROR); - - auto outReportCallback = decltype(reportCallback)::FromCancelable(reportCancelable); - - NL_TEST_ASSERT(testSuite, outReportCallback == &reportCallback); - NL_TEST_ASSERT(testSuite, filter == reportFilter); - } - - reportCallback.Cancel(); - - { - Callback::Cancelable * reportCancelable = nullptr; - TLVDataFilter filter = nullptr; - CHIP_ERROR error = - callbacks.GetReportCallback(kTestNodeId, kTestEndpointId, kTestClusterId, kTestAttributeId, &reportCancelable, &filter); - NL_TEST_ASSERT(testSuite, error == CHIP_ERROR_KEY_NOT_FOUND); - NL_TEST_ASSERT(testSuite, reportCancelable == nullptr); - NL_TEST_ASSERT(testSuite, filter == nullptr); - } -} - } // namespace } // namespace app } // namespace chip @@ -443,8 +300,6 @@ const nlTest sTests[] = { NL_TEST_DEF("ShouldGetSingleResponseCallback", chip::app::ShouldGetSingleResponseCallback), // NL_TEST_DEF("ShouldGetMultipleResponseCallbacks", chip::app::ShouldGetMultipleResponseCallbacks), // NL_TEST_DEF("ShouldFailGetCanceledResponseCallback", chip::app::ShouldFailGetCanceledResponseCallback), // - NL_TEST_DEF("ShouldGetSingleReportCallback", chip::app::ShouldGetSingleReportCallback), // - NL_TEST_DEF("ShouldFailGetCanceledReportCallback", chip::app::ShouldFailGetCanceledReportCallback), // NL_TEST_SENTINEL(), // }; diff --git a/src/app/util/CHIPDeviceCallbacksMgr.cpp b/src/app/util/CHIPDeviceCallbacksMgr.cpp index e8b905e00cd271..50849bca93bb73 100644 --- a/src/app/util/CHIPDeviceCallbacksMgr.cpp +++ b/src/app/util/CHIPDeviceCallbacksMgr.cpp @@ -134,80 +134,5 @@ CHIP_ERROR CHIPDeviceCallbacksMgr::GetResponseCallback(NodeId nodeId, uint8_t se return CHIP_NO_ERROR; } -CHIP_ERROR CHIPDeviceCallbacksMgr::SetSubscribeFilter(const ReportCallbackInfo & info, TLVDataFilter filter) -{ - constexpr ReportCallbackInfo kEmptyInfo{ kPlaceholderNodeId, 0, 0, 0 }; - - for (size_t i = 0; i < kTLVFilterPoolSize; i++) - { - if (mReportFilterPool[i].info == info) - { - mReportFilterPool[i].filter = filter; - return CHIP_NO_ERROR; - } - } - - for (size_t i = 0; i < kTLVFilterPoolSize; i++) - { - if (mReportFilterPool[i].info == kEmptyInfo) - { - mReportFilterPool[i].info = info; - mReportFilterPool[i].filter = filter; - return CHIP_NO_ERROR; - } - } - - return CHIP_ERROR_NO_MEMORY; -} - -CHIP_ERROR CHIPDeviceCallbacksMgr::GetSubscribeFilter(const ReportCallbackInfo & info, TLVDataFilter * outFilter) -{ - for (size_t i = 0; i < kTLVFilterPoolSize; i++) - { - if (mReportFilterPool[i].info == info) - { - if (outFilter != nullptr) - { - *outFilter = mReportFilterPool[i].filter; - } - return CHIP_NO_ERROR; - } - } - - return CHIP_ERROR_KEY_NOT_FOUND; -} - -CHIP_ERROR CHIPDeviceCallbacksMgr::AddReportCallback(NodeId nodeId, EndpointId endpointId, ClusterId clusterId, - AttributeId attributeId, Callback::Cancelable * onReportCallback, - TLVDataFilter filter) -{ - VerifyOrReturnError(onReportCallback != nullptr, CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrReturnError(filter != nullptr, CHIP_ERROR_INVALID_ARGUMENT); - - ReportCallbackInfo info = { nodeId, endpointId, clusterId, attributeId }; - static_assert(sizeof(onReportCallback->mInfo) >= sizeof(info), "Callback info too large"); - memcpy(&onReportCallback->mInfo, &info, sizeof(info)); - - // If a callback has already been registered for the same ReportCallbackInfo, let's cancel it. - CancelCallback(info, mReports); - - ReturnErrorOnFailure(SetSubscribeFilter(info, filter)); - - mReports.Enqueue(onReportCallback); - return CHIP_NO_ERROR; -} - -CHIP_ERROR CHIPDeviceCallbacksMgr::GetReportCallback(NodeId nodeId, EndpointId endpointId, ClusterId clusterId, - AttributeId attributeId, Callback::Cancelable ** onReportCallback, - TLVDataFilter * outFilter) -{ - ReportCallbackInfo info = { nodeId, endpointId, clusterId, attributeId }; - - ReturnErrorOnFailure(GetCallback(info, mReports, onReportCallback)); - ReturnErrorOnFailure(GetSubscribeFilter(info, outFilter)); - - return CHIP_NO_ERROR; -} - } // namespace app } // namespace chip diff --git a/src/app/util/CHIPDeviceCallbacksMgr.h b/src/app/util/CHIPDeviceCallbacksMgr.h index 9d8741cf15bebe..908a4a6e4d8768 100644 --- a/src/app/util/CHIPDeviceCallbacksMgr.h +++ b/src/app/util/CHIPDeviceCallbacksMgr.h @@ -71,11 +71,6 @@ class DLL_EXPORT CHIPDeviceCallbacksMgr CHIP_ERROR GetResponseCallback(NodeId nodeId, uint8_t sequenceNumber, Callback::Cancelable ** onSuccessCallback, Callback::Cancelable ** onFailureCallback, TLVDataFilter * callbackFilter = nullptr); - CHIP_ERROR AddReportCallback(NodeId nodeId, EndpointId endpointId, ClusterId clusterId, AttributeId attributeId, - Callback::Cancelable * onReportCallback, TLVDataFilter callbackFilter); - CHIP_ERROR GetReportCallback(NodeId nodeId, EndpointId endpointId, ClusterId clusterId, AttributeId attributeId, - Callback::Cancelable ** onReportCallback, TLVDataFilter * callbackFilter); - private: CHIPDeviceCallbacksMgr() {} @@ -150,14 +145,9 @@ class DLL_EXPORT CHIPDeviceCallbacksMgr CHIP_ERROR AddResponseFilter(const ResponseCallbackInfo & info, TLVDataFilter callbackFilter); CHIP_ERROR PopResponseFilter(const ResponseCallbackInfo & info, TLVDataFilter * callbackFilter); - CHIP_ERROR SetSubscribeFilter(const ReportCallbackInfo & info, TLVDataFilter callbackFilter); - CHIP_ERROR GetSubscribeFilter(const ReportCallbackInfo & info, TLVDataFilter * callbackFilter); - Callback::CallbackDeque mResponsesSuccess; Callback::CallbackDeque mResponsesFailure; TLVFilterItem mTLVFilterPool[kTLVFilterPoolSize]; - Callback::CallbackDeque mReports; - TLVFilterItem mReportFilterPool[kTLVFilterPoolSize]; }; } // namespace app diff --git a/src/app/util/im-client-callbacks.cpp b/src/app/util/im-client-callbacks.cpp index 662064effb5675..ec50dd0fb31e05 100644 --- a/src/app/util/im-client-callbacks.cpp +++ b/src/app/util/im-client-callbacks.cpp @@ -362,125 +362,6 @@ bool IMWriteResponseCallback(const chip::app::WriteClient * writeClient, chip::P return true; } -bool IMReadReportAttributesResponseCallback(const app::ReadClient * apReadClient, const app::ConcreteAttributePath * aPath, - TLV::TLVReader * apData, Protocols::InteractionModel::Status status) -{ - ChipLogProgress(Zcl, "ReadAttributesResponse:"); - if (aPath != nullptr) - { - ChipLogProgress(Zcl, " ClusterId: " ChipLogFormatMEI, ChipLogValueMEI(aPath->mClusterId)); - } - - Callback::Cancelable * onSuccessCallback = nullptr; - Callback::Cancelable * onFailureCallback = nullptr; - app::TLVDataFilter tlvFilter = nullptr; - // In CHIPClusters.cpp, we are using sequenceNumber as application identifier. - CHIP_ERROR err = CHIP_NO_ERROR; - if (apReadClient->IsSubscriptionType()) - { - if (aPath != nullptr) - { - err = gCallbacks.GetReportCallback(apReadClient->GetPeerNodeId(), aPath->mEndpointId, aPath->mClusterId, - aPath->mAttributeId, &onSuccessCallback, &tlvFilter); - } - } - else - { - err = gCallbacks.GetResponseCallback(reinterpret_cast(apReadClient), 0, &onSuccessCallback, &onFailureCallback, - &tlvFilter); - } - - if (CHIP_NO_ERROR != err) - { - if (onSuccessCallback == nullptr) - { - ChipLogDetail(Zcl, "%s: Missing success callback", __FUNCTION__); - } - - if (onFailureCallback == nullptr && !apReadClient->IsSubscriptionType()) - { - ChipLogDetail(Zcl, "%s: Missing failure callback", __FUNCTION__); - } - - if (tlvFilter == nullptr) - { - ChipLogDetail(Zcl, "%s: Missing TLV Data Filter", __FUNCTION__); - } - return true; - } - - if (aPath != nullptr) - { - ChipLogProgress(Zcl, " attributeId: " ChipLogFormatMEI, ChipLogValueMEI(aPath->mAttributeId)); - } - LogIMStatus(status); - - if (status == Protocols::InteractionModel::Status::Success && apData != nullptr) - { - ChipLogProgress(Zcl, " attribute TLV Type: 0x%02x", apData->GetType()); - tlvFilter(apData, onSuccessCallback, onFailureCallback); - } - else if (onFailureCallback != nullptr) - { - Callback::Callback * cb = - Callback::Callback::FromCancelable(onFailureCallback); - // TODO: Should change failure callbacks to accept uint16 status code. - cb->mCall(cb->mContext, static_cast(to_underlying(status))); - } - - return true; -} - -bool IMSubscribeResponseCallback(const chip::app::ReadClient * apSubscribeClient, EmberAfStatus status) -{ - auto subscriptionId = apSubscribeClient->GetSubscriptionId(); - ChipLogProgress(Zcl, "SubscribeResponse:"); - if (subscriptionId.HasValue()) - { - ChipLogProgress(Zcl, " SubscriptionId: 0x%" PRIx64, subscriptionId.Value()); - } - else - { - ChipLogProgress(Zcl, " SubscriptionId: "); - } - LogStatus(status); - - // In CHIPClusters.cpp, we are using sequenceNumber as application identifier. - CHIP_ERROR err = CHIP_NO_ERROR; - Callback::Cancelable * onSuccessCallback = nullptr; - Callback::Cancelable * onFailureCallback = nullptr; - err = gCallbacks.GetResponseCallback(reinterpret_cast(apSubscribeClient), 0, &onSuccessCallback, &onFailureCallback); - - if (CHIP_NO_ERROR != err) - { - if (onSuccessCallback == nullptr) - { - ChipLogDetail(Zcl, "%s: Missing success callback", __FUNCTION__); - } - - if (onFailureCallback == nullptr) - { - ChipLogDetail(Zcl, "%s: Missing failure callback", __FUNCTION__); - } - return true; - } - - if (status == EMBER_ZCL_STATUS_SUCCESS) - { - Callback::Callback * cb = - Callback::Callback::FromCancelable(onSuccessCallback); - cb->mCall(cb->mContext); - } - else - { - Callback::Callback * cb = - Callback::Callback::FromCancelable(onFailureCallback); - cb->mCall(cb->mContext, static_cast(status)); - } - - return true; -} - bool emberAfDefaultResponseCallback(ClusterId clusterId, CommandId commandId, EmberAfStatus status) { ChipLogProgress(Zcl, "DefaultResponse:"); diff --git a/src/app/util/im-client-callbacks.h b/src/app/util/im-client-callbacks.h index 631b13bef72b91..e42a71e9cd0d0e 100644 --- a/src/app/util/im-client-callbacks.h +++ b/src/app/util/im-client-callbacks.h @@ -30,11 +30,7 @@ // instead of IM status code. // #6308 should handle IM error code on the application side, either modify this function or remove this. bool IMDefaultResponseCallback(const chip::app::CommandSender * commandObj, EmberAfStatus status); -bool IMReadReportAttributesResponseCallback(const chip::app::ReadClient * apReadClient, - const chip::app::ConcreteAttributePath * aPath, chip::TLV::TLVReader * apData, - chip::Protocols::InteractionModel::Status status); bool IMWriteResponseCallback(const chip::app::WriteClient * writeClient, chip::Protocols::InteractionModel::Status status); -bool IMSubscribeResponseCallback(const chip::app::ReadClient * apSubscribeClient, EmberAfStatus status); void LogStatus(uint8_t status); // Global Response Callbacks diff --git a/src/app/zap-templates/templates/app/CHIPClusters-src.zapt b/src/app/zap-templates/templates/app/CHIPClusters-src.zapt index d368a6ff73d4c0..127dbc51e36da9 100644 --- a/src/app/zap-templates/templates/app/CHIPClusters-src.zapt +++ b/src/app/zap-templates/templates/app/CHIPClusters-src.zapt @@ -74,29 +74,6 @@ exit: } {{/chip_cluster_commands}} -// {{asUpperCamelCase name}} Cluster Attributes -{{#chip_server_cluster_attributes}} -{{#unless (isStrEqual chipCallback.name "Unsupported")}} -{{#if isReportableAttribute}} -{{#unless isList}} -CHIP_ERROR {{asUpperCamelCase parent.name}}Cluster::SubscribeAttribute{{asUpperCamelCase name}}(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = {{#if isGlobalAttribute}}Globals{{else}}{{asUpperCamelCase parent.name}}{{/if}}::Attributes::{{asUpperCamelCase name}}::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR {{asUpperCamelCase parent.name}}Cluster::ReportAttribute{{asUpperCamelCase name}}(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting({{#if isGlobalAttribute}}Globals{{else}}{{asUpperCamelCase parent.name}}{{/if}}::Attributes::{{asUpperCamelCase name}}::Id, onReportCallback, BasicAttributeFilter<{{chipCallback.name}}AttributeCallback>); -} - -{{/unless}} -{{/if}} -{{/unless}} -{{/chip_server_cluster_attributes}} {{/chip_client_clusters}} diff --git a/src/app/zap-templates/templates/app/CHIPClusters.zapt b/src/app/zap-templates/templates/app/CHIPClusters.zapt index 342d396b3a7b4f..33b8fcd023f5d8 100644 --- a/src/app/zap-templates/templates/app/CHIPClusters.zapt +++ b/src/app/zap-templates/templates/app/CHIPClusters.zapt @@ -27,24 +27,6 @@ public: {{/first}} CHIP_ERROR {{asUpperCamelCase name}}(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback{{#chip_cluster_command_arguments_with_structs_expanded}}{{#if_is_struct type}}{{else}}, {{chipType}} {{asLowerCamelCase label}}{{/if_is_struct}}{{/chip_cluster_command_arguments_with_structs_expanded}}); {{/chip_cluster_commands}} - - // Cluster Attributes - {{#chip_server_cluster_attributes}} - {{#unless (isStrEqual chipCallback.name "Unsupported")}} - {{#if isReportableAttribute}} - {{#unless isList}} - CHIP_ERROR SubscribeAttribute{{asUpperCamelCase name}}(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttribute{{asUpperCamelCase name}}(Callback::Cancelable * onReportCallback); - {{/unless}} - {{/if}} - {{/unless}} - {{/chip_server_cluster_attributes}} - {{#chip_cluster_commands}} - {{#first}} - -private: - {{/first}} - {{/chip_cluster_commands}} }; {{/chip_client_clusters}} diff --git a/src/controller/CHIPCluster.cpp b/src/controller/CHIPCluster.cpp index f985b1596e8a4b..4d2ca1ddf44446 100644 --- a/src/controller/CHIPCluster.cpp +++ b/src/controller/CHIPCluster.cpp @@ -79,15 +79,5 @@ void ClusterBase::Dissociate() mDevice = nullptr; } -CHIP_ERROR ClusterBase::RequestAttributeReporting(AttributeId attributeId, Callback::Cancelable * onReportCallback, - app::TLVDataFilter tlvDataFilter) -{ - VerifyOrReturnError(onReportCallback != nullptr, CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrReturnError(tlvDataFilter != nullptr, CHIP_ERROR_INVALID_ARGUMENT); - mDevice->AddReportHandler(mEndpoint, mClusterId, attributeId, onReportCallback, tlvDataFilter); - - return CHIP_NO_ERROR; -} - } // namespace Controller } // namespace chip diff --git a/src/controller/CHIPCluster.h b/src/controller/CHIPCluster.h index c8112a4f773192..4d9452def8f0d0 100644 --- a/src/controller/CHIPCluster.h +++ b/src/controller/CHIPCluster.h @@ -259,21 +259,6 @@ class DLL_EXPORT ClusterBase protected: ClusterBase(uint16_t cluster) : mClusterId(cluster) {} - /** - * @brief - * Request attribute reports from the device. Add a callback - * handler, that'll be called when the reports are received from the device. - * - * @param[in] attributeId The report target attribute id - * @param[in] reportHandler The handler function that's called on receiving attribute reports - * The reporting handler continues to be called as long as the callback - * is active. The user can stop the reporting by cancelling the callback. - * Reference: chip::Callback::Cancel() - * @param[in] tlvDataFilter Filter interface for processing data from TLV - */ - CHIP_ERROR RequestAttributeReporting(AttributeId attributeId, Callback::Cancelable * reportHandler, - app::TLVDataFilter tlvDataFilter); - const ClusterId mClusterId; DeviceProxy * mDevice; EndpointId mEndpoint; diff --git a/src/controller/python/chip/interaction_model/Delegate.cpp b/src/controller/python/chip/interaction_model/Delegate.cpp index 178ade9bf60234..aec920813eb828 100644 --- a/src/controller/python/chip/interaction_model/Delegate.cpp +++ b/src/controller/python/chip/interaction_model/Delegate.cpp @@ -81,50 +81,6 @@ void PythonInteractionModelDelegate::OnError(const app::CommandSender * apComman DeviceControllerInteractionModelDelegate::OnError(apCommandSender, aStatus, aError); } -void PythonInteractionModelDelegate::OnAttributeData(const app::ReadClient * apReadClient, - const app::ConcreteDataAttributePath & aPath, TLV::TLVReader * apData, - const app::StatusIB & status) -{ - // - // We shouldn't be getting list item operations in the provided path since that should be handled by the buffered read callback. - // If we do, that's a bug. - // - VerifyOrDie(!aPath.IsListItemOperation()); - - if (onReportDataFunct != nullptr) - { - CHIP_ERROR err = CHIP_NO_ERROR; - TLV::TLVWriter writer; - uint8_t writerBuffer[CHIP_CONFIG_DEFAULT_UDP_MTU_SIZE]; - writer.Init(writerBuffer); - // When the apData is nullptr, means we did not receive a valid attribute data from server, status will be some error - // status. - if (apData != nullptr) - { - TLV::TLVReader tmpReader; - tmpReader.Init(*apData); - // The Copy operation should succeed since: - // - We used a buffer that is large enough - // - The writer is in a clean state. - err = writer.CopyElement(TLV::AnonymousTag, tmpReader); - } - if (CHIP_NO_ERROR == err) - { - AttributePath path{ .endpointId = aPath.mEndpointId, .clusterId = aPath.mClusterId, .fieldId = aPath.mAttributeId }; - onReportDataFunct(apReadClient->GetPeerNodeId(), 0, - /* TODO: Use real SubscriptionId */ apReadClient->IsSubscriptionType() ? 1 : 0, &path, sizeof(path), - writerBuffer, writer.GetLengthWritten(), to_underlying(status.mStatus)); - } - else - { - // We failed to dump the TLV data to buffer, so we cannot pass valid data to the Python side, this should be a internal - // error of the binding. - ChipLogError(Controller, "Cannot pass TLV data to python: failed to copy TLV: %s", ErrorStr(err)); - } - } - DeviceControllerInteractionModelDelegate::OnAttributeData(apReadClient, aPath, apData, status); -} - void pychip_InteractionModelDelegate_SetCommandResponseStatusCallback( PythonInteractionModelDelegate_OnCommandResponseStatusCodeReceivedFunct f) { @@ -142,11 +98,6 @@ void pychip_InteractionModelDelegate_SetCommandResponseErrorCallback(PythonInter gPythonInteractionModelDelegate.SetOnCommandResponseCallback(f); } -void pychip_InteractionModelDelegate_SetOnReportDataCallback(PythonInteractionModelDelegate_OnReportDataFunct f) -{ - gPythonInteractionModelDelegate.SetOnReportDataCallback(f); -} - void pychip_InteractionModelDelegate_SetOnWriteResponseStatusCallback(PythonInteractionModelDelegate_OnWriteResponseStatusFunct f) { gPythonInteractionModelDelegate.SetOnWriteResponseStatusCallback(f); diff --git a/src/controller/python/chip/interaction_model/Delegate.h b/src/controller/python/chip/interaction_model/Delegate.h index 1e20e8a6508031..4f878e764680e6 100644 --- a/src/controller/python/chip/interaction_model/Delegate.h +++ b/src/controller/python/chip/interaction_model/Delegate.h @@ -80,17 +80,11 @@ typedef void (*PythonInteractionModelDelegate_OnCommandResponseFunct)(uint64_t c typedef void (*PythonInteractionModelDelegate_OnWriteResponseStatusFunct)(void * writeStatusBuf, uint32_t writeStatusBufLen); -typedef void (*PythonInteractionModelDelegate_OnReportDataFunct)(chip::NodeId nodeId, uint64_t readClientAppIdentifier, - uint64_t subscriptionId, void * attributePathBuf, - size_t attributePathBufLen, uint8_t * readTlvData, - size_t readTlvDataLen, uint16_t statusCode); - void pychip_InteractionModelDelegate_SetCommandResponseStatusCallback( PythonInteractionModelDelegate_OnCommandResponseStatusCodeReceivedFunct f); void pychip_InteractionModelDelegate_SetCommandResponseProtocolErrorCallback( PythonInteractionModelDelegate_OnCommandResponseProtocolErrorFunct f); void pychip_InteractionModelDelegate_SetCommandResponseErrorCallback(PythonInteractionModelDelegate_OnCommandResponseFunct f); -void pychip_InteractionModelDelegate_SetOnReportDataCallback(PythonInteractionModelDelegate_OnReportDataFunct f); void pychip_InteractionModelDelegate_SetOnWriteResponseStatusCallback(PythonInteractionModelDelegate_OnWriteResponseStatusFunct f); } @@ -101,13 +95,6 @@ class PythonInteractionModelDelegate : public chip::Controller::DeviceController TLV::TLVReader * aData) override; void OnError(const app::CommandSender * apCommandSender, const app::StatusIB & aStatus, CHIP_ERROR aError) override; - void OnAttributeData(const app::ReadClient * apReadClient, const app::ConcreteDataAttributePath & aPath, - TLV::TLVReader * apData, const app::StatusIB & status) override; - - void OnEventData(const app::ReadClient * apReadClient, const app::EventHeader & aEventHeader, TLV::TLVReader * apData, - const app::StatusIB * apStatus) override - {} - static PythonInteractionModelDelegate & Instance(); void SetOnCommandResponseStatusCodeReceivedCallback(PythonInteractionModelDelegate_OnCommandResponseStatusCodeReceivedFunct f) @@ -124,13 +111,10 @@ class PythonInteractionModelDelegate : public chip::Controller::DeviceController void SetOnWriteResponseStatusCallback(PythonInteractionModelDelegate_OnWriteResponseStatusFunct f) { onWriteResponseFunct = f; } - void SetOnReportDataCallback(PythonInteractionModelDelegate_OnReportDataFunct f) { onReportDataFunct = f; } - private: PythonInteractionModelDelegate_OnCommandResponseStatusCodeReceivedFunct commandResponseStatusFunct = nullptr; PythonInteractionModelDelegate_OnCommandResponseProtocolErrorFunct commandResponseProtocolErrorFunct = nullptr; PythonInteractionModelDelegate_OnCommandResponseFunct commandResponseErrorFunct = nullptr; - PythonInteractionModelDelegate_OnReportDataFunct onReportDataFunct = nullptr; PythonInteractionModelDelegate_OnWriteResponseStatusFunct onWriteResponseFunct = nullptr; }; diff --git a/src/controller/python/chip/interaction_model/__init__.py b/src/controller/python/chip/interaction_model/__init__.py index 5277df326d0f4c..1fbfde26668752 100644 --- a/src/controller/python/chip/interaction_model/__init__.py +++ b/src/controller/python/chip/interaction_model/__init__.py @@ -22,7 +22,7 @@ """Provides Python APIs for CHIP.""" import enum -from .delegate import OnSubscriptionReport, SetAttributeReportCallback, AttributePath, AttributePathIBstruct, EventPath, EventPathIBstruct +from .delegate import AttributePath, AttributePathIBstruct, EventPath, EventPathIBstruct from chip.exceptions import ChipStackException diff --git a/src/controller/python/chip/interaction_model/delegate.py b/src/controller/python/chip/interaction_model/delegate.py index 5e246c6408682c..106c1a4a310888 100644 --- a/src/controller/python/chip/interaction_model/delegate.py +++ b/src/controller/python/chip/interaction_model/delegate.py @@ -99,15 +99,10 @@ class AttributeWriteResult: # void * commandStatusBuf); # typedef void (*PythonInteractionModelDelegate_OnCommandResponseProtocolErrorFunct)(uint64_t commandSenderPtr, uint8_t commandIndex); # typedef void (*PythonInteractionModelDelegate_OnCommandResponseFunct)(uint64_t commandSenderPtr, uint32_t error); -# typedef void (*PythonInteractionModelDelegate_OnReportDataFunct)(chip::NodeId nodeId, uint64_t readClientAppIdentifier, -# void * attributePathBuf, size_t attributePathBufLen, -# uint8_t * readTlvData, size_t readTlvDataLen, uint16_t statusCode); _OnCommandResponseStatusCodeReceivedFunct = CFUNCTYPE( None, c_uint64, c_void_p, c_uint32) _OnCommandResponseProtocolErrorFunct = CFUNCTYPE(None, c_uint64, c_uint8) _OnCommandResponseFunct = CFUNCTYPE(None, c_uint64, c_uint32) -_OnReportDataFunct = CFUNCTYPE( - None, c_uint64, c_uint64, c_ssize_t, c_void_p, c_uint32, c_void_p, c_uint32, c_uint16) _OnWriteResponseStatusFunct = CFUNCTYPE(None, c_void_p, c_uint32) _commandStatusDict = dict() @@ -126,14 +121,6 @@ class AttributeWriteResult: DEFAULT_ATTRIBUTEREAD_APPID = 0 DEFAULT_ATTRIBUTEWRITE_APPID = 0 -_onSubscriptionReport = None - - -class OnSubscriptionReport: - @abstractmethod - def OnData(self, path: AttributePath, subscriptionId: int, data: typing.Any) -> None: - pass - def _GetCommandStatus(commandHandle: int): with _commandStatusLock: @@ -177,32 +164,6 @@ def _OnCommandResponse(commandHandle: int, errorcode: int): _SetCommandStatus(PLACEHOLDER_COMMAND_HANDLE, errorcode) -@ _OnReportDataFunct -def _OnReportData(nodeId: int, appId: int, subscriptionId: int, attrPathBuf, attrPathBufLen: int, tlvDataBuf, tlvDataBufLen: int, statusCode: int): - global _onSubscriptionReport - attrPath = AttributePathIBstruct.parse( - ctypes.string_at(attrPathBuf, attrPathBufLen)) - tlvData = None - path = AttributePath(nodeId, attrPath["EndpointId"], - attrPath["ClusterId"], attrPath["AttributeId"]) - if tlvDataBufLen > 0: - tlvBuf = ctypes.string_at(tlvDataBuf, tlvDataBufLen) - # We converts the data to AnonymousTag, and it becomes Any in decoded values. - tlvData = chip.tlv.TLVReader(tlvBuf).get().get('Any') - - if appId < 256: - # For all attribute read requests using CHIPCluster API, appId is filled by CHIPDevice, and should be smaller than 256 (UINT8_MAX). - appId = DEFAULT_ATTRIBUTEREAD_APPID - - if subscriptionId != 0: - if _onSubscriptionReport: - _onSubscriptionReport.OnData(path, subscriptionId, tlvData) - - with _attributeDictLock: - _attributeDict[appId] = AttributeReadResult( - path, statusCode, tlvData) - - @_OnWriteResponseStatusFunct def _OnWriteResponseStatus(IMAttributeWriteResult, IMAttributeWriteResultLen): status = IMWriteStatus.parse(ctypes.string_at( @@ -230,8 +191,6 @@ def InitIMDelegate(): _OnCommandResponseFunct]) setter.Set("pychip_InteractionModel_GetCommandSenderHandle", c_uint32, [ctypes.POINTER(c_uint64)]) - setter.Set("pychip_InteractionModelDelegate_SetOnReportDataCallback", None, [ - _OnReportDataFunct]) setter.Set("pychip_InteractionModelDelegate_SetOnWriteResponseStatusCallback", None, [ _OnWriteResponseStatusFunct]) @@ -241,8 +200,6 @@ def InitIMDelegate(): _OnCommandResponseProtocolError) handle.pychip_InteractionModelDelegate_SetCommandResponseErrorCallback( _OnCommandResponse) - handle.pychip_InteractionModelDelegate_SetOnReportDataCallback( - _OnReportData) handle.pychip_InteractionModelDelegate_SetOnWriteResponseStatusCallback( _OnWriteResponseStatus) @@ -308,8 +265,3 @@ def GetAttributeReadResponse(appId: int) -> AttributeReadResult: def GetAttributeWriteResponse(appId: int) -> AttributeWriteResult: with _writeStatusDictLock: return _writeStatusDict.get(appId, None) - - -def SetAttributeReportCallback(path: AttributePath, callback: OnSubscriptionReport): - global _onSubscriptionReport - _onSubscriptionReport = callback diff --git a/src/lib/core/CHIPConfig.h b/src/lib/core/CHIPConfig.h index 2b55c9b3a48641..9fc90524857216 100644 --- a/src/lib/core/CHIPConfig.h +++ b/src/lib/core/CHIPConfig.h @@ -2515,15 +2515,6 @@ extern const char CHIP_NON_PRODUCTION_MARKER[]; #define CONFIG_IM_BUILD_FOR_UNIT_TEST 0 #endif -/** - * @def CHIP_DEVICE_CONTROLLER_SUBSCRIPTION_ATTRIBUTE_PATH_POOL_SIZE - * - * @brief Defines the object pool for allocating attribute path for subscription in device controller. - */ -#ifndef CHIP_DEVICE_CONTROLLER_SUBSCRIPTION_ATTRIBUTE_PATH_POOL_SIZE -#define CHIP_DEVICE_CONTROLLER_SUBSCRIPTION_ATTRIBUTE_PATH_POOL_SIZE CHIP_IM_MAX_NUM_READ_CLIENT -#endif - /** * @def CHIP_CONFIG_LAMBDA_EVENT_SIZE * diff --git a/zzz_generated/chip-tool/zap-generated/reporting/Commands.h b/zzz_generated/chip-tool/zap-generated/reporting/Commands.h deleted file mode 100644 index 5077ca0a7c98e5..00000000000000 --- a/zzz_generated/chip-tool/zap-generated/reporting/Commands.h +++ /dev/null @@ -1,3500 +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 - -#pragma once - -#include "../cluster/Commands.h" // For the LogValue bits and read callbacks -#include - -typedef void (*UnsupportedAttributeCallback)(void * context); - -class Listen : public ReportingCommand -{ -public: - Listen() : ReportingCommand("listen") {} - - ~Listen() - { - delete onReportAccountLoginClusterRevisionCallback; - delete onReportAdministratorCommissioningClusterRevisionCallback; - delete onReportApplicationBasicVendorNameCallback; - delete onReportApplicationBasicVendorIdCallback; - delete onReportApplicationBasicApplicationNameCallback; - delete onReportApplicationBasicProductIdCallback; - delete onReportApplicationBasicApplicationStatusCallback; - delete onReportApplicationBasicApplicationVersionCallback; - delete onReportApplicationBasicClusterRevisionCallback; - delete onReportApplicationLauncherClusterRevisionCallback; - delete onReportAudioOutputCurrentAudioOutputCallback; - delete onReportAudioOutputClusterRevisionCallback; - delete onReportBarrierControlBarrierMovingStateCallback; - delete onReportBarrierControlBarrierSafetyStatusCallback; - delete onReportBarrierControlBarrierCapabilitiesCallback; - delete onReportBarrierControlBarrierPositionCallback; - delete onReportBarrierControlClusterRevisionCallback; - delete onReportBasicInteractionModelVersionCallback; - delete onReportBasicVendorNameCallback; - delete onReportBasicVendorIDCallback; - delete onReportBasicProductNameCallback; - delete onReportBasicProductIDCallback; - delete onReportBasicNodeLabelCallback; - delete onReportBasicLocationCallback; - delete onReportBasicHardwareVersionCallback; - delete onReportBasicHardwareVersionStringCallback; - delete onReportBasicSoftwareVersionCallback; - delete onReportBasicSoftwareVersionStringCallback; - delete onReportBasicManufacturingDateCallback; - delete onReportBasicPartNumberCallback; - delete onReportBasicProductURLCallback; - delete onReportBasicProductLabelCallback; - delete onReportBasicSerialNumberCallback; - delete onReportBasicLocalConfigDisabledCallback; - delete onReportBasicReachableCallback; - delete onReportBasicClusterRevisionCallback; - delete onReportBinaryInputBasicOutOfServiceCallback; - delete onReportBinaryInputBasicPresentValueCallback; - delete onReportBinaryInputBasicStatusFlagsCallback; - delete onReportBinaryInputBasicClusterRevisionCallback; - delete onReportBindingClusterRevisionCallback; - delete onReportBooleanStateStateValueCallback; - delete onReportBooleanStateClusterRevisionCallback; - delete onReportBridgedActionsSetupUrlCallback; - delete onReportBridgedActionsClusterRevisionCallback; - delete onReportBridgedDeviceBasicClusterRevisionCallback; - delete onReportColorControlCurrentHueCallback; - delete onReportColorControlCurrentSaturationCallback; - delete onReportColorControlRemainingTimeCallback; - delete onReportColorControlCurrentXCallback; - delete onReportColorControlCurrentYCallback; - delete onReportColorControlDriftCompensationCallback; - delete onReportColorControlCompensationTextCallback; - delete onReportColorControlColorTemperatureCallback; - delete onReportColorControlColorModeCallback; - delete onReportColorControlColorControlOptionsCallback; - delete onReportColorControlNumberOfPrimariesCallback; - delete onReportColorControlPrimary1XCallback; - delete onReportColorControlPrimary1YCallback; - delete onReportColorControlPrimary1IntensityCallback; - delete onReportColorControlPrimary2XCallback; - delete onReportColorControlPrimary2YCallback; - delete onReportColorControlPrimary2IntensityCallback; - delete onReportColorControlPrimary3XCallback; - delete onReportColorControlPrimary3YCallback; - delete onReportColorControlPrimary3IntensityCallback; - delete onReportColorControlPrimary4XCallback; - delete onReportColorControlPrimary4YCallback; - delete onReportColorControlPrimary4IntensityCallback; - delete onReportColorControlPrimary5XCallback; - delete onReportColorControlPrimary5YCallback; - delete onReportColorControlPrimary5IntensityCallback; - delete onReportColorControlPrimary6XCallback; - delete onReportColorControlPrimary6YCallback; - delete onReportColorControlPrimary6IntensityCallback; - delete onReportColorControlWhitePointXCallback; - delete onReportColorControlWhitePointYCallback; - delete onReportColorControlColorPointRXCallback; - delete onReportColorControlColorPointRYCallback; - delete onReportColorControlColorPointRIntensityCallback; - delete onReportColorControlColorPointGXCallback; - delete onReportColorControlColorPointGYCallback; - delete onReportColorControlColorPointGIntensityCallback; - delete onReportColorControlColorPointBXCallback; - delete onReportColorControlColorPointBYCallback; - delete onReportColorControlColorPointBIntensityCallback; - delete onReportColorControlEnhancedCurrentHueCallback; - delete onReportColorControlEnhancedColorModeCallback; - delete onReportColorControlColorLoopActiveCallback; - delete onReportColorControlColorLoopDirectionCallback; - delete onReportColorControlColorLoopTimeCallback; - delete onReportColorControlColorLoopStartEnhancedHueCallback; - delete onReportColorControlColorLoopStoredEnhancedHueCallback; - delete onReportColorControlColorCapabilitiesCallback; - delete onReportColorControlColorTempPhysicalMinCallback; - delete onReportColorControlColorTempPhysicalMaxCallback; - delete onReportColorControlCoupleColorTempToLevelMinMiredsCallback; - delete onReportColorControlStartUpColorTemperatureMiredsCallback; - delete onReportColorControlClusterRevisionCallback; - delete onReportContentLauncherSupportedStreamingProtocolsCallback; - delete onReportContentLauncherClusterRevisionCallback; - delete onReportDescriptorClusterRevisionCallback; - delete onReportDoorLockLockStateCallback; - delete onReportDoorLockLockTypeCallback; - delete onReportDoorLockActuatorEnabledCallback; - delete onReportDoorLockDoorStateCallback; - delete onReportDoorLockLanguageCallback; - delete onReportDoorLockAutoRelockTimeCallback; - delete onReportDoorLockSoundVolumeCallback; - delete onReportDoorLockOperatingModeCallback; - delete onReportDoorLockEnableOneTouchLockingCallback; - delete onReportDoorLockEnablePrivacyModeButtonCallback; - delete onReportDoorLockWrongCodeEntryLimitCallback; - delete onReportDoorLockClusterRevisionCallback; - delete onReportElectricalMeasurementMeasurementTypeCallback; - delete onReportElectricalMeasurementTotalActivePowerCallback; - delete onReportElectricalMeasurementRmsVoltageCallback; - delete onReportElectricalMeasurementRmsVoltageMinCallback; - delete onReportElectricalMeasurementRmsVoltageMaxCallback; - delete onReportElectricalMeasurementRmsCurrentCallback; - delete onReportElectricalMeasurementRmsCurrentMinCallback; - delete onReportElectricalMeasurementRmsCurrentMaxCallback; - delete onReportElectricalMeasurementActivePowerCallback; - delete onReportElectricalMeasurementActivePowerMinCallback; - delete onReportElectricalMeasurementActivePowerMaxCallback; - delete onReportElectricalMeasurementClusterRevisionCallback; - delete onReportEthernetNetworkDiagnosticsPHYRateCallback; - delete onReportEthernetNetworkDiagnosticsFullDuplexCallback; - delete onReportEthernetNetworkDiagnosticsPacketRxCountCallback; - delete onReportEthernetNetworkDiagnosticsPacketTxCountCallback; - delete onReportEthernetNetworkDiagnosticsTxErrCountCallback; - delete onReportEthernetNetworkDiagnosticsCollisionCountCallback; - delete onReportEthernetNetworkDiagnosticsOverrunCountCallback; - delete onReportEthernetNetworkDiagnosticsCarrierDetectCallback; - delete onReportEthernetNetworkDiagnosticsTimeSinceResetCallback; - delete onReportEthernetNetworkDiagnosticsClusterRevisionCallback; - delete onReportFixedLabelClusterRevisionCallback; - delete onReportFlowMeasurementMeasuredValueCallback; - delete onReportFlowMeasurementMinMeasuredValueCallback; - delete onReportFlowMeasurementMaxMeasuredValueCallback; - delete onReportFlowMeasurementToleranceCallback; - delete onReportFlowMeasurementClusterRevisionCallback; - delete onReportGeneralCommissioningBreadcrumbCallback; - delete onReportGeneralCommissioningClusterRevisionCallback; - delete onReportGeneralDiagnosticsRebootCountCallback; - delete onReportGeneralDiagnosticsUpTimeCallback; - delete onReportGeneralDiagnosticsTotalOperationalHoursCallback; - delete onReportGeneralDiagnosticsBootReasonsCallback; - delete onReportGeneralDiagnosticsClusterRevisionCallback; - delete onReportGroupKeyManagementClusterRevisionCallback; - delete onReportGroupsNameSupportCallback; - delete onReportGroupsClusterRevisionCallback; - delete onReportIdentifyIdentifyTimeCallback; - delete onReportIdentifyIdentifyTypeCallback; - delete onReportIdentifyClusterRevisionCallback; - delete onReportIlluminanceMeasurementMeasuredValueCallback; - delete onReportIlluminanceMeasurementMinMeasuredValueCallback; - delete onReportIlluminanceMeasurementMaxMeasuredValueCallback; - delete onReportIlluminanceMeasurementToleranceCallback; - delete onReportIlluminanceMeasurementLightSensorTypeCallback; - delete onReportIlluminanceMeasurementClusterRevisionCallback; - delete onReportKeypadInputClusterRevisionCallback; - delete onReportLevelControlCurrentLevelCallback; - delete onReportLevelControlRemainingTimeCallback; - delete onReportLevelControlMinLevelCallback; - delete onReportLevelControlMaxLevelCallback; - delete onReportLevelControlCurrentFrequencyCallback; - delete onReportLevelControlMinFrequencyCallback; - delete onReportLevelControlMaxFrequencyCallback; - delete onReportLevelControlOptionsCallback; - delete onReportLevelControlOnOffTransitionTimeCallback; - delete onReportLevelControlOnLevelCallback; - delete onReportLevelControlOnTransitionTimeCallback; - delete onReportLevelControlOffTransitionTimeCallback; - delete onReportLevelControlDefaultMoveRateCallback; - delete onReportLevelControlStartUpCurrentLevelCallback; - delete onReportLevelControlClusterRevisionCallback; - delete onReportLowPowerClusterRevisionCallback; - delete onReportMediaInputCurrentMediaInputCallback; - delete onReportMediaInputClusterRevisionCallback; - delete onReportMediaPlaybackPlaybackStateCallback; - delete onReportMediaPlaybackStartTimeCallback; - delete onReportMediaPlaybackDurationCallback; - delete onReportMediaPlaybackSeekRangeEndCallback; - delete onReportMediaPlaybackSeekRangeStartCallback; - delete onReportMediaPlaybackClusterRevisionCallback; - delete onReportModeSelectCurrentModeCallback; - delete onReportModeSelectOnModeCallback; - delete onReportModeSelectStartUpModeCallback; - delete onReportModeSelectDescriptionCallback; - delete onReportModeSelectClusterRevisionCallback; - delete onReportNetworkCommissioningFeatureMapCallback; - delete onReportNetworkCommissioningClusterRevisionCallback; - delete onReportOtaSoftwareUpdateProviderClusterRevisionCallback; - delete onReportOtaSoftwareUpdateRequestorDefaultOtaProviderCallback; - delete onReportOtaSoftwareUpdateRequestorUpdatePossibleCallback; - delete onReportOtaSoftwareUpdateRequestorClusterRevisionCallback; - delete onReportOccupancySensingOccupancyCallback; - delete onReportOccupancySensingOccupancySensorTypeCallback; - delete onReportOccupancySensingOccupancySensorTypeBitmapCallback; - delete onReportOccupancySensingClusterRevisionCallback; - delete onReportOnOffOnOffCallback; - delete onReportOnOffGlobalSceneControlCallback; - delete onReportOnOffOnTimeCallback; - delete onReportOnOffOffWaitTimeCallback; - delete onReportOnOffStartUpOnOffCallback; - delete onReportOnOffFeatureMapCallback; - delete onReportOnOffClusterRevisionCallback; - delete onReportOnOffSwitchConfigurationSwitchTypeCallback; - delete onReportOnOffSwitchConfigurationSwitchActionsCallback; - delete onReportOnOffSwitchConfigurationClusterRevisionCallback; - delete onReportOperationalCredentialsSupportedFabricsCallback; - delete onReportOperationalCredentialsCommissionedFabricsCallback; - delete onReportOperationalCredentialsCurrentFabricIndexCallback; - delete onReportOperationalCredentialsClusterRevisionCallback; - delete onReportPowerSourceStatusCallback; - delete onReportPowerSourceOrderCallback; - delete onReportPowerSourceDescriptionCallback; - delete onReportPowerSourceBatteryVoltageCallback; - delete onReportPowerSourceBatteryPercentRemainingCallback; - delete onReportPowerSourceBatteryTimeRemainingCallback; - delete onReportPowerSourceBatteryChargeLevelCallback; - delete onReportPowerSourceBatteryChargeStateCallback; - delete onReportPowerSourceFeatureMapCallback; - delete onReportPowerSourceClusterRevisionCallback; - delete onReportPressureMeasurementMeasuredValueCallback; - delete onReportPressureMeasurementMinMeasuredValueCallback; - delete onReportPressureMeasurementMaxMeasuredValueCallback; - delete onReportPressureMeasurementClusterRevisionCallback; - delete onReportPumpConfigurationAndControlMaxPressureCallback; - delete onReportPumpConfigurationAndControlMaxSpeedCallback; - delete onReportPumpConfigurationAndControlMaxFlowCallback; - delete onReportPumpConfigurationAndControlMinConstPressureCallback; - delete onReportPumpConfigurationAndControlMaxConstPressureCallback; - delete onReportPumpConfigurationAndControlMinCompPressureCallback; - delete onReportPumpConfigurationAndControlMaxCompPressureCallback; - delete onReportPumpConfigurationAndControlMinConstSpeedCallback; - delete onReportPumpConfigurationAndControlMaxConstSpeedCallback; - delete onReportPumpConfigurationAndControlMinConstFlowCallback; - delete onReportPumpConfigurationAndControlMaxConstFlowCallback; - delete onReportPumpConfigurationAndControlMinConstTempCallback; - delete onReportPumpConfigurationAndControlMaxConstTempCallback; - delete onReportPumpConfigurationAndControlPumpStatusCallback; - delete onReportPumpConfigurationAndControlEffectiveOperationModeCallback; - delete onReportPumpConfigurationAndControlEffectiveControlModeCallback; - delete onReportPumpConfigurationAndControlCapacityCallback; - delete onReportPumpConfigurationAndControlSpeedCallback; - delete onReportPumpConfigurationAndControlLifetimeRunningHoursCallback; - delete onReportPumpConfigurationAndControlPowerCallback; - delete onReportPumpConfigurationAndControlLifetimeEnergyConsumedCallback; - delete onReportPumpConfigurationAndControlOperationModeCallback; - delete onReportPumpConfigurationAndControlControlModeCallback; - delete onReportPumpConfigurationAndControlAlarmMaskCallback; - delete onReportPumpConfigurationAndControlFeatureMapCallback; - delete onReportPumpConfigurationAndControlClusterRevisionCallback; - delete onReportRelativeHumidityMeasurementMeasuredValueCallback; - delete onReportRelativeHumidityMeasurementMinMeasuredValueCallback; - delete onReportRelativeHumidityMeasurementMaxMeasuredValueCallback; - delete onReportRelativeHumidityMeasurementToleranceCallback; - delete onReportRelativeHumidityMeasurementClusterRevisionCallback; - delete onReportScenesSceneCountCallback; - delete onReportScenesCurrentSceneCallback; - delete onReportScenesCurrentGroupCallback; - delete onReportScenesSceneValidCallback; - delete onReportScenesNameSupportCallback; - delete onReportScenesClusterRevisionCallback; - delete onReportSoftwareDiagnosticsCurrentHeapFreeCallback; - delete onReportSoftwareDiagnosticsCurrentHeapUsedCallback; - delete onReportSoftwareDiagnosticsCurrentHeapHighWatermarkCallback; - delete onReportSoftwareDiagnosticsClusterRevisionCallback; - delete onReportSwitchNumberOfPositionsCallback; - delete onReportSwitchCurrentPositionCallback; - delete onReportSwitchMultiPressMaxCallback; - delete onReportSwitchFeatureMapCallback; - delete onReportSwitchClusterRevisionCallback; - delete onReportTvChannelClusterRevisionCallback; - delete onReportTargetNavigatorClusterRevisionCallback; - delete onReportTemperatureMeasurementMeasuredValueCallback; - delete onReportTemperatureMeasurementMinMeasuredValueCallback; - delete onReportTemperatureMeasurementMaxMeasuredValueCallback; - delete onReportTemperatureMeasurementToleranceCallback; - delete onReportTemperatureMeasurementClusterRevisionCallback; - delete onReportTestClusterBooleanCallback; - delete onReportTestClusterBitmap8Callback; - delete onReportTestClusterBitmap16Callback; - delete onReportTestClusterBitmap32Callback; - delete onReportTestClusterBitmap64Callback; - delete onReportTestClusterInt8uCallback; - delete onReportTestClusterInt16uCallback; - delete onReportTestClusterInt24uCallback; - delete onReportTestClusterInt32uCallback; - delete onReportTestClusterInt40uCallback; - delete onReportTestClusterInt48uCallback; - delete onReportTestClusterInt56uCallback; - delete onReportTestClusterInt64uCallback; - delete onReportTestClusterInt8sCallback; - delete onReportTestClusterInt16sCallback; - delete onReportTestClusterInt24sCallback; - delete onReportTestClusterInt32sCallback; - delete onReportTestClusterInt40sCallback; - delete onReportTestClusterInt48sCallback; - delete onReportTestClusterInt56sCallback; - delete onReportTestClusterInt64sCallback; - delete onReportTestClusterEnum8Callback; - delete onReportTestClusterEnum16Callback; - delete onReportTestClusterFloatSingleCallback; - delete onReportTestClusterFloatDoubleCallback; - delete onReportTestClusterOctetStringCallback; - delete onReportTestClusterLongOctetStringCallback; - delete onReportTestClusterCharStringCallback; - delete onReportTestClusterLongCharStringCallback; - delete onReportTestClusterEpochUsCallback; - delete onReportTestClusterEpochSCallback; - delete onReportTestClusterVendorIdCallback; - delete onReportTestClusterEnumAttrCallback; - delete onReportTestClusterRangeRestrictedInt8uCallback; - delete onReportTestClusterRangeRestrictedInt8sCallback; - delete onReportTestClusterRangeRestrictedInt16uCallback; - delete onReportTestClusterRangeRestrictedInt16sCallback; - delete onReportTestClusterUnsupportedCallback; - delete onReportTestClusterNullableBooleanCallback; - delete onReportTestClusterNullableBitmap8Callback; - delete onReportTestClusterNullableBitmap16Callback; - delete onReportTestClusterNullableBitmap32Callback; - delete onReportTestClusterNullableBitmap64Callback; - delete onReportTestClusterNullableInt8uCallback; - delete onReportTestClusterNullableInt16uCallback; - delete onReportTestClusterNullableInt24uCallback; - delete onReportTestClusterNullableInt32uCallback; - delete onReportTestClusterNullableInt40uCallback; - delete onReportTestClusterNullableInt48uCallback; - delete onReportTestClusterNullableInt56uCallback; - delete onReportTestClusterNullableInt64uCallback; - delete onReportTestClusterNullableInt8sCallback; - delete onReportTestClusterNullableInt16sCallback; - delete onReportTestClusterNullableInt24sCallback; - delete onReportTestClusterNullableInt32sCallback; - delete onReportTestClusterNullableInt40sCallback; - delete onReportTestClusterNullableInt48sCallback; - delete onReportTestClusterNullableInt56sCallback; - delete onReportTestClusterNullableInt64sCallback; - delete onReportTestClusterNullableEnum8Callback; - delete onReportTestClusterNullableEnum16Callback; - delete onReportTestClusterNullableFloatSingleCallback; - delete onReportTestClusterNullableFloatDoubleCallback; - delete onReportTestClusterNullableOctetStringCallback; - delete onReportTestClusterNullableCharStringCallback; - delete onReportTestClusterNullableEnumAttrCallback; - delete onReportTestClusterNullableRangeRestrictedInt8uCallback; - delete onReportTestClusterNullableRangeRestrictedInt8sCallback; - delete onReportTestClusterNullableRangeRestrictedInt16uCallback; - delete onReportTestClusterNullableRangeRestrictedInt16sCallback; - delete onReportTestClusterClusterRevisionCallback; - delete onReportThermostatLocalTemperatureCallback; - delete onReportThermostatAbsMinHeatSetpointLimitCallback; - delete onReportThermostatAbsMaxHeatSetpointLimitCallback; - delete onReportThermostatAbsMinCoolSetpointLimitCallback; - delete onReportThermostatAbsMaxCoolSetpointLimitCallback; - delete onReportThermostatOccupiedCoolingSetpointCallback; - delete onReportThermostatOccupiedHeatingSetpointCallback; - delete onReportThermostatMinHeatSetpointLimitCallback; - delete onReportThermostatMaxHeatSetpointLimitCallback; - delete onReportThermostatMinCoolSetpointLimitCallback; - delete onReportThermostatMaxCoolSetpointLimitCallback; - delete onReportThermostatMinSetpointDeadBandCallback; - delete onReportThermostatControlSequenceOfOperationCallback; - delete onReportThermostatSystemModeCallback; - delete onReportThermostatStartOfWeekCallback; - delete onReportThermostatNumberOfWeeklyTransitionsCallback; - delete onReportThermostatNumberOfDailyTransitionsCallback; - delete onReportThermostatFeatureMapCallback; - delete onReportThermostatClusterRevisionCallback; - delete onReportThermostatUserInterfaceConfigurationTemperatureDisplayModeCallback; - delete onReportThermostatUserInterfaceConfigurationKeypadLockoutCallback; - delete onReportThermostatUserInterfaceConfigurationScheduleProgrammingVisibilityCallback; - delete onReportThermostatUserInterfaceConfigurationClusterRevisionCallback; - delete onReportThreadNetworkDiagnosticsChannelCallback; - delete onReportThreadNetworkDiagnosticsRoutingRoleCallback; - delete onReportThreadNetworkDiagnosticsNetworkNameCallback; - delete onReportThreadNetworkDiagnosticsPanIdCallback; - delete onReportThreadNetworkDiagnosticsExtendedPanIdCallback; - delete onReportThreadNetworkDiagnosticsMeshLocalPrefixCallback; - delete onReportThreadNetworkDiagnosticsOverrunCountCallback; - delete onReportThreadNetworkDiagnosticsPartitionIdCallback; - delete onReportThreadNetworkDiagnosticsWeightingCallback; - delete onReportThreadNetworkDiagnosticsDataVersionCallback; - delete onReportThreadNetworkDiagnosticsStableDataVersionCallback; - delete onReportThreadNetworkDiagnosticsLeaderRouterIdCallback; - delete onReportThreadNetworkDiagnosticsDetachedRoleCountCallback; - delete onReportThreadNetworkDiagnosticsChildRoleCountCallback; - delete onReportThreadNetworkDiagnosticsRouterRoleCountCallback; - delete onReportThreadNetworkDiagnosticsLeaderRoleCountCallback; - delete onReportThreadNetworkDiagnosticsAttachAttemptCountCallback; - delete onReportThreadNetworkDiagnosticsPartitionIdChangeCountCallback; - delete onReportThreadNetworkDiagnosticsBetterPartitionAttachAttemptCountCallback; - delete onReportThreadNetworkDiagnosticsParentChangeCountCallback; - delete onReportThreadNetworkDiagnosticsTxTotalCountCallback; - delete onReportThreadNetworkDiagnosticsTxUnicastCountCallback; - delete onReportThreadNetworkDiagnosticsTxBroadcastCountCallback; - delete onReportThreadNetworkDiagnosticsTxAckRequestedCountCallback; - delete onReportThreadNetworkDiagnosticsTxAckedCountCallback; - delete onReportThreadNetworkDiagnosticsTxNoAckRequestedCountCallback; - delete onReportThreadNetworkDiagnosticsTxDataCountCallback; - delete onReportThreadNetworkDiagnosticsTxDataPollCountCallback; - delete onReportThreadNetworkDiagnosticsTxBeaconCountCallback; - delete onReportThreadNetworkDiagnosticsTxBeaconRequestCountCallback; - delete onReportThreadNetworkDiagnosticsTxOtherCountCallback; - delete onReportThreadNetworkDiagnosticsTxRetryCountCallback; - delete onReportThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCountCallback; - delete onReportThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCountCallback; - delete onReportThreadNetworkDiagnosticsTxErrCcaCountCallback; - delete onReportThreadNetworkDiagnosticsTxErrAbortCountCallback; - delete onReportThreadNetworkDiagnosticsTxErrBusyChannelCountCallback; - delete onReportThreadNetworkDiagnosticsRxTotalCountCallback; - delete onReportThreadNetworkDiagnosticsRxUnicastCountCallback; - delete onReportThreadNetworkDiagnosticsRxBroadcastCountCallback; - delete onReportThreadNetworkDiagnosticsRxDataCountCallback; - delete onReportThreadNetworkDiagnosticsRxDataPollCountCallback; - delete onReportThreadNetworkDiagnosticsRxBeaconCountCallback; - delete onReportThreadNetworkDiagnosticsRxBeaconRequestCountCallback; - delete onReportThreadNetworkDiagnosticsRxOtherCountCallback; - delete onReportThreadNetworkDiagnosticsRxAddressFilteredCountCallback; - delete onReportThreadNetworkDiagnosticsRxDestAddrFilteredCountCallback; - delete onReportThreadNetworkDiagnosticsRxDuplicatedCountCallback; - delete onReportThreadNetworkDiagnosticsRxErrNoFrameCountCallback; - delete onReportThreadNetworkDiagnosticsRxErrUnknownNeighborCountCallback; - delete onReportThreadNetworkDiagnosticsRxErrInvalidSrcAddrCountCallback; - delete onReportThreadNetworkDiagnosticsRxErrSecCountCallback; - delete onReportThreadNetworkDiagnosticsRxErrFcsCountCallback; - delete onReportThreadNetworkDiagnosticsRxErrOtherCountCallback; - delete onReportThreadNetworkDiagnosticsActiveTimestampCallback; - delete onReportThreadNetworkDiagnosticsPendingTimestampCallback; - delete onReportThreadNetworkDiagnosticsDelayCallback; - delete onReportThreadNetworkDiagnosticsChannelMaskCallback; - delete onReportThreadNetworkDiagnosticsClusterRevisionCallback; - delete onReportWakeOnLanWakeOnLanMacAddressCallback; - delete onReportWakeOnLanClusterRevisionCallback; - delete onReportWiFiNetworkDiagnosticsBssidCallback; - delete onReportWiFiNetworkDiagnosticsSecurityTypeCallback; - delete onReportWiFiNetworkDiagnosticsWiFiVersionCallback; - delete onReportWiFiNetworkDiagnosticsChannelNumberCallback; - delete onReportWiFiNetworkDiagnosticsRssiCallback; - delete onReportWiFiNetworkDiagnosticsBeaconLostCountCallback; - delete onReportWiFiNetworkDiagnosticsBeaconRxCountCallback; - delete onReportWiFiNetworkDiagnosticsPacketMulticastRxCountCallback; - delete onReportWiFiNetworkDiagnosticsPacketMulticastTxCountCallback; - delete onReportWiFiNetworkDiagnosticsPacketUnicastRxCountCallback; - delete onReportWiFiNetworkDiagnosticsPacketUnicastTxCountCallback; - delete onReportWiFiNetworkDiagnosticsCurrentMaxRateCallback; - delete onReportWiFiNetworkDiagnosticsOverrunCountCallback; - delete onReportWiFiNetworkDiagnosticsClusterRevisionCallback; - delete onReportWindowCoveringTypeCallback; - delete onReportWindowCoveringCurrentPositionLiftCallback; - delete onReportWindowCoveringCurrentPositionTiltCallback; - delete onReportWindowCoveringConfigStatusCallback; - delete onReportWindowCoveringCurrentPositionLiftPercentageCallback; - delete onReportWindowCoveringCurrentPositionTiltPercentageCallback; - delete onReportWindowCoveringOperationalStatusCallback; - delete onReportWindowCoveringTargetPositionLiftPercent100thsCallback; - delete onReportWindowCoveringTargetPositionTiltPercent100thsCallback; - delete onReportWindowCoveringEndProductTypeCallback; - delete onReportWindowCoveringCurrentPositionLiftPercent100thsCallback; - delete onReportWindowCoveringCurrentPositionTiltPercent100thsCallback; - delete onReportWindowCoveringInstalledOpenLimitLiftCallback; - delete onReportWindowCoveringInstalledClosedLimitLiftCallback; - delete onReportWindowCoveringInstalledOpenLimitTiltCallback; - delete onReportWindowCoveringInstalledClosedLimitTiltCallback; - delete onReportWindowCoveringModeCallback; - delete onReportWindowCoveringSafetyStatusCallback; - delete onReportWindowCoveringFeatureMapCallback; - delete onReportWindowCoveringClusterRevisionCallback; - } - - void AddReportCallbacks(NodeId remoteId, uint8_t endpointId) override - { - chip::app::CHIPDeviceCallbacksMgr & callbacksMgr = chip::app::CHIPDeviceCallbacksMgr::GetInstance(); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050E, 0xFFFD, onReportAccountLoginClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x003C, 0xFFFD, - onReportAdministratorCommissioningClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050D, 0x0000, onReportApplicationBasicVendorNameCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050D, 0x0001, onReportApplicationBasicVendorIdCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050D, 0x0002, - onReportApplicationBasicApplicationNameCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050D, 0x0003, onReportApplicationBasicProductIdCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050D, 0x0005, - onReportApplicationBasicApplicationStatusCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050D, 0x0006, - onReportApplicationBasicApplicationVersionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050D, 0xFFFD, - onReportApplicationBasicClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050C, 0xFFFD, - onReportApplicationLauncherClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050B, 0x0001, - onReportAudioOutputCurrentAudioOutputCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050B, 0xFFFD, onReportAudioOutputClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0103, 0x0001, - onReportBarrierControlBarrierMovingStateCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0103, 0x0002, - onReportBarrierControlBarrierSafetyStatusCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0103, 0x0003, - onReportBarrierControlBarrierCapabilitiesCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0103, 0x000A, - onReportBarrierControlBarrierPositionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0103, 0xFFFD, - onReportBarrierControlClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0028, 0x0000, onReportBasicInteractionModelVersionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0028, 0x0001, onReportBasicVendorNameCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0028, 0x0002, onReportBasicVendorIDCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0028, 0x0003, onReportBasicProductNameCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0028, 0x0004, onReportBasicProductIDCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0028, 0x0005, onReportBasicNodeLabelCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0028, 0x0006, onReportBasicLocationCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0028, 0x0007, onReportBasicHardwareVersionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0028, 0x0008, onReportBasicHardwareVersionStringCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0028, 0x0009, onReportBasicSoftwareVersionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0028, 0x000A, onReportBasicSoftwareVersionStringCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0028, 0x000B, onReportBasicManufacturingDateCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0028, 0x000C, onReportBasicPartNumberCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0028, 0x000D, onReportBasicProductURLCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0028, 0x000E, onReportBasicProductLabelCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0028, 0x000F, onReportBasicSerialNumberCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0028, 0x0010, onReportBasicLocalConfigDisabledCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0028, 0x0011, onReportBasicReachableCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0028, 0xFFFD, onReportBasicClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x000F, 0x0051, onReportBinaryInputBasicOutOfServiceCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x000F, 0x0055, onReportBinaryInputBasicPresentValueCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x000F, 0x006F, onReportBinaryInputBasicStatusFlagsCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x000F, 0xFFFD, - onReportBinaryInputBasicClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x001E, 0xFFFD, onReportBindingClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0045, 0x0000, onReportBooleanStateStateValueCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0045, 0xFFFD, onReportBooleanStateClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0025, 0x0002, onReportBridgedActionsSetupUrlCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0025, 0xFFFD, - onReportBridgedActionsClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0039, 0xFFFD, - onReportBridgedDeviceBasicClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0000, onReportColorControlCurrentHueCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0001, - onReportColorControlCurrentSaturationCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0002, onReportColorControlRemainingTimeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0003, onReportColorControlCurrentXCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0004, onReportColorControlCurrentYCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0005, - onReportColorControlDriftCompensationCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0006, onReportColorControlCompensationTextCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0007, onReportColorControlColorTemperatureCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0008, onReportColorControlColorModeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x000F, - onReportColorControlColorControlOptionsCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0010, - onReportColorControlNumberOfPrimariesCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0011, onReportColorControlPrimary1XCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0012, onReportColorControlPrimary1YCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0013, - onReportColorControlPrimary1IntensityCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0015, onReportColorControlPrimary2XCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0016, onReportColorControlPrimary2YCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0017, - onReportColorControlPrimary2IntensityCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0019, onReportColorControlPrimary3XCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x001A, onReportColorControlPrimary3YCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x001B, - onReportColorControlPrimary3IntensityCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0020, onReportColorControlPrimary4XCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0021, onReportColorControlPrimary4YCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0022, - onReportColorControlPrimary4IntensityCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0024, onReportColorControlPrimary5XCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0025, onReportColorControlPrimary5YCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0026, - onReportColorControlPrimary5IntensityCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0028, onReportColorControlPrimary6XCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0029, onReportColorControlPrimary6YCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x002A, - onReportColorControlPrimary6IntensityCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0030, onReportColorControlWhitePointXCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0031, onReportColorControlWhitePointYCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0032, onReportColorControlColorPointRXCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0033, onReportColorControlColorPointRYCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0034, - onReportColorControlColorPointRIntensityCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0036, onReportColorControlColorPointGXCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0037, onReportColorControlColorPointGYCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x0038, - onReportColorControlColorPointGIntensityCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x003A, onReportColorControlColorPointBXCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x003B, onReportColorControlColorPointBYCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x003C, - onReportColorControlColorPointBIntensityCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x4000, - onReportColorControlEnhancedCurrentHueCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x4001, - onReportColorControlEnhancedColorModeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x4002, onReportColorControlColorLoopActiveCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x4003, - onReportColorControlColorLoopDirectionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x4004, onReportColorControlColorLoopTimeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x4005, - onReportColorControlColorLoopStartEnhancedHueCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x4006, - onReportColorControlColorLoopStoredEnhancedHueCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x400A, - onReportColorControlColorCapabilitiesCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x400B, - onReportColorControlColorTempPhysicalMinCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x400C, - onReportColorControlColorTempPhysicalMaxCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x400D, - onReportColorControlCoupleColorTempToLevelMinMiredsCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0x4010, - onReportColorControlStartUpColorTemperatureMiredsCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0300, 0xFFFD, onReportColorControlClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050A, 0x0001, - onReportContentLauncherSupportedStreamingProtocolsCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050A, 0xFFFD, - onReportContentLauncherClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x001D, 0xFFFD, onReportDescriptorClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0101, 0x0000, onReportDoorLockLockStateCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0101, 0x0001, onReportDoorLockLockTypeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0101, 0x0002, onReportDoorLockActuatorEnabledCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0101, 0x0003, onReportDoorLockDoorStateCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0101, 0x0021, onReportDoorLockLanguageCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0101, 0x0023, onReportDoorLockAutoRelockTimeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0101, 0x0024, onReportDoorLockSoundVolumeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0101, 0x0025, onReportDoorLockOperatingModeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0101, 0x0029, - onReportDoorLockEnableOneTouchLockingCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0101, 0x002B, - onReportDoorLockEnablePrivacyModeButtonCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0101, 0x0030, onReportDoorLockWrongCodeEntryLimitCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0101, 0xFFFD, onReportDoorLockClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0B04, 0x0000, - onReportElectricalMeasurementMeasurementTypeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0B04, 0x0304, - onReportElectricalMeasurementTotalActivePowerCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0B04, 0x0505, - onReportElectricalMeasurementRmsVoltageCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0B04, 0x0506, - onReportElectricalMeasurementRmsVoltageMinCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0B04, 0x0507, - onReportElectricalMeasurementRmsVoltageMaxCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0B04, 0x0508, - onReportElectricalMeasurementRmsCurrentCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0B04, 0x0509, - onReportElectricalMeasurementRmsCurrentMinCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0B04, 0x050A, - onReportElectricalMeasurementRmsCurrentMaxCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0B04, 0x050B, - onReportElectricalMeasurementActivePowerCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0B04, 0x050C, - onReportElectricalMeasurementActivePowerMinCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0B04, 0x050D, - onReportElectricalMeasurementActivePowerMaxCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0B04, 0xFFFD, - onReportElectricalMeasurementClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0037, 0x0000, - onReportEthernetNetworkDiagnosticsPHYRateCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0037, 0x0001, - onReportEthernetNetworkDiagnosticsFullDuplexCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0037, 0x0002, - onReportEthernetNetworkDiagnosticsPacketRxCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0037, 0x0003, - onReportEthernetNetworkDiagnosticsPacketTxCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0037, 0x0004, - onReportEthernetNetworkDiagnosticsTxErrCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0037, 0x0005, - onReportEthernetNetworkDiagnosticsCollisionCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0037, 0x0006, - onReportEthernetNetworkDiagnosticsOverrunCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0037, 0x0007, - onReportEthernetNetworkDiagnosticsCarrierDetectCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0037, 0x0008, - onReportEthernetNetworkDiagnosticsTimeSinceResetCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0037, 0xFFFD, - onReportEthernetNetworkDiagnosticsClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0040, 0xFFFD, onReportFixedLabelClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0404, 0x0000, onReportFlowMeasurementMeasuredValueCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0404, 0x0001, - onReportFlowMeasurementMinMeasuredValueCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0404, 0x0002, - onReportFlowMeasurementMaxMeasuredValueCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0404, 0x0003, onReportFlowMeasurementToleranceCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0404, 0xFFFD, - onReportFlowMeasurementClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0030, 0x0000, - onReportGeneralCommissioningBreadcrumbCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0030, 0xFFFD, - onReportGeneralCommissioningClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0033, 0x0001, - onReportGeneralDiagnosticsRebootCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0033, 0x0002, onReportGeneralDiagnosticsUpTimeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0033, 0x0003, - onReportGeneralDiagnosticsTotalOperationalHoursCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0033, 0x0004, - onReportGeneralDiagnosticsBootReasonsCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0033, 0xFFFD, - onReportGeneralDiagnosticsClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x003F, 0xFFFD, - onReportGroupKeyManagementClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0004, 0x0000, onReportGroupsNameSupportCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0004, 0xFFFD, onReportGroupsClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0003, 0x0000, onReportIdentifyIdentifyTimeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0003, 0x0001, onReportIdentifyIdentifyTypeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0003, 0xFFFD, onReportIdentifyClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0400, 0x0000, - onReportIlluminanceMeasurementMeasuredValueCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0400, 0x0001, - onReportIlluminanceMeasurementMinMeasuredValueCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0400, 0x0002, - onReportIlluminanceMeasurementMaxMeasuredValueCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0400, 0x0003, - onReportIlluminanceMeasurementToleranceCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0400, 0x0004, - onReportIlluminanceMeasurementLightSensorTypeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0400, 0xFFFD, - onReportIlluminanceMeasurementClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0509, 0xFFFD, onReportKeypadInputClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0008, 0x0000, onReportLevelControlCurrentLevelCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0008, 0x0001, onReportLevelControlRemainingTimeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0008, 0x0002, onReportLevelControlMinLevelCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0008, 0x0003, onReportLevelControlMaxLevelCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0008, 0x0004, onReportLevelControlCurrentFrequencyCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0008, 0x0005, onReportLevelControlMinFrequencyCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0008, 0x0006, onReportLevelControlMaxFrequencyCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0008, 0x000F, onReportLevelControlOptionsCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0008, 0x0010, - onReportLevelControlOnOffTransitionTimeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0008, 0x0011, onReportLevelControlOnLevelCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0008, 0x0012, onReportLevelControlOnTransitionTimeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0008, 0x0013, - onReportLevelControlOffTransitionTimeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0008, 0x0014, onReportLevelControlDefaultMoveRateCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0008, 0x4000, - onReportLevelControlStartUpCurrentLevelCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0008, 0xFFFD, onReportLevelControlClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0508, 0xFFFD, onReportLowPowerClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0507, 0x0001, onReportMediaInputCurrentMediaInputCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0507, 0xFFFD, onReportMediaInputClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0506, 0x0000, onReportMediaPlaybackPlaybackStateCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0506, 0x0001, onReportMediaPlaybackStartTimeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0506, 0x0002, onReportMediaPlaybackDurationCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0506, 0x0005, onReportMediaPlaybackSeekRangeEndCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0506, 0x0006, onReportMediaPlaybackSeekRangeStartCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0506, 0xFFFD, onReportMediaPlaybackClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0050, 0x0000, onReportModeSelectCurrentModeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0050, 0x0002, onReportModeSelectOnModeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0050, 0x0003, onReportModeSelectStartUpModeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0050, 0x0004, onReportModeSelectDescriptionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0050, 0xFFFD, onReportModeSelectClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0031, 0xFFFC, - onReportNetworkCommissioningFeatureMapCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0031, 0xFFFD, - onReportNetworkCommissioningClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0029, 0xFFFD, - onReportOtaSoftwareUpdateProviderClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x002A, 0x0001, - onReportOtaSoftwareUpdateRequestorDefaultOtaProviderCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x002A, 0x0002, - onReportOtaSoftwareUpdateRequestorUpdatePossibleCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x002A, 0xFFFD, - onReportOtaSoftwareUpdateRequestorClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0406, 0x0000, onReportOccupancySensingOccupancyCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0406, 0x0001, - onReportOccupancySensingOccupancySensorTypeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0406, 0x0002, - onReportOccupancySensingOccupancySensorTypeBitmapCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0406, 0xFFFD, - onReportOccupancySensingClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0006, 0x0000, onReportOnOffOnOffCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0006, 0x4000, onReportOnOffGlobalSceneControlCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0006, 0x4001, onReportOnOffOnTimeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0006, 0x4002, onReportOnOffOffWaitTimeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0006, 0x4003, onReportOnOffStartUpOnOffCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0006, 0xFFFC, onReportOnOffFeatureMapCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0006, 0xFFFD, onReportOnOffClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0007, 0x0000, - onReportOnOffSwitchConfigurationSwitchTypeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0007, 0x0010, - onReportOnOffSwitchConfigurationSwitchActionsCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0007, 0xFFFD, - onReportOnOffSwitchConfigurationClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x003E, 0x0002, - onReportOperationalCredentialsSupportedFabricsCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x003E, 0x0003, - onReportOperationalCredentialsCommissionedFabricsCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x003E, 0x0005, - onReportOperationalCredentialsCurrentFabricIndexCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x003E, 0xFFFD, - onReportOperationalCredentialsClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x002F, 0x0000, onReportPowerSourceStatusCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x002F, 0x0001, onReportPowerSourceOrderCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x002F, 0x0002, onReportPowerSourceDescriptionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x002F, 0x000B, onReportPowerSourceBatteryVoltageCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x002F, 0x000C, - onReportPowerSourceBatteryPercentRemainingCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x002F, 0x000D, - onReportPowerSourceBatteryTimeRemainingCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x002F, 0x000E, - onReportPowerSourceBatteryChargeLevelCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x002F, 0x001A, - onReportPowerSourceBatteryChargeStateCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x002F, 0xFFFC, onReportPowerSourceFeatureMapCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x002F, 0xFFFD, onReportPowerSourceClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0403, 0x0000, - onReportPressureMeasurementMeasuredValueCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0403, 0x0001, - onReportPressureMeasurementMinMeasuredValueCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0403, 0x0002, - onReportPressureMeasurementMaxMeasuredValueCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0403, 0xFFFD, - onReportPressureMeasurementClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x0000, - onReportPumpConfigurationAndControlMaxPressureCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x0001, - onReportPumpConfigurationAndControlMaxSpeedCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x0002, - onReportPumpConfigurationAndControlMaxFlowCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x0003, - onReportPumpConfigurationAndControlMinConstPressureCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x0004, - onReportPumpConfigurationAndControlMaxConstPressureCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x0005, - onReportPumpConfigurationAndControlMinCompPressureCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x0006, - onReportPumpConfigurationAndControlMaxCompPressureCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x0007, - onReportPumpConfigurationAndControlMinConstSpeedCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x0008, - onReportPumpConfigurationAndControlMaxConstSpeedCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x0009, - onReportPumpConfigurationAndControlMinConstFlowCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x000A, - onReportPumpConfigurationAndControlMaxConstFlowCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x000B, - onReportPumpConfigurationAndControlMinConstTempCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x000C, - onReportPumpConfigurationAndControlMaxConstTempCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x0010, - onReportPumpConfigurationAndControlPumpStatusCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x0011, - onReportPumpConfigurationAndControlEffectiveOperationModeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x0012, - onReportPumpConfigurationAndControlEffectiveControlModeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x0013, - onReportPumpConfigurationAndControlCapacityCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x0014, - onReportPumpConfigurationAndControlSpeedCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x0015, - onReportPumpConfigurationAndControlLifetimeRunningHoursCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x0016, - onReportPumpConfigurationAndControlPowerCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x0017, - onReportPumpConfigurationAndControlLifetimeEnergyConsumedCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x0020, - onReportPumpConfigurationAndControlOperationModeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x0021, - onReportPumpConfigurationAndControlControlModeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0x0022, - onReportPumpConfigurationAndControlAlarmMaskCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0xFFFC, - onReportPumpConfigurationAndControlFeatureMapCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0200, 0xFFFD, - onReportPumpConfigurationAndControlClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0405, 0x0000, - onReportRelativeHumidityMeasurementMeasuredValueCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0405, 0x0001, - onReportRelativeHumidityMeasurementMinMeasuredValueCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0405, 0x0002, - onReportRelativeHumidityMeasurementMaxMeasuredValueCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0405, 0x0003, - onReportRelativeHumidityMeasurementToleranceCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0405, 0xFFFD, - onReportRelativeHumidityMeasurementClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0005, 0x0000, onReportScenesSceneCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0005, 0x0001, onReportScenesCurrentSceneCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0005, 0x0002, onReportScenesCurrentGroupCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0005, 0x0003, onReportScenesSceneValidCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0005, 0x0004, onReportScenesNameSupportCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0005, 0xFFFD, onReportScenesClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0034, 0x0001, - onReportSoftwareDiagnosticsCurrentHeapFreeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0034, 0x0002, - onReportSoftwareDiagnosticsCurrentHeapUsedCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0034, 0x0003, - onReportSoftwareDiagnosticsCurrentHeapHighWatermarkCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0034, 0xFFFD, - onReportSoftwareDiagnosticsClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x003B, 0x0000, onReportSwitchNumberOfPositionsCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x003B, 0x0001, onReportSwitchCurrentPositionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x003B, 0x0002, onReportSwitchMultiPressMaxCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x003B, 0xFFFC, onReportSwitchFeatureMapCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x003B, 0xFFFD, onReportSwitchClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0504, 0xFFFD, onReportTvChannelClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0505, 0xFFFD, - onReportTargetNavigatorClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0402, 0x0000, - onReportTemperatureMeasurementMeasuredValueCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0402, 0x0001, - onReportTemperatureMeasurementMinMeasuredValueCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0402, 0x0002, - onReportTemperatureMeasurementMaxMeasuredValueCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0402, 0x0003, - onReportTemperatureMeasurementToleranceCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0402, 0xFFFD, - onReportTemperatureMeasurementClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0000, onReportTestClusterBooleanCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0001, onReportTestClusterBitmap8Callback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0002, onReportTestClusterBitmap16Callback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0003, onReportTestClusterBitmap32Callback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0004, onReportTestClusterBitmap64Callback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0005, onReportTestClusterInt8uCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0006, onReportTestClusterInt16uCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0007, onReportTestClusterInt24uCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0008, onReportTestClusterInt32uCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0009, onReportTestClusterInt40uCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x000A, onReportTestClusterInt48uCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x000B, onReportTestClusterInt56uCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x000C, onReportTestClusterInt64uCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x000D, onReportTestClusterInt8sCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x000E, onReportTestClusterInt16sCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x000F, onReportTestClusterInt24sCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0010, onReportTestClusterInt32sCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0011, onReportTestClusterInt40sCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0012, onReportTestClusterInt48sCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0013, onReportTestClusterInt56sCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0014, onReportTestClusterInt64sCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0015, onReportTestClusterEnum8Callback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0016, onReportTestClusterEnum16Callback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0017, onReportTestClusterFloatSingleCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0018, onReportTestClusterFloatDoubleCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0019, onReportTestClusterOctetStringCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x001D, onReportTestClusterLongOctetStringCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x001E, onReportTestClusterCharStringCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x001F, onReportTestClusterLongCharStringCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0020, onReportTestClusterEpochUsCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0021, onReportTestClusterEpochSCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0022, onReportTestClusterVendorIdCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0024, onReportTestClusterEnumAttrCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0026, - onReportTestClusterRangeRestrictedInt8uCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0027, - onReportTestClusterRangeRestrictedInt8sCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0028, - onReportTestClusterRangeRestrictedInt16uCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x0029, - onReportTestClusterRangeRestrictedInt16sCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x00FF, onReportTestClusterUnsupportedCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8000, onReportTestClusterNullableBooleanCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8001, onReportTestClusterNullableBitmap8Callback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8002, onReportTestClusterNullableBitmap16Callback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8003, onReportTestClusterNullableBitmap32Callback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8004, onReportTestClusterNullableBitmap64Callback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8005, onReportTestClusterNullableInt8uCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8006, onReportTestClusterNullableInt16uCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8007, onReportTestClusterNullableInt24uCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8008, onReportTestClusterNullableInt32uCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8009, onReportTestClusterNullableInt40uCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x800A, onReportTestClusterNullableInt48uCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x800B, onReportTestClusterNullableInt56uCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x800C, onReportTestClusterNullableInt64uCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x800D, onReportTestClusterNullableInt8sCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x800E, onReportTestClusterNullableInt16sCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x800F, onReportTestClusterNullableInt24sCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8010, onReportTestClusterNullableInt32sCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8011, onReportTestClusterNullableInt40sCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8012, onReportTestClusterNullableInt48sCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8013, onReportTestClusterNullableInt56sCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8014, onReportTestClusterNullableInt64sCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8015, onReportTestClusterNullableEnum8Callback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8016, onReportTestClusterNullableEnum16Callback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8017, - onReportTestClusterNullableFloatSingleCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8018, - onReportTestClusterNullableFloatDoubleCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8019, - onReportTestClusterNullableOctetStringCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x801E, - onReportTestClusterNullableCharStringCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8024, onReportTestClusterNullableEnumAttrCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8026, - onReportTestClusterNullableRangeRestrictedInt8uCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8027, - onReportTestClusterNullableRangeRestrictedInt8sCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8028, - onReportTestClusterNullableRangeRestrictedInt16uCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0x8029, - onReportTestClusterNullableRangeRestrictedInt16sCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x050F, 0xFFFD, onReportTestClusterClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0201, 0x0000, onReportThermostatLocalTemperatureCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0201, 0x0003, - onReportThermostatAbsMinHeatSetpointLimitCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0201, 0x0004, - onReportThermostatAbsMaxHeatSetpointLimitCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0201, 0x0005, - onReportThermostatAbsMinCoolSetpointLimitCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0201, 0x0006, - onReportThermostatAbsMaxCoolSetpointLimitCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0201, 0x0011, - onReportThermostatOccupiedCoolingSetpointCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0201, 0x0012, - onReportThermostatOccupiedHeatingSetpointCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0201, 0x0015, - onReportThermostatMinHeatSetpointLimitCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0201, 0x0016, - onReportThermostatMaxHeatSetpointLimitCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0201, 0x0017, - onReportThermostatMinCoolSetpointLimitCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0201, 0x0018, - onReportThermostatMaxCoolSetpointLimitCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0201, 0x0019, - onReportThermostatMinSetpointDeadBandCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0201, 0x001B, - onReportThermostatControlSequenceOfOperationCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0201, 0x001C, onReportThermostatSystemModeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0201, 0x0020, onReportThermostatStartOfWeekCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0201, 0x0021, - onReportThermostatNumberOfWeeklyTransitionsCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0201, 0x0022, - onReportThermostatNumberOfDailyTransitionsCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0201, 0xFFFC, onReportThermostatFeatureMapCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0201, 0xFFFD, onReportThermostatClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0204, 0x0000, - onReportThermostatUserInterfaceConfigurationTemperatureDisplayModeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0204, 0x0001, - onReportThermostatUserInterfaceConfigurationKeypadLockoutCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0204, 0x0002, - onReportThermostatUserInterfaceConfigurationScheduleProgrammingVisibilityCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0204, 0xFFFD, - onReportThermostatUserInterfaceConfigurationClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0000, - onReportThreadNetworkDiagnosticsChannelCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0001, - onReportThreadNetworkDiagnosticsRoutingRoleCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0002, - onReportThreadNetworkDiagnosticsNetworkNameCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0003, - onReportThreadNetworkDiagnosticsPanIdCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0004, - onReportThreadNetworkDiagnosticsExtendedPanIdCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0005, - onReportThreadNetworkDiagnosticsMeshLocalPrefixCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0006, - onReportThreadNetworkDiagnosticsOverrunCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0009, - onReportThreadNetworkDiagnosticsPartitionIdCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x000A, - onReportThreadNetworkDiagnosticsWeightingCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x000B, - onReportThreadNetworkDiagnosticsDataVersionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x000C, - onReportThreadNetworkDiagnosticsStableDataVersionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x000D, - onReportThreadNetworkDiagnosticsLeaderRouterIdCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x000E, - onReportThreadNetworkDiagnosticsDetachedRoleCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x000F, - onReportThreadNetworkDiagnosticsChildRoleCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0010, - onReportThreadNetworkDiagnosticsRouterRoleCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0011, - onReportThreadNetworkDiagnosticsLeaderRoleCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0012, - onReportThreadNetworkDiagnosticsAttachAttemptCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0013, - onReportThreadNetworkDiagnosticsPartitionIdChangeCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0014, - onReportThreadNetworkDiagnosticsBetterPartitionAttachAttemptCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0015, - onReportThreadNetworkDiagnosticsParentChangeCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0016, - onReportThreadNetworkDiagnosticsTxTotalCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0017, - onReportThreadNetworkDiagnosticsTxUnicastCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0018, - onReportThreadNetworkDiagnosticsTxBroadcastCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0019, - onReportThreadNetworkDiagnosticsTxAckRequestedCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x001A, - onReportThreadNetworkDiagnosticsTxAckedCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x001B, - onReportThreadNetworkDiagnosticsTxNoAckRequestedCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x001C, - onReportThreadNetworkDiagnosticsTxDataCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x001D, - onReportThreadNetworkDiagnosticsTxDataPollCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x001E, - onReportThreadNetworkDiagnosticsTxBeaconCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x001F, - onReportThreadNetworkDiagnosticsTxBeaconRequestCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0020, - onReportThreadNetworkDiagnosticsTxOtherCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0021, - onReportThreadNetworkDiagnosticsTxRetryCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0022, - onReportThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0023, - onReportThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0024, - onReportThreadNetworkDiagnosticsTxErrCcaCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0025, - onReportThreadNetworkDiagnosticsTxErrAbortCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0026, - onReportThreadNetworkDiagnosticsTxErrBusyChannelCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0027, - onReportThreadNetworkDiagnosticsRxTotalCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0028, - onReportThreadNetworkDiagnosticsRxUnicastCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0029, - onReportThreadNetworkDiagnosticsRxBroadcastCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x002A, - onReportThreadNetworkDiagnosticsRxDataCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x002B, - onReportThreadNetworkDiagnosticsRxDataPollCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x002C, - onReportThreadNetworkDiagnosticsRxBeaconCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x002D, - onReportThreadNetworkDiagnosticsRxBeaconRequestCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x002E, - onReportThreadNetworkDiagnosticsRxOtherCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x002F, - onReportThreadNetworkDiagnosticsRxAddressFilteredCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0030, - onReportThreadNetworkDiagnosticsRxDestAddrFilteredCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0031, - onReportThreadNetworkDiagnosticsRxDuplicatedCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0032, - onReportThreadNetworkDiagnosticsRxErrNoFrameCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0033, - onReportThreadNetworkDiagnosticsRxErrUnknownNeighborCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0034, - onReportThreadNetworkDiagnosticsRxErrInvalidSrcAddrCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0035, - onReportThreadNetworkDiagnosticsRxErrSecCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0036, - onReportThreadNetworkDiagnosticsRxErrFcsCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0037, - onReportThreadNetworkDiagnosticsRxErrOtherCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0038, - onReportThreadNetworkDiagnosticsActiveTimestampCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x0039, - onReportThreadNetworkDiagnosticsPendingTimestampCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x003A, - onReportThreadNetworkDiagnosticsDelayCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0x003C, - onReportThreadNetworkDiagnosticsChannelMaskCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0035, 0xFFFD, - onReportThreadNetworkDiagnosticsClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0503, 0x0000, onReportWakeOnLanWakeOnLanMacAddressCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0503, 0xFFFD, onReportWakeOnLanClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0036, 0x0000, onReportWiFiNetworkDiagnosticsBssidCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0036, 0x0001, - onReportWiFiNetworkDiagnosticsSecurityTypeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0036, 0x0002, - onReportWiFiNetworkDiagnosticsWiFiVersionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0036, 0x0003, - onReportWiFiNetworkDiagnosticsChannelNumberCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0036, 0x0004, onReportWiFiNetworkDiagnosticsRssiCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0036, 0x0005, - onReportWiFiNetworkDiagnosticsBeaconLostCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0036, 0x0006, - onReportWiFiNetworkDiagnosticsBeaconRxCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0036, 0x0007, - onReportWiFiNetworkDiagnosticsPacketMulticastRxCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0036, 0x0008, - onReportWiFiNetworkDiagnosticsPacketMulticastTxCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0036, 0x0009, - onReportWiFiNetworkDiagnosticsPacketUnicastRxCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0036, 0x000A, - onReportWiFiNetworkDiagnosticsPacketUnicastTxCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0036, 0x000B, - onReportWiFiNetworkDiagnosticsCurrentMaxRateCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0036, 0x000C, - onReportWiFiNetworkDiagnosticsOverrunCountCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0036, 0xFFFD, - onReportWiFiNetworkDiagnosticsClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0102, 0x0000, onReportWindowCoveringTypeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0102, 0x0003, - onReportWindowCoveringCurrentPositionLiftCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0102, 0x0004, - onReportWindowCoveringCurrentPositionTiltCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0102, 0x0007, onReportWindowCoveringConfigStatusCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0102, 0x0008, - onReportWindowCoveringCurrentPositionLiftPercentageCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0102, 0x0009, - onReportWindowCoveringCurrentPositionTiltPercentageCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0102, 0x000A, - onReportWindowCoveringOperationalStatusCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0102, 0x000B, - onReportWindowCoveringTargetPositionLiftPercent100thsCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0102, 0x000C, - onReportWindowCoveringTargetPositionTiltPercent100thsCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0102, 0x000D, onReportWindowCoveringEndProductTypeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0102, 0x000E, - onReportWindowCoveringCurrentPositionLiftPercent100thsCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0102, 0x000F, - onReportWindowCoveringCurrentPositionTiltPercent100thsCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0102, 0x0010, - onReportWindowCoveringInstalledOpenLimitLiftCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0102, 0x0011, - onReportWindowCoveringInstalledClosedLimitLiftCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0102, 0x0012, - onReportWindowCoveringInstalledOpenLimitTiltCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0102, 0x0013, - onReportWindowCoveringInstalledClosedLimitTiltCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0102, 0x0017, onReportWindowCoveringModeCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0102, 0x001A, onReportWindowCoveringSafetyStatusCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0102, 0xFFFC, onReportWindowCoveringFeatureMapCallback->Cancel(), - BasicAttributeFilter); - callbacksMgr.AddReportCallback(remoteId, endpointId, 0x0102, 0xFFFD, - onReportWindowCoveringClusterRevisionCallback->Cancel(), - BasicAttributeFilter); - } - -private: - chip::Callback::Callback * - onReportAccountLoginClusterRevisionCallback = - new chip::Callback::Callback( - ReadAccountLoginClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportAdministratorCommissioningClusterRevisionCallback = - new chip::Callback::Callback( - ReadAdministratorCommissioningClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportApplicationBasicVendorNameCallback = - new chip::Callback::Callback( - ReadApplicationBasicVendorName::OnAttributeResponse, this); - chip::Callback::Callback * - onReportApplicationBasicVendorIdCallback = - new chip::Callback::Callback( - ReadApplicationBasicVendorId::OnAttributeResponse, this); - chip::Callback::Callback * - onReportApplicationBasicApplicationNameCallback = - new chip::Callback::Callback( - ReadApplicationBasicApplicationName::OnAttributeResponse, this); - chip::Callback::Callback * - onReportApplicationBasicProductIdCallback = - new chip::Callback::Callback( - ReadApplicationBasicProductId::OnAttributeResponse, this); - chip::Callback::Callback * - onReportApplicationBasicApplicationStatusCallback = - new chip::Callback::Callback( - ReadApplicationBasicApplicationStatus::OnAttributeResponse, this); - chip::Callback::Callback * - onReportApplicationBasicApplicationVersionCallback = - new chip::Callback::Callback( - ReadApplicationBasicApplicationVersion::OnAttributeResponse, this); - chip::Callback::Callback * - onReportApplicationBasicClusterRevisionCallback = - new chip::Callback::Callback( - ReadApplicationBasicClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportApplicationLauncherClusterRevisionCallback = - new chip::Callback::Callback( - ReadApplicationLauncherClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportAudioOutputCurrentAudioOutputCallback = - new chip::Callback::Callback( - ReadAudioOutputCurrentAudioOutput::OnAttributeResponse, this); - chip::Callback::Callback * - onReportAudioOutputClusterRevisionCallback = - new chip::Callback::Callback( - ReadAudioOutputClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportBarrierControlBarrierMovingStateCallback = - new chip::Callback::Callback( - ReadBarrierControlBarrierMovingState::OnAttributeResponse, this); - chip::Callback::Callback * - onReportBarrierControlBarrierSafetyStatusCallback = - new chip::Callback::Callback( - ReadBarrierControlBarrierSafetyStatus::OnAttributeResponse, this); - chip::Callback::Callback * - onReportBarrierControlBarrierCapabilitiesCallback = - new chip::Callback::Callback( - ReadBarrierControlBarrierCapabilities::OnAttributeResponse, this); - chip::Callback::Callback * - onReportBarrierControlBarrierPositionCallback = - new chip::Callback::Callback( - ReadBarrierControlBarrierPosition::OnAttributeResponse, this); - chip::Callback::Callback * - onReportBarrierControlClusterRevisionCallback = - new chip::Callback::Callback( - ReadBarrierControlClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportBasicInteractionModelVersionCallback = - new chip::Callback::Callback( - ReadBasicInteractionModelVersion::OnAttributeResponse, this); - chip::Callback::Callback * onReportBasicVendorNameCallback = - new chip::Callback::Callback(ReadBasicVendorName::OnAttributeResponse, - this); - chip::Callback::Callback * onReportBasicVendorIDCallback = - new chip::Callback::Callback(ReadBasicVendorID::OnAttributeResponse, - this); - chip::Callback::Callback * onReportBasicProductNameCallback = - new chip::Callback::Callback( - ReadBasicProductName::OnAttributeResponse, this); - chip::Callback::Callback * onReportBasicProductIDCallback = - new chip::Callback::Callback(ReadBasicProductID::OnAttributeResponse, - this); - chip::Callback::Callback * onReportBasicNodeLabelCallback = - new chip::Callback::Callback(ReadBasicNodeLabel::OnAttributeResponse, - this); - chip::Callback::Callback * onReportBasicLocationCallback = - new chip::Callback::Callback(ReadBasicLocation::OnAttributeResponse, - this); - chip::Callback::Callback * onReportBasicHardwareVersionCallback = - new chip::Callback::Callback( - ReadBasicHardwareVersion::OnAttributeResponse, this); - chip::Callback::Callback * - onReportBasicHardwareVersionStringCallback = - new chip::Callback::Callback( - ReadBasicHardwareVersionString::OnAttributeResponse, this); - chip::Callback::Callback * onReportBasicSoftwareVersionCallback = - new chip::Callback::Callback( - ReadBasicSoftwareVersion::OnAttributeResponse, this); - chip::Callback::Callback * - onReportBasicSoftwareVersionStringCallback = - new chip::Callback::Callback( - ReadBasicSoftwareVersionString::OnAttributeResponse, this); - chip::Callback::Callback * onReportBasicManufacturingDateCallback = - new chip::Callback::Callback( - ReadBasicManufacturingDate::OnAttributeResponse, this); - chip::Callback::Callback * onReportBasicPartNumberCallback = - new chip::Callback::Callback(ReadBasicPartNumber::OnAttributeResponse, - this); - chip::Callback::Callback * onReportBasicProductURLCallback = - new chip::Callback::Callback(ReadBasicProductURL::OnAttributeResponse, - this); - chip::Callback::Callback * onReportBasicProductLabelCallback = - new chip::Callback::Callback( - ReadBasicProductLabel::OnAttributeResponse, this); - chip::Callback::Callback * onReportBasicSerialNumberCallback = - new chip::Callback::Callback( - ReadBasicSerialNumber::OnAttributeResponse, this); - chip::Callback::Callback * - onReportBasicLocalConfigDisabledCallback = - new chip::Callback::Callback( - ReadBasicLocalConfigDisabled::OnAttributeResponse, this); - chip::Callback::Callback * onReportBasicReachableCallback = - new chip::Callback::Callback(ReadBasicReachable::OnAttributeResponse, - this); - chip::Callback::Callback * onReportBasicClusterRevisionCallback = - new chip::Callback::Callback( - ReadBasicClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportBinaryInputBasicOutOfServiceCallback = - new chip::Callback::Callback( - ReadBinaryInputBasicOutOfService::OnAttributeResponse, this); - chip::Callback::Callback * - onReportBinaryInputBasicPresentValueCallback = - new chip::Callback::Callback( - ReadBinaryInputBasicPresentValue::OnAttributeResponse, this); - chip::Callback::Callback * - onReportBinaryInputBasicStatusFlagsCallback = - new chip::Callback::Callback( - ReadBinaryInputBasicStatusFlags::OnAttributeResponse, this); - chip::Callback::Callback * - onReportBinaryInputBasicClusterRevisionCallback = - new chip::Callback::Callback( - ReadBinaryInputBasicClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * onReportBindingClusterRevisionCallback = - new chip::Callback::Callback( - ReadBindingClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * onReportBooleanStateStateValueCallback = - new chip::Callback::Callback( - ReadBooleanStateStateValue::OnAttributeResponse, this); - chip::Callback::Callback * - onReportBooleanStateClusterRevisionCallback = - new chip::Callback::Callback( - ReadBooleanStateClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * onReportBridgedActionsSetupUrlCallback = - new chip::Callback::Callback( - ReadBridgedActionsSetupUrl::OnAttributeResponse, this); - chip::Callback::Callback * - onReportBridgedActionsClusterRevisionCallback = - new chip::Callback::Callback( - ReadBridgedActionsClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportBridgedDeviceBasicClusterRevisionCallback = - new chip::Callback::Callback( - ReadBridgedDeviceBasicClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * onReportColorControlCurrentHueCallback = - new chip::Callback::Callback( - ReadColorControlCurrentHue::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlCurrentSaturationCallback = - new chip::Callback::Callback( - ReadColorControlCurrentSaturation::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlRemainingTimeCallback = - new chip::Callback::Callback( - ReadColorControlRemainingTime::OnAttributeResponse, this); - chip::Callback::Callback * onReportColorControlCurrentXCallback = - new chip::Callback::Callback( - ReadColorControlCurrentX::OnAttributeResponse, this); - chip::Callback::Callback * onReportColorControlCurrentYCallback = - new chip::Callback::Callback( - ReadColorControlCurrentY::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlDriftCompensationCallback = - new chip::Callback::Callback( - ReadColorControlDriftCompensation::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlCompensationTextCallback = - new chip::Callback::Callback( - ReadColorControlCompensationText::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlColorTemperatureCallback = - new chip::Callback::Callback( - ReadColorControlColorTemperature::OnAttributeResponse, this); - chip::Callback::Callback * onReportColorControlColorModeCallback = - new chip::Callback::Callback( - ReadColorControlColorMode::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlColorControlOptionsCallback = - new chip::Callback::Callback( - ReadColorControlColorControlOptions::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlNumberOfPrimariesCallback = - new chip::Callback::Callback( - ReadColorControlNumberOfPrimaries::OnAttributeResponse, this); - chip::Callback::Callback * onReportColorControlPrimary1XCallback = - new chip::Callback::Callback( - ReadColorControlPrimary1X::OnAttributeResponse, this); - chip::Callback::Callback * onReportColorControlPrimary1YCallback = - new chip::Callback::Callback( - ReadColorControlPrimary1Y::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlPrimary1IntensityCallback = - new chip::Callback::Callback( - ReadColorControlPrimary1Intensity::OnAttributeResponse, this); - chip::Callback::Callback * onReportColorControlPrimary2XCallback = - new chip::Callback::Callback( - ReadColorControlPrimary2X::OnAttributeResponse, this); - chip::Callback::Callback * onReportColorControlPrimary2YCallback = - new chip::Callback::Callback( - ReadColorControlPrimary2Y::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlPrimary2IntensityCallback = - new chip::Callback::Callback( - ReadColorControlPrimary2Intensity::OnAttributeResponse, this); - chip::Callback::Callback * onReportColorControlPrimary3XCallback = - new chip::Callback::Callback( - ReadColorControlPrimary3X::OnAttributeResponse, this); - chip::Callback::Callback * onReportColorControlPrimary3YCallback = - new chip::Callback::Callback( - ReadColorControlPrimary3Y::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlPrimary3IntensityCallback = - new chip::Callback::Callback( - ReadColorControlPrimary3Intensity::OnAttributeResponse, this); - chip::Callback::Callback * onReportColorControlPrimary4XCallback = - new chip::Callback::Callback( - ReadColorControlPrimary4X::OnAttributeResponse, this); - chip::Callback::Callback * onReportColorControlPrimary4YCallback = - new chip::Callback::Callback( - ReadColorControlPrimary4Y::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlPrimary4IntensityCallback = - new chip::Callback::Callback( - ReadColorControlPrimary4Intensity::OnAttributeResponse, this); - chip::Callback::Callback * onReportColorControlPrimary5XCallback = - new chip::Callback::Callback( - ReadColorControlPrimary5X::OnAttributeResponse, this); - chip::Callback::Callback * onReportColorControlPrimary5YCallback = - new chip::Callback::Callback( - ReadColorControlPrimary5Y::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlPrimary5IntensityCallback = - new chip::Callback::Callback( - ReadColorControlPrimary5Intensity::OnAttributeResponse, this); - chip::Callback::Callback * onReportColorControlPrimary6XCallback = - new chip::Callback::Callback( - ReadColorControlPrimary6X::OnAttributeResponse, this); - chip::Callback::Callback * onReportColorControlPrimary6YCallback = - new chip::Callback::Callback( - ReadColorControlPrimary6Y::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlPrimary6IntensityCallback = - new chip::Callback::Callback( - ReadColorControlPrimary6Intensity::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlWhitePointXCallback = - new chip::Callback::Callback( - ReadColorControlWhitePointX::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlWhitePointYCallback = - new chip::Callback::Callback( - ReadColorControlWhitePointY::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlColorPointRXCallback = - new chip::Callback::Callback( - ReadColorControlColorPointRX::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlColorPointRYCallback = - new chip::Callback::Callback( - ReadColorControlColorPointRY::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlColorPointRIntensityCallback = - new chip::Callback::Callback( - ReadColorControlColorPointRIntensity::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlColorPointGXCallback = - new chip::Callback::Callback( - ReadColorControlColorPointGX::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlColorPointGYCallback = - new chip::Callback::Callback( - ReadColorControlColorPointGY::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlColorPointGIntensityCallback = - new chip::Callback::Callback( - ReadColorControlColorPointGIntensity::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlColorPointBXCallback = - new chip::Callback::Callback( - ReadColorControlColorPointBX::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlColorPointBYCallback = - new chip::Callback::Callback( - ReadColorControlColorPointBY::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlColorPointBIntensityCallback = - new chip::Callback::Callback( - ReadColorControlColorPointBIntensity::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlEnhancedCurrentHueCallback = - new chip::Callback::Callback( - ReadColorControlEnhancedCurrentHue::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlEnhancedColorModeCallback = - new chip::Callback::Callback( - ReadColorControlEnhancedColorMode::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlColorLoopActiveCallback = - new chip::Callback::Callback( - ReadColorControlColorLoopActive::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlColorLoopDirectionCallback = - new chip::Callback::Callback( - ReadColorControlColorLoopDirection::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlColorLoopTimeCallback = - new chip::Callback::Callback( - ReadColorControlColorLoopTime::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlColorLoopStartEnhancedHueCallback = - new chip::Callback::Callback( - ReadColorControlColorLoopStartEnhancedHue::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlColorLoopStoredEnhancedHueCallback = - new chip::Callback::Callback( - ReadColorControlColorLoopStoredEnhancedHue::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlColorCapabilitiesCallback = - new chip::Callback::Callback( - ReadColorControlColorCapabilities::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlColorTempPhysicalMinCallback = - new chip::Callback::Callback( - ReadColorControlColorTempPhysicalMin::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlColorTempPhysicalMaxCallback = - new chip::Callback::Callback( - ReadColorControlColorTempPhysicalMax::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlCoupleColorTempToLevelMinMiredsCallback = - new chip::Callback::Callback( - ReadColorControlCoupleColorTempToLevelMinMireds::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlStartUpColorTemperatureMiredsCallback = - new chip::Callback::Callback( - ReadColorControlStartUpColorTemperatureMireds::OnAttributeResponse, this); - chip::Callback::Callback * - onReportColorControlClusterRevisionCallback = - new chip::Callback::Callback( - ReadColorControlClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportContentLauncherSupportedStreamingProtocolsCallback = - new chip::Callback::Callback( - ReadContentLauncherSupportedStreamingProtocols::OnAttributeResponse, this); - chip::Callback::Callback * - onReportContentLauncherClusterRevisionCallback = - new chip::Callback::Callback( - ReadContentLauncherClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportDescriptorClusterRevisionCallback = - new chip::Callback::Callback( - ReadDescriptorClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * onReportDoorLockLockStateCallback = - new chip::Callback::Callback( - ReadDoorLockLockState::OnAttributeResponse, this); - chip::Callback::Callback * onReportDoorLockLockTypeCallback = - new chip::Callback::Callback( - ReadDoorLockLockType::OnAttributeResponse, this); - chip::Callback::Callback * - onReportDoorLockActuatorEnabledCallback = - new chip::Callback::Callback( - ReadDoorLockActuatorEnabled::OnAttributeResponse, this); - chip::Callback::Callback * onReportDoorLockDoorStateCallback = - new chip::Callback::Callback( - ReadDoorLockDoorState::OnAttributeResponse, this); - chip::Callback::Callback * onReportDoorLockLanguageCallback = - new chip::Callback::Callback( - ReadDoorLockLanguage::OnAttributeResponse, this); - chip::Callback::Callback * onReportDoorLockAutoRelockTimeCallback = - new chip::Callback::Callback( - ReadDoorLockAutoRelockTime::OnAttributeResponse, this); - chip::Callback::Callback * onReportDoorLockSoundVolumeCallback = - new chip::Callback::Callback( - ReadDoorLockSoundVolume::OnAttributeResponse, this); - chip::Callback::Callback * onReportDoorLockOperatingModeCallback = - new chip::Callback::Callback( - ReadDoorLockOperatingMode::OnAttributeResponse, this); - chip::Callback::Callback * - onReportDoorLockEnableOneTouchLockingCallback = - new chip::Callback::Callback( - ReadDoorLockEnableOneTouchLocking::OnAttributeResponse, this); - chip::Callback::Callback * - onReportDoorLockEnablePrivacyModeButtonCallback = - new chip::Callback::Callback( - ReadDoorLockEnablePrivacyModeButton::OnAttributeResponse, this); - chip::Callback::Callback * - onReportDoorLockWrongCodeEntryLimitCallback = - new chip::Callback::Callback( - ReadDoorLockWrongCodeEntryLimit::OnAttributeResponse, this); - chip::Callback::Callback * - onReportDoorLockClusterRevisionCallback = - new chip::Callback::Callback( - ReadDoorLockClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportElectricalMeasurementMeasurementTypeCallback = - new chip::Callback::Callback( - ReadElectricalMeasurementMeasurementType::OnAttributeResponse, this); - chip::Callback::Callback * - onReportElectricalMeasurementTotalActivePowerCallback = - new chip::Callback::Callback( - ReadElectricalMeasurementTotalActivePower::OnAttributeResponse, this); - chip::Callback::Callback * - onReportElectricalMeasurementRmsVoltageCallback = - new chip::Callback::Callback( - ReadElectricalMeasurementRmsVoltage::OnAttributeResponse, this); - chip::Callback::Callback * - onReportElectricalMeasurementRmsVoltageMinCallback = - new chip::Callback::Callback( - ReadElectricalMeasurementRmsVoltageMin::OnAttributeResponse, this); - chip::Callback::Callback * - onReportElectricalMeasurementRmsVoltageMaxCallback = - new chip::Callback::Callback( - ReadElectricalMeasurementRmsVoltageMax::OnAttributeResponse, this); - chip::Callback::Callback * - onReportElectricalMeasurementRmsCurrentCallback = - new chip::Callback::Callback( - ReadElectricalMeasurementRmsCurrent::OnAttributeResponse, this); - chip::Callback::Callback * - onReportElectricalMeasurementRmsCurrentMinCallback = - new chip::Callback::Callback( - ReadElectricalMeasurementRmsCurrentMin::OnAttributeResponse, this); - chip::Callback::Callback * - onReportElectricalMeasurementRmsCurrentMaxCallback = - new chip::Callback::Callback( - ReadElectricalMeasurementRmsCurrentMax::OnAttributeResponse, this); - chip::Callback::Callback * - onReportElectricalMeasurementActivePowerCallback = - new chip::Callback::Callback( - ReadElectricalMeasurementActivePower::OnAttributeResponse, this); - chip::Callback::Callback * - onReportElectricalMeasurementActivePowerMinCallback = - new chip::Callback::Callback( - ReadElectricalMeasurementActivePowerMin::OnAttributeResponse, this); - chip::Callback::Callback * - onReportElectricalMeasurementActivePowerMaxCallback = - new chip::Callback::Callback( - ReadElectricalMeasurementActivePowerMax::OnAttributeResponse, this); - chip::Callback::Callback * - onReportElectricalMeasurementClusterRevisionCallback = - new chip::Callback::Callback( - ReadElectricalMeasurementClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportEthernetNetworkDiagnosticsPHYRateCallback = - new chip::Callback::Callback( - ReadEthernetNetworkDiagnosticsPHYRate::OnAttributeResponse, this); - chip::Callback::Callback * - onReportEthernetNetworkDiagnosticsFullDuplexCallback = - new chip::Callback::Callback( - ReadEthernetNetworkDiagnosticsFullDuplex::OnAttributeResponse, this); - chip::Callback::Callback * - onReportEthernetNetworkDiagnosticsPacketRxCountCallback = - new chip::Callback::Callback( - ReadEthernetNetworkDiagnosticsPacketRxCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportEthernetNetworkDiagnosticsPacketTxCountCallback = - new chip::Callback::Callback( - ReadEthernetNetworkDiagnosticsPacketTxCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportEthernetNetworkDiagnosticsTxErrCountCallback = - new chip::Callback::Callback( - ReadEthernetNetworkDiagnosticsTxErrCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportEthernetNetworkDiagnosticsCollisionCountCallback = - new chip::Callback::Callback( - ReadEthernetNetworkDiagnosticsCollisionCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportEthernetNetworkDiagnosticsOverrunCountCallback = - new chip::Callback::Callback( - ReadEthernetNetworkDiagnosticsOverrunCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportEthernetNetworkDiagnosticsCarrierDetectCallback = - new chip::Callback::Callback( - ReadEthernetNetworkDiagnosticsCarrierDetect::OnAttributeResponse, this); - chip::Callback::Callback * - onReportEthernetNetworkDiagnosticsTimeSinceResetCallback = - new chip::Callback::Callback( - ReadEthernetNetworkDiagnosticsTimeSinceReset::OnAttributeResponse, this); - chip::Callback::Callback * - onReportEthernetNetworkDiagnosticsClusterRevisionCallback = - new chip::Callback::Callback( - ReadEthernetNetworkDiagnosticsClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportFixedLabelClusterRevisionCallback = - new chip::Callback::Callback( - ReadFixedLabelClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportFlowMeasurementMeasuredValueCallback = - new chip::Callback::Callback( - ReadFlowMeasurementMeasuredValue::OnAttributeResponse, this); - chip::Callback::Callback * - onReportFlowMeasurementMinMeasuredValueCallback = - new chip::Callback::Callback( - ReadFlowMeasurementMinMeasuredValue::OnAttributeResponse, this); - chip::Callback::Callback * - onReportFlowMeasurementMaxMeasuredValueCallback = - new chip::Callback::Callback( - ReadFlowMeasurementMaxMeasuredValue::OnAttributeResponse, this); - chip::Callback::Callback * - onReportFlowMeasurementToleranceCallback = - new chip::Callback::Callback( - ReadFlowMeasurementTolerance::OnAttributeResponse, this); - chip::Callback::Callback * - onReportFlowMeasurementClusterRevisionCallback = - new chip::Callback::Callback( - ReadFlowMeasurementClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportGeneralCommissioningBreadcrumbCallback = - new chip::Callback::Callback( - ReadGeneralCommissioningBreadcrumb::OnAttributeResponse, this); - chip::Callback::Callback * - onReportGeneralCommissioningClusterRevisionCallback = - new chip::Callback::Callback( - ReadGeneralCommissioningClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportGeneralDiagnosticsRebootCountCallback = - new chip::Callback::Callback( - ReadGeneralDiagnosticsRebootCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportGeneralDiagnosticsUpTimeCallback = - new chip::Callback::Callback( - ReadGeneralDiagnosticsUpTime::OnAttributeResponse, this); - chip::Callback::Callback * - onReportGeneralDiagnosticsTotalOperationalHoursCallback = - new chip::Callback::Callback( - ReadGeneralDiagnosticsTotalOperationalHours::OnAttributeResponse, this); - chip::Callback::Callback * - onReportGeneralDiagnosticsBootReasonsCallback = - new chip::Callback::Callback( - ReadGeneralDiagnosticsBootReasons::OnAttributeResponse, this); - chip::Callback::Callback * - onReportGeneralDiagnosticsClusterRevisionCallback = - new chip::Callback::Callback( - ReadGeneralDiagnosticsClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportGroupKeyManagementClusterRevisionCallback = - new chip::Callback::Callback( - ReadGroupKeyManagementClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * onReportGroupsNameSupportCallback = - new chip::Callback::Callback( - ReadGroupsNameSupport::OnAttributeResponse, this); - chip::Callback::Callback * onReportGroupsClusterRevisionCallback = - new chip::Callback::Callback( - ReadGroupsClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * onReportIdentifyIdentifyTimeCallback = - new chip::Callback::Callback( - ReadIdentifyIdentifyTime::OnAttributeResponse, this); - chip::Callback::Callback * onReportIdentifyIdentifyTypeCallback = - new chip::Callback::Callback( - ReadIdentifyIdentifyType::OnAttributeResponse, this); - chip::Callback::Callback * - onReportIdentifyClusterRevisionCallback = - new chip::Callback::Callback( - ReadIdentifyClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportIlluminanceMeasurementMeasuredValueCallback = - new chip::Callback::Callback( - ReadIlluminanceMeasurementMeasuredValue::OnAttributeResponse, this); - chip::Callback::Callback * - onReportIlluminanceMeasurementMinMeasuredValueCallback = - new chip::Callback::Callback( - ReadIlluminanceMeasurementMinMeasuredValue::OnAttributeResponse, this); - chip::Callback::Callback * - onReportIlluminanceMeasurementMaxMeasuredValueCallback = - new chip::Callback::Callback( - ReadIlluminanceMeasurementMaxMeasuredValue::OnAttributeResponse, this); - chip::Callback::Callback * - onReportIlluminanceMeasurementToleranceCallback = - new chip::Callback::Callback( - ReadIlluminanceMeasurementTolerance::OnAttributeResponse, this); - chip::Callback::Callback * - onReportIlluminanceMeasurementLightSensorTypeCallback = - new chip::Callback::Callback( - ReadIlluminanceMeasurementLightSensorType::OnAttributeResponse, this); - chip::Callback::Callback * - onReportIlluminanceMeasurementClusterRevisionCallback = - new chip::Callback::Callback( - ReadIlluminanceMeasurementClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportKeypadInputClusterRevisionCallback = - new chip::Callback::Callback( - ReadKeypadInputClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportLevelControlCurrentLevelCallback = - new chip::Callback::Callback( - ReadLevelControlCurrentLevel::OnAttributeResponse, this); - chip::Callback::Callback * - onReportLevelControlRemainingTimeCallback = - new chip::Callback::Callback( - ReadLevelControlRemainingTime::OnAttributeResponse, this); - chip::Callback::Callback * onReportLevelControlMinLevelCallback = - new chip::Callback::Callback( - ReadLevelControlMinLevel::OnAttributeResponse, this); - chip::Callback::Callback * onReportLevelControlMaxLevelCallback = - new chip::Callback::Callback( - ReadLevelControlMaxLevel::OnAttributeResponse, this); - chip::Callback::Callback * - onReportLevelControlCurrentFrequencyCallback = - new chip::Callback::Callback( - ReadLevelControlCurrentFrequency::OnAttributeResponse, this); - chip::Callback::Callback * - onReportLevelControlMinFrequencyCallback = - new chip::Callback::Callback( - ReadLevelControlMinFrequency::OnAttributeResponse, this); - chip::Callback::Callback * - onReportLevelControlMaxFrequencyCallback = - new chip::Callback::Callback( - ReadLevelControlMaxFrequency::OnAttributeResponse, this); - chip::Callback::Callback * onReportLevelControlOptionsCallback = - new chip::Callback::Callback( - ReadLevelControlOptions::OnAttributeResponse, this); - chip::Callback::Callback * - onReportLevelControlOnOffTransitionTimeCallback = - new chip::Callback::Callback( - ReadLevelControlOnOffTransitionTime::OnAttributeResponse, this); - chip::Callback::Callback * onReportLevelControlOnLevelCallback = - new chip::Callback::Callback( - ReadLevelControlOnLevel::OnAttributeResponse, this); - chip::Callback::Callback * - onReportLevelControlOnTransitionTimeCallback = - new chip::Callback::Callback( - ReadLevelControlOnTransitionTime::OnAttributeResponse, this); - chip::Callback::Callback * - onReportLevelControlOffTransitionTimeCallback = - new chip::Callback::Callback( - ReadLevelControlOffTransitionTime::OnAttributeResponse, this); - chip::Callback::Callback * - onReportLevelControlDefaultMoveRateCallback = - new chip::Callback::Callback( - ReadLevelControlDefaultMoveRate::OnAttributeResponse, this); - chip::Callback::Callback * - onReportLevelControlStartUpCurrentLevelCallback = - new chip::Callback::Callback( - ReadLevelControlStartUpCurrentLevel::OnAttributeResponse, this); - chip::Callback::Callback * - onReportLevelControlClusterRevisionCallback = - new chip::Callback::Callback( - ReadLevelControlClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportLowPowerClusterRevisionCallback = - new chip::Callback::Callback( - ReadLowPowerClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportMediaInputCurrentMediaInputCallback = - new chip::Callback::Callback( - ReadMediaInputCurrentMediaInput::OnAttributeResponse, this); - chip::Callback::Callback * - onReportMediaInputClusterRevisionCallback = - new chip::Callback::Callback( - ReadMediaInputClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportMediaPlaybackPlaybackStateCallback = - new chip::Callback::Callback( - ReadMediaPlaybackPlaybackState::OnAttributeResponse, this); - chip::Callback::Callback * onReportMediaPlaybackStartTimeCallback = - new chip::Callback::Callback( - ReadMediaPlaybackStartTime::OnAttributeResponse, this); - chip::Callback::Callback * onReportMediaPlaybackDurationCallback = - new chip::Callback::Callback( - ReadMediaPlaybackDuration::OnAttributeResponse, this); - chip::Callback::Callback * - onReportMediaPlaybackSeekRangeEndCallback = - new chip::Callback::Callback( - ReadMediaPlaybackSeekRangeEnd::OnAttributeResponse, this); - chip::Callback::Callback * - onReportMediaPlaybackSeekRangeStartCallback = - new chip::Callback::Callback( - ReadMediaPlaybackSeekRangeStart::OnAttributeResponse, this); - chip::Callback::Callback * - onReportMediaPlaybackClusterRevisionCallback = - new chip::Callback::Callback( - ReadMediaPlaybackClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * onReportModeSelectCurrentModeCallback = - new chip::Callback::Callback( - ReadModeSelectCurrentMode::OnAttributeResponse, this); - chip::Callback::Callback * onReportModeSelectOnModeCallback = - new chip::Callback::Callback( - ReadModeSelectOnMode::OnAttributeResponse, this); - chip::Callback::Callback * onReportModeSelectStartUpModeCallback = - new chip::Callback::Callback( - ReadModeSelectStartUpMode::OnAttributeResponse, this); - chip::Callback::Callback * onReportModeSelectDescriptionCallback = - new chip::Callback::Callback( - ReadModeSelectDescription::OnAttributeResponse, this); - chip::Callback::Callback * - onReportModeSelectClusterRevisionCallback = - new chip::Callback::Callback( - ReadModeSelectClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportNetworkCommissioningFeatureMapCallback = - new chip::Callback::Callback( - ReadNetworkCommissioningFeatureMap::OnAttributeResponse, this); - chip::Callback::Callback * - onReportNetworkCommissioningClusterRevisionCallback = - new chip::Callback::Callback( - ReadNetworkCommissioningClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportOtaSoftwareUpdateProviderClusterRevisionCallback = - new chip::Callback::Callback( - ReadOtaSoftwareUpdateProviderClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportOtaSoftwareUpdateRequestorDefaultOtaProviderCallback = - new chip::Callback::Callback( - ReadOtaSoftwareUpdateRequestorDefaultOtaProvider::OnAttributeResponse, this); - chip::Callback::Callback * - onReportOtaSoftwareUpdateRequestorUpdatePossibleCallback = - new chip::Callback::Callback( - ReadOtaSoftwareUpdateRequestorUpdatePossible::OnAttributeResponse, this); - chip::Callback::Callback * - onReportOtaSoftwareUpdateRequestorClusterRevisionCallback = - new chip::Callback::Callback( - ReadOtaSoftwareUpdateRequestorClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportOccupancySensingOccupancyCallback = - new chip::Callback::Callback( - ReadOccupancySensingOccupancy::OnAttributeResponse, this); - chip::Callback::Callback * - onReportOccupancySensingOccupancySensorTypeCallback = - new chip::Callback::Callback( - ReadOccupancySensingOccupancySensorType::OnAttributeResponse, this); - chip::Callback::Callback * - onReportOccupancySensingOccupancySensorTypeBitmapCallback = - new chip::Callback::Callback( - ReadOccupancySensingOccupancySensorTypeBitmap::OnAttributeResponse, this); - chip::Callback::Callback * - onReportOccupancySensingClusterRevisionCallback = - new chip::Callback::Callback( - ReadOccupancySensingClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * onReportOnOffOnOffCallback = - new chip::Callback::Callback(ReadOnOffOnOff::OnAttributeResponse, this); - chip::Callback::Callback * - onReportOnOffGlobalSceneControlCallback = - new chip::Callback::Callback( - ReadOnOffGlobalSceneControl::OnAttributeResponse, this); - chip::Callback::Callback * onReportOnOffOnTimeCallback = - new chip::Callback::Callback(ReadOnOffOnTime::OnAttributeResponse, this); - chip::Callback::Callback * onReportOnOffOffWaitTimeCallback = - new chip::Callback::Callback( - ReadOnOffOffWaitTime::OnAttributeResponse, this); - chip::Callback::Callback * onReportOnOffStartUpOnOffCallback = - new chip::Callback::Callback( - ReadOnOffStartUpOnOff::OnAttributeResponse, this); - chip::Callback::Callback * onReportOnOffFeatureMapCallback = - new chip::Callback::Callback(ReadOnOffFeatureMap::OnAttributeResponse, - this); - chip::Callback::Callback * onReportOnOffClusterRevisionCallback = - new chip::Callback::Callback( - ReadOnOffClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportOnOffSwitchConfigurationSwitchTypeCallback = - new chip::Callback::Callback( - ReadOnOffSwitchConfigurationSwitchType::OnAttributeResponse, this); - chip::Callback::Callback * - onReportOnOffSwitchConfigurationSwitchActionsCallback = - new chip::Callback::Callback( - ReadOnOffSwitchConfigurationSwitchActions::OnAttributeResponse, this); - chip::Callback::Callback * - onReportOnOffSwitchConfigurationClusterRevisionCallback = - new chip::Callback::Callback( - ReadOnOffSwitchConfigurationClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportOperationalCredentialsSupportedFabricsCallback = - new chip::Callback::Callback( - ReadOperationalCredentialsSupportedFabrics::OnAttributeResponse, this); - chip::Callback::Callback * - onReportOperationalCredentialsCommissionedFabricsCallback = - new chip::Callback::Callback( - ReadOperationalCredentialsCommissionedFabrics::OnAttributeResponse, this); - chip::Callback::Callback * - onReportOperationalCredentialsCurrentFabricIndexCallback = - new chip::Callback::Callback( - ReadOperationalCredentialsCurrentFabricIndex::OnAttributeResponse, this); - chip::Callback::Callback * - onReportOperationalCredentialsClusterRevisionCallback = - new chip::Callback::Callback( - ReadOperationalCredentialsClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * onReportPowerSourceStatusCallback = - new chip::Callback::Callback( - ReadPowerSourceStatus::OnAttributeResponse, this); - chip::Callback::Callback * onReportPowerSourceOrderCallback = - new chip::Callback::Callback( - ReadPowerSourceOrder::OnAttributeResponse, this); - chip::Callback::Callback * onReportPowerSourceDescriptionCallback = - new chip::Callback::Callback( - ReadPowerSourceDescription::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPowerSourceBatteryVoltageCallback = - new chip::Callback::Callback( - ReadPowerSourceBatteryVoltage::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPowerSourceBatteryPercentRemainingCallback = - new chip::Callback::Callback( - ReadPowerSourceBatteryPercentRemaining::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPowerSourceBatteryTimeRemainingCallback = - new chip::Callback::Callback( - ReadPowerSourceBatteryTimeRemaining::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPowerSourceBatteryChargeLevelCallback = - new chip::Callback::Callback( - ReadPowerSourceBatteryChargeLevel::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPowerSourceBatteryChargeStateCallback = - new chip::Callback::Callback( - ReadPowerSourceBatteryChargeState::OnAttributeResponse, this); - chip::Callback::Callback * onReportPowerSourceFeatureMapCallback = - new chip::Callback::Callback( - ReadPowerSourceFeatureMap::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPowerSourceClusterRevisionCallback = - new chip::Callback::Callback( - ReadPowerSourceClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPressureMeasurementMeasuredValueCallback = - new chip::Callback::Callback( - ReadPressureMeasurementMeasuredValue::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPressureMeasurementMinMeasuredValueCallback = - new chip::Callback::Callback( - ReadPressureMeasurementMinMeasuredValue::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPressureMeasurementMaxMeasuredValueCallback = - new chip::Callback::Callback( - ReadPressureMeasurementMaxMeasuredValue::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPressureMeasurementClusterRevisionCallback = - new chip::Callback::Callback( - ReadPressureMeasurementClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlMaxPressureCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlMaxPressure::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlMaxSpeedCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlMaxSpeed::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlMaxFlowCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlMaxFlow::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlMinConstPressureCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlMinConstPressure::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlMaxConstPressureCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlMaxConstPressure::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlMinCompPressureCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlMinCompPressure::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlMaxCompPressureCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlMaxCompPressure::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlMinConstSpeedCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlMinConstSpeed::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlMaxConstSpeedCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlMaxConstSpeed::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlMinConstFlowCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlMinConstFlow::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlMaxConstFlowCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlMaxConstFlow::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlMinConstTempCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlMinConstTemp::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlMaxConstTempCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlMaxConstTemp::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlPumpStatusCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlPumpStatus::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlEffectiveOperationModeCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlEffectiveOperationMode::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlEffectiveControlModeCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlEffectiveControlMode::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlCapacityCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlCapacity::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlSpeedCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlSpeed::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlLifetimeRunningHoursCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlLifetimeRunningHours::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlPowerCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlPower::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlLifetimeEnergyConsumedCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlLifetimeEnergyConsumed::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlOperationModeCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlOperationMode::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlControlModeCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlControlMode::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlAlarmMaskCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlAlarmMask::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlFeatureMapCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlFeatureMap::OnAttributeResponse, this); - chip::Callback::Callback * - onReportPumpConfigurationAndControlClusterRevisionCallback = - new chip::Callback::Callback( - ReadPumpConfigurationAndControlClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportRelativeHumidityMeasurementMeasuredValueCallback = - new chip::Callback::Callback( - ReadRelativeHumidityMeasurementMeasuredValue::OnAttributeResponse, this); - chip::Callback::Callback * - onReportRelativeHumidityMeasurementMinMeasuredValueCallback = - new chip::Callback::Callback( - ReadRelativeHumidityMeasurementMinMeasuredValue::OnAttributeResponse, this); - chip::Callback::Callback * - onReportRelativeHumidityMeasurementMaxMeasuredValueCallback = - new chip::Callback::Callback( - ReadRelativeHumidityMeasurementMaxMeasuredValue::OnAttributeResponse, this); - chip::Callback::Callback * - onReportRelativeHumidityMeasurementToleranceCallback = - new chip::Callback::Callback( - ReadRelativeHumidityMeasurementTolerance::OnAttributeResponse, this); - chip::Callback::Callback * - onReportRelativeHumidityMeasurementClusterRevisionCallback = - new chip::Callback::Callback( - ReadRelativeHumidityMeasurementClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * onReportScenesSceneCountCallback = - new chip::Callback::Callback( - ReadScenesSceneCount::OnAttributeResponse, this); - chip::Callback::Callback * onReportScenesCurrentSceneCallback = - new chip::Callback::Callback( - ReadScenesCurrentScene::OnAttributeResponse, this); - chip::Callback::Callback * onReportScenesCurrentGroupCallback = - new chip::Callback::Callback( - ReadScenesCurrentGroup::OnAttributeResponse, this); - chip::Callback::Callback * onReportScenesSceneValidCallback = - new chip::Callback::Callback( - ReadScenesSceneValid::OnAttributeResponse, this); - chip::Callback::Callback * onReportScenesNameSupportCallback = - new chip::Callback::Callback( - ReadScenesNameSupport::OnAttributeResponse, this); - chip::Callback::Callback * onReportScenesClusterRevisionCallback = - new chip::Callback::Callback( - ReadScenesClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportSoftwareDiagnosticsCurrentHeapFreeCallback = - new chip::Callback::Callback( - ReadSoftwareDiagnosticsCurrentHeapFree::OnAttributeResponse, this); - chip::Callback::Callback * - onReportSoftwareDiagnosticsCurrentHeapUsedCallback = - new chip::Callback::Callback( - ReadSoftwareDiagnosticsCurrentHeapUsed::OnAttributeResponse, this); - chip::Callback::Callback * - onReportSoftwareDiagnosticsCurrentHeapHighWatermarkCallback = - new chip::Callback::Callback( - ReadSoftwareDiagnosticsCurrentHeapHighWatermark::OnAttributeResponse, this); - chip::Callback::Callback * - onReportSoftwareDiagnosticsClusterRevisionCallback = - new chip::Callback::Callback( - ReadSoftwareDiagnosticsClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportSwitchNumberOfPositionsCallback = - new chip::Callback::Callback( - ReadSwitchNumberOfPositions::OnAttributeResponse, this); - chip::Callback::Callback * onReportSwitchCurrentPositionCallback = - new chip::Callback::Callback( - ReadSwitchCurrentPosition::OnAttributeResponse, this); - chip::Callback::Callback * onReportSwitchMultiPressMaxCallback = - new chip::Callback::Callback( - ReadSwitchMultiPressMax::OnAttributeResponse, this); - chip::Callback::Callback * onReportSwitchFeatureMapCallback = - new chip::Callback::Callback( - ReadSwitchFeatureMap::OnAttributeResponse, this); - chip::Callback::Callback * onReportSwitchClusterRevisionCallback = - new chip::Callback::Callback( - ReadSwitchClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTvChannelClusterRevisionCallback = - new chip::Callback::Callback( - ReadTvChannelClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTargetNavigatorClusterRevisionCallback = - new chip::Callback::Callback( - ReadTargetNavigatorClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTemperatureMeasurementMeasuredValueCallback = - new chip::Callback::Callback( - ReadTemperatureMeasurementMeasuredValue::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTemperatureMeasurementMinMeasuredValueCallback = - new chip::Callback::Callback( - ReadTemperatureMeasurementMinMeasuredValue::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTemperatureMeasurementMaxMeasuredValueCallback = - new chip::Callback::Callback( - ReadTemperatureMeasurementMaxMeasuredValue::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTemperatureMeasurementToleranceCallback = - new chip::Callback::Callback( - ReadTemperatureMeasurementTolerance::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTemperatureMeasurementClusterRevisionCallback = - new chip::Callback::Callback( - ReadTemperatureMeasurementClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterBooleanCallback = - new chip::Callback::Callback( - ReadTestClusterBoolean::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterBitmap8Callback = - new chip::Callback::Callback( - ReadTestClusterBitmap8::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterBitmap16Callback = - new chip::Callback::Callback( - ReadTestClusterBitmap16::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterBitmap32Callback = - new chip::Callback::Callback( - ReadTestClusterBitmap32::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterBitmap64Callback = - new chip::Callback::Callback( - ReadTestClusterBitmap64::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterInt8uCallback = - new chip::Callback::Callback( - ReadTestClusterInt8u::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterInt16uCallback = - new chip::Callback::Callback( - ReadTestClusterInt16u::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterInt24uCallback = - new chip::Callback::Callback( - ReadTestClusterInt24u::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterInt32uCallback = - new chip::Callback::Callback( - ReadTestClusterInt32u::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterInt40uCallback = - new chip::Callback::Callback( - ReadTestClusterInt40u::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterInt48uCallback = - new chip::Callback::Callback( - ReadTestClusterInt48u::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterInt56uCallback = - new chip::Callback::Callback( - ReadTestClusterInt56u::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterInt64uCallback = - new chip::Callback::Callback( - ReadTestClusterInt64u::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterInt8sCallback = - new chip::Callback::Callback( - ReadTestClusterInt8s::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterInt16sCallback = - new chip::Callback::Callback( - ReadTestClusterInt16s::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterInt24sCallback = - new chip::Callback::Callback( - ReadTestClusterInt24s::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterInt32sCallback = - new chip::Callback::Callback( - ReadTestClusterInt32s::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterInt40sCallback = - new chip::Callback::Callback( - ReadTestClusterInt40s::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterInt48sCallback = - new chip::Callback::Callback( - ReadTestClusterInt48s::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterInt56sCallback = - new chip::Callback::Callback( - ReadTestClusterInt56s::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterInt64sCallback = - new chip::Callback::Callback( - ReadTestClusterInt64s::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterEnum8Callback = - new chip::Callback::Callback( - ReadTestClusterEnum8::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterEnum16Callback = - new chip::Callback::Callback( - ReadTestClusterEnum16::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterFloatSingleCallback = - new chip::Callback::Callback( - ReadTestClusterFloatSingle::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterFloatDoubleCallback = - new chip::Callback::Callback( - ReadTestClusterFloatDouble::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterOctetStringCallback = - new chip::Callback::Callback( - ReadTestClusterOctetString::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterLongOctetStringCallback = - new chip::Callback::Callback( - ReadTestClusterLongOctetString::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterCharStringCallback = - new chip::Callback::Callback( - ReadTestClusterCharString::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterLongCharStringCallback = - new chip::Callback::Callback( - ReadTestClusterLongCharString::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterEpochUsCallback = - new chip::Callback::Callback( - ReadTestClusterEpochUs::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterEpochSCallback = - new chip::Callback::Callback( - ReadTestClusterEpochS::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterVendorIdCallback = - new chip::Callback::Callback( - ReadTestClusterVendorId::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterEnumAttrCallback = - new chip::Callback::Callback( - ReadTestClusterEnumAttr::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterRangeRestrictedInt8uCallback = - new chip::Callback::Callback( - ReadTestClusterRangeRestrictedInt8u::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterRangeRestrictedInt8sCallback = - new chip::Callback::Callback( - ReadTestClusterRangeRestrictedInt8s::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterRangeRestrictedInt16uCallback = - new chip::Callback::Callback( - ReadTestClusterRangeRestrictedInt16u::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterRangeRestrictedInt16sCallback = - new chip::Callback::Callback( - ReadTestClusterRangeRestrictedInt16s::OnAttributeResponse, this); - chip::Callback::Callback * onReportTestClusterUnsupportedCallback = - new chip::Callback::Callback( - ReadTestClusterUnsupported::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableBooleanCallback = - new chip::Callback::Callback( - ReadTestClusterNullableBoolean::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableBitmap8Callback = - new chip::Callback::Callback( - ReadTestClusterNullableBitmap8::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableBitmap16Callback = - new chip::Callback::Callback( - ReadTestClusterNullableBitmap16::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableBitmap32Callback = - new chip::Callback::Callback( - ReadTestClusterNullableBitmap32::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableBitmap64Callback = - new chip::Callback::Callback( - ReadTestClusterNullableBitmap64::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableInt8uCallback = - new chip::Callback::Callback( - ReadTestClusterNullableInt8u::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableInt16uCallback = - new chip::Callback::Callback( - ReadTestClusterNullableInt16u::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableInt24uCallback = - new chip::Callback::Callback( - ReadTestClusterNullableInt24u::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableInt32uCallback = - new chip::Callback::Callback( - ReadTestClusterNullableInt32u::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableInt40uCallback = - new chip::Callback::Callback( - ReadTestClusterNullableInt40u::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableInt48uCallback = - new chip::Callback::Callback( - ReadTestClusterNullableInt48u::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableInt56uCallback = - new chip::Callback::Callback( - ReadTestClusterNullableInt56u::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableInt64uCallback = - new chip::Callback::Callback( - ReadTestClusterNullableInt64u::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableInt8sCallback = - new chip::Callback::Callback( - ReadTestClusterNullableInt8s::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableInt16sCallback = - new chip::Callback::Callback( - ReadTestClusterNullableInt16s::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableInt24sCallback = - new chip::Callback::Callback( - ReadTestClusterNullableInt24s::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableInt32sCallback = - new chip::Callback::Callback( - ReadTestClusterNullableInt32s::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableInt40sCallback = - new chip::Callback::Callback( - ReadTestClusterNullableInt40s::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableInt48sCallback = - new chip::Callback::Callback( - ReadTestClusterNullableInt48s::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableInt56sCallback = - new chip::Callback::Callback( - ReadTestClusterNullableInt56s::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableInt64sCallback = - new chip::Callback::Callback( - ReadTestClusterNullableInt64s::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableEnum8Callback = - new chip::Callback::Callback( - ReadTestClusterNullableEnum8::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableEnum16Callback = - new chip::Callback::Callback( - ReadTestClusterNullableEnum16::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableFloatSingleCallback = - new chip::Callback::Callback( - ReadTestClusterNullableFloatSingle::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableFloatDoubleCallback = - new chip::Callback::Callback( - ReadTestClusterNullableFloatDouble::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableOctetStringCallback = - new chip::Callback::Callback( - ReadTestClusterNullableOctetString::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableCharStringCallback = - new chip::Callback::Callback( - ReadTestClusterNullableCharString::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableEnumAttrCallback = - new chip::Callback::Callback( - ReadTestClusterNullableEnumAttr::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableRangeRestrictedInt8uCallback = - new chip::Callback::Callback( - ReadTestClusterNullableRangeRestrictedInt8u::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableRangeRestrictedInt8sCallback = - new chip::Callback::Callback( - ReadTestClusterNullableRangeRestrictedInt8s::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableRangeRestrictedInt16uCallback = - new chip::Callback::Callback( - ReadTestClusterNullableRangeRestrictedInt16u::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterNullableRangeRestrictedInt16sCallback = - new chip::Callback::Callback( - ReadTestClusterNullableRangeRestrictedInt16s::OnAttributeResponse, this); - chip::Callback::Callback * - onReportTestClusterClusterRevisionCallback = - new chip::Callback::Callback( - ReadTestClusterClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThermostatLocalTemperatureCallback = - new chip::Callback::Callback( - ReadThermostatLocalTemperature::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThermostatAbsMinHeatSetpointLimitCallback = - new chip::Callback::Callback( - ReadThermostatAbsMinHeatSetpointLimit::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThermostatAbsMaxHeatSetpointLimitCallback = - new chip::Callback::Callback( - ReadThermostatAbsMaxHeatSetpointLimit::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThermostatAbsMinCoolSetpointLimitCallback = - new chip::Callback::Callback( - ReadThermostatAbsMinCoolSetpointLimit::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThermostatAbsMaxCoolSetpointLimitCallback = - new chip::Callback::Callback( - ReadThermostatAbsMaxCoolSetpointLimit::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThermostatOccupiedCoolingSetpointCallback = - new chip::Callback::Callback( - ReadThermostatOccupiedCoolingSetpoint::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThermostatOccupiedHeatingSetpointCallback = - new chip::Callback::Callback( - ReadThermostatOccupiedHeatingSetpoint::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThermostatMinHeatSetpointLimitCallback = - new chip::Callback::Callback( - ReadThermostatMinHeatSetpointLimit::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThermostatMaxHeatSetpointLimitCallback = - new chip::Callback::Callback( - ReadThermostatMaxHeatSetpointLimit::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThermostatMinCoolSetpointLimitCallback = - new chip::Callback::Callback( - ReadThermostatMinCoolSetpointLimit::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThermostatMaxCoolSetpointLimitCallback = - new chip::Callback::Callback( - ReadThermostatMaxCoolSetpointLimit::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThermostatMinSetpointDeadBandCallback = - new chip::Callback::Callback( - ReadThermostatMinSetpointDeadBand::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThermostatControlSequenceOfOperationCallback = - new chip::Callback::Callback( - ReadThermostatControlSequenceOfOperation::OnAttributeResponse, this); - chip::Callback::Callback * onReportThermostatSystemModeCallback = - new chip::Callback::Callback( - ReadThermostatSystemMode::OnAttributeResponse, this); - chip::Callback::Callback * onReportThermostatStartOfWeekCallback = - new chip::Callback::Callback( - ReadThermostatStartOfWeek::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThermostatNumberOfWeeklyTransitionsCallback = - new chip::Callback::Callback( - ReadThermostatNumberOfWeeklyTransitions::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThermostatNumberOfDailyTransitionsCallback = - new chip::Callback::Callback( - ReadThermostatNumberOfDailyTransitions::OnAttributeResponse, this); - chip::Callback::Callback * onReportThermostatFeatureMapCallback = - new chip::Callback::Callback( - ReadThermostatFeatureMap::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThermostatClusterRevisionCallback = - new chip::Callback::Callback( - ReadThermostatClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThermostatUserInterfaceConfigurationTemperatureDisplayModeCallback = new chip::Callback::Callback( - ReadThermostatUserInterfaceConfigurationTemperatureDisplayMode::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThermostatUserInterfaceConfigurationKeypadLockoutCallback = - new chip::Callback::Callback( - ReadThermostatUserInterfaceConfigurationKeypadLockout::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThermostatUserInterfaceConfigurationScheduleProgrammingVisibilityCallback = new chip::Callback::Callback( - ReadThermostatUserInterfaceConfigurationScheduleProgrammingVisibility::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThermostatUserInterfaceConfigurationClusterRevisionCallback = - new chip::Callback::Callback( - ReadThermostatUserInterfaceConfigurationClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsChannelCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsChannel::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsRoutingRoleCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsRoutingRole::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsNetworkNameCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsNetworkName::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsPanIdCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsPanId::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsExtendedPanIdCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsExtendedPanId::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsMeshLocalPrefixCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsMeshLocalPrefix::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsOverrunCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsOverrunCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsPartitionIdCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsPartitionId::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsWeightingCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsWeighting::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsDataVersionCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsDataVersion::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsStableDataVersionCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsStableDataVersion::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsLeaderRouterIdCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsLeaderRouterId::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsDetachedRoleCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsDetachedRoleCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsChildRoleCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsChildRoleCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsRouterRoleCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsRouterRoleCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsLeaderRoleCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsLeaderRoleCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsAttachAttemptCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsAttachAttemptCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsPartitionIdChangeCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsPartitionIdChangeCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsBetterPartitionAttachAttemptCountCallback = new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsBetterPartitionAttachAttemptCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsParentChangeCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsParentChangeCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsTxTotalCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsTxTotalCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsTxUnicastCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsTxUnicastCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsTxBroadcastCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsTxBroadcastCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsTxAckRequestedCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsTxAckRequestedCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsTxAckedCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsTxAckedCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsTxNoAckRequestedCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsTxNoAckRequestedCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsTxDataCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsTxDataCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsTxDataPollCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsTxDataPollCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsTxBeaconCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsTxBeaconCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsTxBeaconRequestCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsTxBeaconRequestCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsTxOtherCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsTxOtherCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsTxRetryCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsTxRetryCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsTxErrCcaCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsTxErrCcaCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsTxErrAbortCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsTxErrAbortCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsTxErrBusyChannelCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsTxErrBusyChannelCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsRxTotalCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsRxTotalCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsRxUnicastCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsRxUnicastCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsRxBroadcastCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsRxBroadcastCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsRxDataCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsRxDataCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsRxDataPollCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsRxDataPollCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsRxBeaconCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsRxBeaconCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsRxBeaconRequestCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsRxBeaconRequestCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsRxOtherCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsRxOtherCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsRxAddressFilteredCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsRxAddressFilteredCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsRxDestAddrFilteredCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsRxDestAddrFilteredCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsRxDuplicatedCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsRxDuplicatedCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsRxErrNoFrameCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsRxErrNoFrameCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsRxErrUnknownNeighborCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsRxErrUnknownNeighborCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsRxErrInvalidSrcAddrCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsRxErrSecCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsRxErrSecCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsRxErrFcsCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsRxErrFcsCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsRxErrOtherCountCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsRxErrOtherCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsActiveTimestampCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsActiveTimestamp::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsPendingTimestampCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsPendingTimestamp::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsDelayCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsDelay::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsChannelMaskCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsChannelMask::OnAttributeResponse, this); - chip::Callback::Callback * - onReportThreadNetworkDiagnosticsClusterRevisionCallback = - new chip::Callback::Callback( - ReadThreadNetworkDiagnosticsClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWakeOnLanWakeOnLanMacAddressCallback = - new chip::Callback::Callback( - ReadWakeOnLanWakeOnLanMacAddress::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWakeOnLanClusterRevisionCallback = - new chip::Callback::Callback( - ReadWakeOnLanClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWiFiNetworkDiagnosticsBssidCallback = - new chip::Callback::Callback( - ReadWiFiNetworkDiagnosticsBssid::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWiFiNetworkDiagnosticsSecurityTypeCallback = - new chip::Callback::Callback( - ReadWiFiNetworkDiagnosticsSecurityType::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWiFiNetworkDiagnosticsWiFiVersionCallback = - new chip::Callback::Callback( - ReadWiFiNetworkDiagnosticsWiFiVersion::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWiFiNetworkDiagnosticsChannelNumberCallback = - new chip::Callback::Callback( - ReadWiFiNetworkDiagnosticsChannelNumber::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWiFiNetworkDiagnosticsRssiCallback = - new chip::Callback::Callback( - ReadWiFiNetworkDiagnosticsRssi::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWiFiNetworkDiagnosticsBeaconLostCountCallback = - new chip::Callback::Callback( - ReadWiFiNetworkDiagnosticsBeaconLostCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWiFiNetworkDiagnosticsBeaconRxCountCallback = - new chip::Callback::Callback( - ReadWiFiNetworkDiagnosticsBeaconRxCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWiFiNetworkDiagnosticsPacketMulticastRxCountCallback = - new chip::Callback::Callback( - ReadWiFiNetworkDiagnosticsPacketMulticastRxCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWiFiNetworkDiagnosticsPacketMulticastTxCountCallback = - new chip::Callback::Callback( - ReadWiFiNetworkDiagnosticsPacketMulticastTxCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWiFiNetworkDiagnosticsPacketUnicastRxCountCallback = - new chip::Callback::Callback( - ReadWiFiNetworkDiagnosticsPacketUnicastRxCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWiFiNetworkDiagnosticsPacketUnicastTxCountCallback = - new chip::Callback::Callback( - ReadWiFiNetworkDiagnosticsPacketUnicastTxCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWiFiNetworkDiagnosticsCurrentMaxRateCallback = - new chip::Callback::Callback( - ReadWiFiNetworkDiagnosticsCurrentMaxRate::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWiFiNetworkDiagnosticsOverrunCountCallback = - new chip::Callback::Callback( - ReadWiFiNetworkDiagnosticsOverrunCount::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWiFiNetworkDiagnosticsClusterRevisionCallback = - new chip::Callback::Callback( - ReadWiFiNetworkDiagnosticsClusterRevision::OnAttributeResponse, this); - chip::Callback::Callback * onReportWindowCoveringTypeCallback = - new chip::Callback::Callback( - ReadWindowCoveringType::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWindowCoveringCurrentPositionLiftCallback = - new chip::Callback::Callback( - ReadWindowCoveringCurrentPositionLift::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWindowCoveringCurrentPositionTiltCallback = - new chip::Callback::Callback( - ReadWindowCoveringCurrentPositionTilt::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWindowCoveringConfigStatusCallback = - new chip::Callback::Callback( - ReadWindowCoveringConfigStatus::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWindowCoveringCurrentPositionLiftPercentageCallback = - new chip::Callback::Callback( - ReadWindowCoveringCurrentPositionLiftPercentage::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWindowCoveringCurrentPositionTiltPercentageCallback = - new chip::Callback::Callback( - ReadWindowCoveringCurrentPositionTiltPercentage::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWindowCoveringOperationalStatusCallback = - new chip::Callback::Callback( - ReadWindowCoveringOperationalStatus::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWindowCoveringTargetPositionLiftPercent100thsCallback = - new chip::Callback::Callback( - ReadWindowCoveringTargetPositionLiftPercent100ths::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWindowCoveringTargetPositionTiltPercent100thsCallback = - new chip::Callback::Callback( - ReadWindowCoveringTargetPositionTiltPercent100ths::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWindowCoveringEndProductTypeCallback = - new chip::Callback::Callback( - ReadWindowCoveringEndProductType::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWindowCoveringCurrentPositionLiftPercent100thsCallback = - new chip::Callback::Callback( - ReadWindowCoveringCurrentPositionLiftPercent100ths::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWindowCoveringCurrentPositionTiltPercent100thsCallback = - new chip::Callback::Callback( - ReadWindowCoveringCurrentPositionTiltPercent100ths::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWindowCoveringInstalledOpenLimitLiftCallback = - new chip::Callback::Callback( - ReadWindowCoveringInstalledOpenLimitLift::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWindowCoveringInstalledClosedLimitLiftCallback = - new chip::Callback::Callback( - ReadWindowCoveringInstalledClosedLimitLift::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWindowCoveringInstalledOpenLimitTiltCallback = - new chip::Callback::Callback( - ReadWindowCoveringInstalledOpenLimitTilt::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWindowCoveringInstalledClosedLimitTiltCallback = - new chip::Callback::Callback( - ReadWindowCoveringInstalledClosedLimitTilt::OnAttributeResponse, this); - chip::Callback::Callback * onReportWindowCoveringModeCallback = - new chip::Callback::Callback( - ReadWindowCoveringMode::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWindowCoveringSafetyStatusCallback = - new chip::Callback::Callback( - ReadWindowCoveringSafetyStatus::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWindowCoveringFeatureMapCallback = - new chip::Callback::Callback( - ReadWindowCoveringFeatureMap::OnAttributeResponse, this); - chip::Callback::Callback * - onReportWindowCoveringClusterRevisionCallback = - new chip::Callback::Callback( - ReadWindowCoveringClusterRevision::OnAttributeResponse, this); -}; - -void registerCommandsReporting(Commands & commands) -{ - const char * clusterName = "Reporting"; - - commands_list clusterCommands = { - make_unique(), - }; - - commands.Register(clusterName, clusterCommands); -} diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp index 9fb89cf91df139..5bdde9ec2de968 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.cpp @@ -35,7 +35,6 @@ namespace Controller { // TODO(#4503): Commands should take group id as an argument. // AccessControl Cluster Commands -// AccessControl Cluster Attributes // AccountLogin Cluster Commands CHIP_ERROR AccountLoginCluster::GetSetupPIN(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, @@ -160,24 +159,6 @@ CHIP_ERROR AccountLoginCluster::Logout(Callback::Cancelable * onSuccessCallback, return err; } -// AccountLogin Cluster Attributes -CHIP_ERROR AccountLoginCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR AccountLoginCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} - // AdministratorCommissioning Cluster Commands CHIP_ERROR AdministratorCommissioningCluster::OpenBasicCommissioningWindow(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, @@ -317,24 +298,6 @@ CHIP_ERROR AdministratorCommissioningCluster::RevokeCommissioning(Callback::Canc return err; } -// AdministratorCommissioning Cluster Attributes -CHIP_ERROR AdministratorCommissioningCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR AdministratorCommissioningCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} - // ApplicationBasic Cluster Commands CHIP_ERROR ApplicationBasicCluster::ChangeStatus(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t status) @@ -377,126 +340,6 @@ CHIP_ERROR ApplicationBasicCluster::ChangeStatus(Callback::Cancelable * onSucces return err; } -// ApplicationBasic Cluster Attributes -CHIP_ERROR ApplicationBasicCluster::SubscribeAttributeVendorName(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ApplicationBasic::Attributes::VendorName::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ApplicationBasicCluster::ReportAttributeVendorName(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ApplicationBasic::Attributes::VendorName::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ApplicationBasicCluster::SubscribeAttributeVendorId(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ApplicationBasic::Attributes::VendorId::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ApplicationBasicCluster::ReportAttributeVendorId(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ApplicationBasic::Attributes::VendorId::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ApplicationBasicCluster::SubscribeAttributeApplicationName(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ApplicationBasic::Attributes::ApplicationName::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ApplicationBasicCluster::ReportAttributeApplicationName(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ApplicationBasic::Attributes::ApplicationName::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ApplicationBasicCluster::SubscribeAttributeProductId(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ApplicationBasic::Attributes::ProductId::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ApplicationBasicCluster::ReportAttributeProductId(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ApplicationBasic::Attributes::ProductId::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ApplicationBasicCluster::SubscribeAttributeApplicationStatus(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ApplicationBasic::Attributes::ApplicationStatus::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ApplicationBasicCluster::ReportAttributeApplicationStatus(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ApplicationBasic::Attributes::ApplicationStatus::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ApplicationBasicCluster::SubscribeAttributeApplicationVersion(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ApplicationBasic::Attributes::ApplicationVersion::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ApplicationBasicCluster::ReportAttributeApplicationVersion(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ApplicationBasic::Attributes::ApplicationVersion::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ApplicationBasicCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ApplicationBasicCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} - // ApplicationLauncher Cluster Commands CHIP_ERROR ApplicationLauncherCluster::HideApp(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t catalogVendorId, chip::CharSpan applicationId) @@ -629,24 +472,6 @@ CHIP_ERROR ApplicationLauncherCluster::StopApp(Callback::Cancelable * onSuccessC return err; } -// ApplicationLauncher Cluster Attributes -CHIP_ERROR ApplicationLauncherCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ApplicationLauncherCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} - // AudioOutput Cluster Commands CHIP_ERROR AudioOutputCluster::RenameOutput(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t index, chip::CharSpan name) @@ -732,41 +557,6 @@ CHIP_ERROR AudioOutputCluster::SelectOutput(Callback::Cancelable * onSuccessCall return err; } -// AudioOutput Cluster Attributes -CHIP_ERROR AudioOutputCluster::SubscribeAttributeCurrentAudioOutput(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = AudioOutput::Attributes::CurrentAudioOutput::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR AudioOutputCluster::ReportAttributeCurrentAudioOutput(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(AudioOutput::Attributes::CurrentAudioOutput::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR AudioOutputCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR AudioOutputCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} - // BarrierControl Cluster Commands CHIP_ERROR BarrierControlCluster::BarrierControlGoToPercent(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t percentOpen) @@ -849,92 +639,6 @@ CHIP_ERROR BarrierControlCluster::BarrierControlStop(Callback::Cancelable * onSu return err; } -// BarrierControl Cluster Attributes -CHIP_ERROR BarrierControlCluster::SubscribeAttributeBarrierMovingState(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = BarrierControl::Attributes::BarrierMovingState::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BarrierControlCluster::ReportAttributeBarrierMovingState(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(BarrierControl::Attributes::BarrierMovingState::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BarrierControlCluster::SubscribeAttributeBarrierSafetyStatus(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = BarrierControl::Attributes::BarrierSafetyStatus::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BarrierControlCluster::ReportAttributeBarrierSafetyStatus(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(BarrierControl::Attributes::BarrierSafetyStatus::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BarrierControlCluster::SubscribeAttributeBarrierCapabilities(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = BarrierControl::Attributes::BarrierCapabilities::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BarrierControlCluster::ReportAttributeBarrierCapabilities(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(BarrierControl::Attributes::BarrierCapabilities::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BarrierControlCluster::SubscribeAttributeBarrierPosition(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = BarrierControl::Attributes::BarrierPosition::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BarrierControlCluster::ReportAttributeBarrierPosition(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(BarrierControl::Attributes::BarrierPosition::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BarrierControlCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BarrierControlCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} - // Basic Cluster Commands CHIP_ERROR BasicCluster::MfgSpecificPing(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { @@ -974,399 +678,7 @@ CHIP_ERROR BasicCluster::MfgSpecificPing(Callback::Cancelable * onSuccessCallbac return err; } -// Basic Cluster Attributes -CHIP_ERROR BasicCluster::SubscribeAttributeInteractionModelVersion(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Basic::Attributes::InteractionModelVersion::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BasicCluster::ReportAttributeInteractionModelVersion(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Basic::Attributes::InteractionModelVersion::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BasicCluster::SubscribeAttributeVendorName(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Basic::Attributes::VendorName::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BasicCluster::ReportAttributeVendorName(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Basic::Attributes::VendorName::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BasicCluster::SubscribeAttributeVendorID(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Basic::Attributes::VendorID::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BasicCluster::ReportAttributeVendorID(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Basic::Attributes::VendorID::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BasicCluster::SubscribeAttributeProductName(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Basic::Attributes::ProductName::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BasicCluster::ReportAttributeProductName(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Basic::Attributes::ProductName::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BasicCluster::SubscribeAttributeProductID(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Basic::Attributes::ProductID::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BasicCluster::ReportAttributeProductID(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Basic::Attributes::ProductID::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BasicCluster::SubscribeAttributeNodeLabel(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Basic::Attributes::NodeLabel::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BasicCluster::ReportAttributeNodeLabel(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Basic::Attributes::NodeLabel::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BasicCluster::SubscribeAttributeLocation(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Basic::Attributes::Location::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BasicCluster::ReportAttributeLocation(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Basic::Attributes::Location::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BasicCluster::SubscribeAttributeHardwareVersion(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Basic::Attributes::HardwareVersion::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BasicCluster::ReportAttributeHardwareVersion(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Basic::Attributes::HardwareVersion::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BasicCluster::SubscribeAttributeHardwareVersionString(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Basic::Attributes::HardwareVersionString::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BasicCluster::ReportAttributeHardwareVersionString(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Basic::Attributes::HardwareVersionString::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BasicCluster::SubscribeAttributeSoftwareVersion(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Basic::Attributes::SoftwareVersion::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BasicCluster::ReportAttributeSoftwareVersion(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Basic::Attributes::SoftwareVersion::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BasicCluster::SubscribeAttributeSoftwareVersionString(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Basic::Attributes::SoftwareVersionString::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BasicCluster::ReportAttributeSoftwareVersionString(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Basic::Attributes::SoftwareVersionString::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BasicCluster::SubscribeAttributeManufacturingDate(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Basic::Attributes::ManufacturingDate::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BasicCluster::ReportAttributeManufacturingDate(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Basic::Attributes::ManufacturingDate::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BasicCluster::SubscribeAttributePartNumber(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Basic::Attributes::PartNumber::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BasicCluster::ReportAttributePartNumber(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Basic::Attributes::PartNumber::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BasicCluster::SubscribeAttributeProductURL(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Basic::Attributes::ProductURL::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BasicCluster::ReportAttributeProductURL(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Basic::Attributes::ProductURL::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BasicCluster::SubscribeAttributeProductLabel(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Basic::Attributes::ProductLabel::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BasicCluster::ReportAttributeProductLabel(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Basic::Attributes::ProductLabel::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BasicCluster::SubscribeAttributeSerialNumber(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Basic::Attributes::SerialNumber::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BasicCluster::ReportAttributeSerialNumber(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Basic::Attributes::SerialNumber::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BasicCluster::SubscribeAttributeLocalConfigDisabled(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Basic::Attributes::LocalConfigDisabled::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BasicCluster::ReportAttributeLocalConfigDisabled(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Basic::Attributes::LocalConfigDisabled::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BasicCluster::SubscribeAttributeReachable(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Basic::Attributes::Reachable::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BasicCluster::ReportAttributeReachable(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Basic::Attributes::Reachable::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BasicCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BasicCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} - // BinaryInputBasic Cluster Commands -// BinaryInputBasic Cluster Attributes -CHIP_ERROR BinaryInputBasicCluster::SubscribeAttributeOutOfService(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = BinaryInputBasic::Attributes::OutOfService::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BinaryInputBasicCluster::ReportAttributeOutOfService(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(BinaryInputBasic::Attributes::OutOfService::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BinaryInputBasicCluster::SubscribeAttributePresentValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = BinaryInputBasic::Attributes::PresentValue::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BinaryInputBasicCluster::ReportAttributePresentValue(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(BinaryInputBasic::Attributes::PresentValue::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BinaryInputBasicCluster::SubscribeAttributeStatusFlags(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = BinaryInputBasic::Attributes::StatusFlags::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BinaryInputBasicCluster::ReportAttributeStatusFlags(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(BinaryInputBasic::Attributes::StatusFlags::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BinaryInputBasicCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BinaryInputBasicCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} // Binding Cluster Commands CHIP_ERROR BindingCluster::Bind(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, @@ -1464,63 +776,11 @@ CHIP_ERROR BindingCluster::Unbind(Callback::Cancelable * onSuccessCallback, Call return err; } -// Binding Cluster Attributes -CHIP_ERROR BindingCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BindingCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} - // BooleanState Cluster Commands -// BooleanState Cluster Attributes -CHIP_ERROR BooleanStateCluster::SubscribeAttributeStateValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = BooleanState::Attributes::StateValue::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} -CHIP_ERROR BooleanStateCluster::ReportAttributeStateValue(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(BooleanState::Attributes::StateValue::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BooleanStateCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BooleanStateCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} - -// BridgedActions Cluster Commands -CHIP_ERROR BridgedActionsCluster::DisableAction(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t actionID, uint32_t invokeID) +// BridgedActions Cluster Commands +CHIP_ERROR BridgedActionsCluster::DisableAction(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t actionID, uint32_t invokeID) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -2055,59 +1315,7 @@ CHIP_ERROR BridgedActionsCluster::StopAction(Callback::Cancelable * onSuccessCal return err; } -// BridgedActions Cluster Attributes -CHIP_ERROR BridgedActionsCluster::SubscribeAttributeSetupUrl(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = BridgedActions::Attributes::SetupUrl::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BridgedActionsCluster::ReportAttributeSetupUrl(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(BridgedActions::Attributes::SetupUrl::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR BridgedActionsCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BridgedActionsCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} - // BridgedDeviceBasic Cluster Commands -// BridgedDeviceBasic Cluster Attributes -CHIP_ERROR BridgedDeviceBasicCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BridgedDeviceBasicCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} // ColorControl Cluster Commands CHIP_ERROR ColorControlCluster::ColorLoopSet(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, @@ -3053,915 +2261,198 @@ CHIP_ERROR ColorControlCluster::StopMoveStep(Callback::Cancelable * onSuccessCal return err; } -// ColorControl Cluster Attributes -CHIP_ERROR ColorControlCluster::SubscribeAttributeCurrentHue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::CurrentHue::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ColorControlCluster::ReportAttributeCurrentHue(Callback::Cancelable * onReportCallback) +// ContentLauncher Cluster Commands +CHIP_ERROR ContentLauncherCluster::LaunchContent(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + bool autoPlay, chip::CharSpan data, uint8_t type, chip::CharSpan value) { - return RequestAttributeReporting(ColorControl::Attributes::CurrentHue::Id, onReportCallback, - BasicAttributeFilter); -} + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; -CHIP_ERROR ColorControlCluster::SubscribeAttributeCurrentSaturation(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::CurrentSaturation::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; -CHIP_ERROR ColorControlCluster::ReportAttributeCurrentSaturation(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::CurrentSaturation::Id, onReportCallback, - BasicAttributeFilter); -} + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); -CHIP_ERROR ColorControlCluster::SubscribeAttributeRemainingTime(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::RemainingTime::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, ContentLauncher::Commands::LaunchContent::Id, + (app::CommandPathFlags::kEndpointIdValid) }; -CHIP_ERROR ColorControlCluster::ReportAttributeRemainingTime(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::RemainingTime::Id, onReportCallback, - BasicAttributeFilter); -} + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); -CHIP_ERROR ColorControlCluster::SubscribeAttributeCurrentX(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::CurrentX::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); -CHIP_ERROR ColorControlCluster::ReportAttributeCurrentX(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::CurrentX::Id, onReportCallback, - BasicAttributeFilter); -} + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); -CHIP_ERROR ColorControlCluster::SubscribeAttributeCurrentY(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::CurrentY::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // autoPlay: boolean + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), autoPlay)); + // data: charString + SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), data)); + // type: contentLaunchParameterEnum + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), type)); + // value: charString + SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), value)); -CHIP_ERROR ColorControlCluster::ReportAttributeCurrentY(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::CurrentY::Id, onReportCallback, - BasicAttributeFilter); -} + SuccessOrExit(err = sender->FinishCommand()); -CHIP_ERROR ColorControlCluster::SubscribeAttributeDriftCompensation(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::DriftCompensation::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); -CHIP_ERROR ColorControlCluster::ReportAttributeDriftCompensation(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::DriftCompensation::Id, onReportCallback, - BasicAttributeFilter); -} + SuccessOrExit(err = mDevice->SendCommands(sender.get())); -CHIP_ERROR ColorControlCluster::SubscribeAttributeCompensationText(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::CompensationText::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; } -CHIP_ERROR ColorControlCluster::ReportAttributeCompensationText(Callback::Cancelable * onReportCallback) +CHIP_ERROR ContentLauncherCluster::LaunchURL(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + chip::CharSpan contentURL, chip::CharSpan displayString, chip::CharSpan providerName) { - return RequestAttributeReporting(ColorControl::Attributes::CompensationText::Id, onReportCallback, - BasicAttributeFilter); -} + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; -CHIP_ERROR ColorControlCluster::SubscribeAttributeColorTemperature(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::ColorTemperature::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; -CHIP_ERROR ColorControlCluster::ReportAttributeColorTemperature(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::ColorTemperature::Id, onReportCallback, - BasicAttributeFilter); -} + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); -CHIP_ERROR ColorControlCluster::SubscribeAttributeColorMode(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::ColorMode::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, ContentLauncher::Commands::LaunchURL::Id, + (app::CommandPathFlags::kEndpointIdValid) }; -CHIP_ERROR ColorControlCluster::ReportAttributeColorMode(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::ColorMode::Id, onReportCallback, - BasicAttributeFilter); -} + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); -CHIP_ERROR ColorControlCluster::SubscribeAttributeColorControlOptions(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::ColorControlOptions::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); -CHIP_ERROR ColorControlCluster::ReportAttributeColorControlOptions(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::ColorControlOptions::Id, onReportCallback, - BasicAttributeFilter); -} + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); -CHIP_ERROR ColorControlCluster::SubscribeAttributeNumberOfPrimaries(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::NumberOfPrimaries::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // contentURL: charString + SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), contentURL)); + // displayString: charString + SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), displayString)); + // providerName: charString + SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), providerName)); -CHIP_ERROR ColorControlCluster::ReportAttributeNumberOfPrimaries(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::NumberOfPrimaries::Id, onReportCallback, - BasicAttributeFilter); -} + SuccessOrExit(err = sender->FinishCommand()); -CHIP_ERROR ColorControlCluster::SubscribeAttributePrimary1X(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::Primary1X::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); -CHIP_ERROR ColorControlCluster::ReportAttributePrimary1X(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::Primary1X::Id, onReportCallback, - BasicAttributeFilter); -} + SuccessOrExit(err = mDevice->SendCommands(sender.get())); -CHIP_ERROR ColorControlCluster::SubscribeAttributePrimary1Y(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::Primary1Y::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; } -CHIP_ERROR ColorControlCluster::ReportAttributePrimary1Y(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::Primary1Y::Id, onReportCallback, - BasicAttributeFilter); -} +// Descriptor Cluster Commands -CHIP_ERROR ColorControlCluster::SubscribeAttributePrimary1Intensity(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) +// DiagnosticLogs Cluster Commands +CHIP_ERROR DiagnosticLogsCluster::RetrieveLogsRequest(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t intent, + uint8_t requestedProtocol, chip::ByteSpan transferFileDesignator) { - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::Primary1Intensity::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; -CHIP_ERROR ColorControlCluster::ReportAttributePrimary1Intensity(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::Primary1Intensity::Id, onReportCallback, - BasicAttributeFilter); -} + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; -CHIP_ERROR ColorControlCluster::SubscribeAttributePrimary2X(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::Primary2X::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); -CHIP_ERROR ColorControlCluster::ReportAttributePrimary2X(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::Primary2X::Id, onReportCallback, - BasicAttributeFilter); -} + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, DiagnosticLogs::Commands::RetrieveLogsRequest::Id, + (app::CommandPathFlags::kEndpointIdValid) }; -CHIP_ERROR ColorControlCluster::SubscribeAttributePrimary2Y(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::Primary2Y::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); -CHIP_ERROR ColorControlCluster::ReportAttributePrimary2Y(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::Primary2Y::Id, onReportCallback, - BasicAttributeFilter); -} + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); -CHIP_ERROR ColorControlCluster::SubscribeAttributePrimary2Intensity(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::Primary2Intensity::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); -CHIP_ERROR ColorControlCluster::ReportAttributePrimary2Intensity(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::Primary2Intensity::Id, onReportCallback, - BasicAttributeFilter); -} + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // intent: logsIntent + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), intent)); + // requestedProtocol: logsTransferProtocol + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), requestedProtocol)); + // transferFileDesignator: octetString + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), transferFileDesignator)); -CHIP_ERROR ColorControlCluster::SubscribeAttributePrimary3X(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::Primary3X::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = sender->FinishCommand()); -CHIP_ERROR ColorControlCluster::ReportAttributePrimary3X(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::Primary3X::Id, onReportCallback, - BasicAttributeFilter); -} + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); -CHIP_ERROR ColorControlCluster::SubscribeAttributePrimary3Y(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::Primary3Y::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = mDevice->SendCommands(sender.get())); -CHIP_ERROR ColorControlCluster::ReportAttributePrimary3Y(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::Primary3Y::Id, onReportCallback, - BasicAttributeFilter); + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; } -CHIP_ERROR ColorControlCluster::SubscribeAttributePrimary3Intensity(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) +// DoorLock Cluster Commands +CHIP_ERROR DoorLockCluster::ClearCredential(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t credentialType, uint16_t credentialIndex) { - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::Primary3Intensity::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; -CHIP_ERROR ColorControlCluster::ReportAttributePrimary3Intensity(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::Primary3Intensity::Id, onReportCallback, - BasicAttributeFilter); -} + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; -CHIP_ERROR ColorControlCluster::SubscribeAttributePrimary4X(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::Primary4X::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); -CHIP_ERROR ColorControlCluster::ReportAttributePrimary4X(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::Primary4X::Id, onReportCallback, - BasicAttributeFilter); -} + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, DoorLock::Commands::ClearCredential::Id, + (app::CommandPathFlags::kEndpointIdValid) }; -CHIP_ERROR ColorControlCluster::SubscribeAttributePrimary4Y(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::Primary4Y::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); -CHIP_ERROR ColorControlCluster::ReportAttributePrimary4Y(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::Primary4Y::Id, onReportCallback, - BasicAttributeFilter); -} + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); -CHIP_ERROR ColorControlCluster::SubscribeAttributePrimary4Intensity(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::Primary4Intensity::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); -CHIP_ERROR ColorControlCluster::ReportAttributePrimary4Intensity(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::Primary4Intensity::Id, onReportCallback, - BasicAttributeFilter); -} + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // credentialType: dlCredentialType + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), credentialType)); + // credentialIndex: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), credentialIndex)); -CHIP_ERROR ColorControlCluster::SubscribeAttributePrimary5X(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::Primary5X::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = sender->FinishCommand()); -CHIP_ERROR ColorControlCluster::ReportAttributePrimary5X(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::Primary5X::Id, onReportCallback, - BasicAttributeFilter); -} + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); -CHIP_ERROR ColorControlCluster::SubscribeAttributePrimary5Y(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::Primary5Y::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = mDevice->SendCommands(sender.get())); -CHIP_ERROR ColorControlCluster::ReportAttributePrimary5Y(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::Primary5Y::Id, onReportCallback, - BasicAttributeFilter); + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; } -CHIP_ERROR ColorControlCluster::SubscribeAttributePrimary5Intensity(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) +CHIP_ERROR DoorLockCluster::ClearUser(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t userIndex) { - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::Primary5Intensity::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ColorControlCluster::ReportAttributePrimary5Intensity(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::Primary5Intensity::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ColorControlCluster::SubscribeAttributePrimary6X(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::Primary6X::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ColorControlCluster::ReportAttributePrimary6X(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::Primary6X::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ColorControlCluster::SubscribeAttributePrimary6Y(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::Primary6Y::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ColorControlCluster::ReportAttributePrimary6Y(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::Primary6Y::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ColorControlCluster::SubscribeAttributePrimary6Intensity(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::Primary6Intensity::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ColorControlCluster::ReportAttributePrimary6Intensity(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::Primary6Intensity::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ColorControlCluster::SubscribeAttributeWhitePointX(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::WhitePointX::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ColorControlCluster::ReportAttributeWhitePointX(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::WhitePointX::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ColorControlCluster::SubscribeAttributeWhitePointY(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::WhitePointY::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ColorControlCluster::ReportAttributeWhitePointY(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::WhitePointY::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ColorControlCluster::SubscribeAttributeColorPointRX(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::ColorPointRX::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ColorControlCluster::ReportAttributeColorPointRX(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::ColorPointRX::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ColorControlCluster::SubscribeAttributeColorPointRY(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::ColorPointRY::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ColorControlCluster::ReportAttributeColorPointRY(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::ColorPointRY::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ColorControlCluster::SubscribeAttributeColorPointRIntensity(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::ColorPointRIntensity::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ColorControlCluster::ReportAttributeColorPointRIntensity(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::ColorPointRIntensity::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ColorControlCluster::SubscribeAttributeColorPointGX(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::ColorPointGX::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ColorControlCluster::ReportAttributeColorPointGX(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::ColorPointGX::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ColorControlCluster::SubscribeAttributeColorPointGY(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::ColorPointGY::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ColorControlCluster::ReportAttributeColorPointGY(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::ColorPointGY::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ColorControlCluster::SubscribeAttributeColorPointGIntensity(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::ColorPointGIntensity::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ColorControlCluster::ReportAttributeColorPointGIntensity(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::ColorPointGIntensity::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ColorControlCluster::SubscribeAttributeColorPointBX(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::ColorPointBX::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ColorControlCluster::ReportAttributeColorPointBX(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::ColorPointBX::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ColorControlCluster::SubscribeAttributeColorPointBY(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::ColorPointBY::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ColorControlCluster::ReportAttributeColorPointBY(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::ColorPointBY::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ColorControlCluster::SubscribeAttributeColorPointBIntensity(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::ColorPointBIntensity::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ColorControlCluster::ReportAttributeColorPointBIntensity(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::ColorPointBIntensity::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ColorControlCluster::SubscribeAttributeEnhancedCurrentHue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::EnhancedCurrentHue::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ColorControlCluster::ReportAttributeEnhancedCurrentHue(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::EnhancedCurrentHue::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ColorControlCluster::SubscribeAttributeEnhancedColorMode(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::EnhancedColorMode::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ColorControlCluster::ReportAttributeEnhancedColorMode(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::EnhancedColorMode::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ColorControlCluster::SubscribeAttributeColorLoopActive(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::ColorLoopActive::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ColorControlCluster::ReportAttributeColorLoopActive(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::ColorLoopActive::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ColorControlCluster::SubscribeAttributeColorLoopDirection(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::ColorLoopDirection::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ColorControlCluster::ReportAttributeColorLoopDirection(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::ColorLoopDirection::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ColorControlCluster::SubscribeAttributeColorLoopTime(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::ColorLoopTime::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ColorControlCluster::ReportAttributeColorLoopTime(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::ColorLoopTime::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ColorControlCluster::SubscribeAttributeColorLoopStartEnhancedHue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::ColorLoopStartEnhancedHue::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ColorControlCluster::ReportAttributeColorLoopStartEnhancedHue(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ColorControlCluster::SubscribeAttributeColorLoopStoredEnhancedHue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ColorControlCluster::ReportAttributeColorLoopStoredEnhancedHue(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ColorControlCluster::SubscribeAttributeColorCapabilities(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::ColorCapabilities::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ColorControlCluster::ReportAttributeColorCapabilities(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::ColorCapabilities::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ColorControlCluster::SubscribeAttributeColorTempPhysicalMin(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::ColorTempPhysicalMin::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ColorControlCluster::ReportAttributeColorTempPhysicalMin(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::ColorTempPhysicalMin::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ColorControlCluster::SubscribeAttributeColorTempPhysicalMax(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::ColorTempPhysicalMax::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ColorControlCluster::ReportAttributeColorTempPhysicalMax(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::ColorTempPhysicalMax::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ColorControlCluster::SubscribeAttributeCoupleColorTempToLevelMinMireds(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::CoupleColorTempToLevelMinMireds::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ColorControlCluster::ReportAttributeCoupleColorTempToLevelMinMireds(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::CoupleColorTempToLevelMinMireds::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ColorControlCluster::SubscribeAttributeStartUpColorTemperatureMireds(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ColorControl::Attributes::StartUpColorTemperatureMireds::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ColorControlCluster::ReportAttributeStartUpColorTemperatureMireds(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ColorControl::Attributes::StartUpColorTemperatureMireds::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ColorControlCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ColorControlCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} - -// ContentLauncher Cluster Commands -CHIP_ERROR ContentLauncherCluster::LaunchContent(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - bool autoPlay, chip::CharSpan data, uint8_t type, chip::CharSpan value) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - TLV::TLVWriter * writer = nullptr; - uint8_t argSeqNumber = 0; + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; // Used when encoding non-empty command. Suppress error message when encoding empty commands. (void) writer; @@ -3969,7 +2460,7 @@ CHIP_ERROR ContentLauncherCluster::LaunchContent(Callback::Cancelable * onSucces VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, ContentLauncher::Commands::LaunchContent::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, DoorLock::Commands::ClearUser::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -3980,14 +2471,8 @@ CHIP_ERROR ContentLauncherCluster::LaunchContent(Callback::Cancelable * onSucces SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // autoPlay: boolean - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), autoPlay)); - // data: charString - SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), data)); - // type: contentLaunchParameterEnum - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), type)); - // value: charString - SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), value)); + // userIndex: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), userIndex)); SuccessOrExit(err = sender->FinishCommand()); @@ -4003,8 +2488,8 @@ CHIP_ERROR ContentLauncherCluster::LaunchContent(Callback::Cancelable * onSucces return err; } -CHIP_ERROR ContentLauncherCluster::LaunchURL(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - chip::CharSpan contentURL, chip::CharSpan displayString, chip::CharSpan providerName) +CHIP_ERROR DoorLockCluster::GetCredentialStatus(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t credentialType, uint16_t credentialIndex) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -4016,7 +2501,7 @@ CHIP_ERROR ContentLauncherCluster::LaunchURL(Callback::Cancelable * onSuccessCal VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, ContentLauncher::Commands::LaunchURL::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, DoorLock::Commands::GetCredentialStatus::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -4027,12 +2512,10 @@ CHIP_ERROR ContentLauncherCluster::LaunchURL(Callback::Cancelable * onSuccessCal SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // contentURL: charString - SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), contentURL)); - // displayString: charString - SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), displayString)); - // providerName: charString - SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), providerName)); + // credentialType: dlCredentialType + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), credentialType)); + // credentialIndex: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), credentialIndex)); SuccessOrExit(err = sender->FinishCommand()); @@ -4048,64 +2531,8 @@ CHIP_ERROR ContentLauncherCluster::LaunchURL(Callback::Cancelable * onSuccessCal return err; } -// ContentLauncher Cluster Attributes -CHIP_ERROR ContentLauncherCluster::SubscribeAttributeSupportedStreamingProtocols(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ContentLauncher::Attributes::SupportedStreamingProtocols::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ContentLauncherCluster::ReportAttributeSupportedStreamingProtocols(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ContentLauncher::Attributes::SupportedStreamingProtocols::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ContentLauncherCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ContentLauncherCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} - -// Descriptor Cluster Commands -// Descriptor Cluster Attributes -CHIP_ERROR DescriptorCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR DescriptorCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} - -// DiagnosticLogs Cluster Commands -CHIP_ERROR DiagnosticLogsCluster::RetrieveLogsRequest(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t intent, - uint8_t requestedProtocol, chip::ByteSpan transferFileDesignator) +CHIP_ERROR DoorLockCluster::GetUser(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t userIndex) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -4117,7 +2544,7 @@ CHIP_ERROR DiagnosticLogsCluster::RetrieveLogsRequest(Callback::Cancelable * onS VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, DiagnosticLogs::Commands::RetrieveLogsRequest::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, DoorLock::Commands::GetUser::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -4128,12 +2555,8 @@ CHIP_ERROR DiagnosticLogsCluster::RetrieveLogsRequest(Callback::Cancelable * onS SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // intent: logsIntent - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), intent)); - // requestedProtocol: logsTransferProtocol - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), requestedProtocol)); - // transferFileDesignator: octetString - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), transferFileDesignator)); + // userIndex: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), userIndex)); SuccessOrExit(err = sender->FinishCommand()); @@ -4149,11 +2572,8 @@ CHIP_ERROR DiagnosticLogsCluster::RetrieveLogsRequest(Callback::Cancelable * onS return err; } -// DiagnosticLogs Cluster Attributes - -// DoorLock Cluster Commands -CHIP_ERROR DoorLockCluster::ClearCredential(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint8_t credentialType, uint16_t credentialIndex) +CHIP_ERROR DoorLockCluster::LockDoor(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + chip::ByteSpan pinCode) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -4165,7 +2585,7 @@ CHIP_ERROR DoorLockCluster::ClearCredential(Callback::Cancelable * onSuccessCall VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, DoorLock::Commands::ClearCredential::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, DoorLock::Commands::LockDoor::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -4176,10 +2596,8 @@ CHIP_ERROR DoorLockCluster::ClearCredential(Callback::Cancelable * onSuccessCall SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // credentialType: dlCredentialType - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), credentialType)); - // credentialIndex: int16u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), credentialIndex)); + // pinCode: octetString + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), pinCode)); SuccessOrExit(err = sender->FinishCommand()); @@ -4195,8 +2613,9 @@ CHIP_ERROR DoorLockCluster::ClearCredential(Callback::Cancelable * onSuccessCall return err; } -CHIP_ERROR DoorLockCluster::ClearUser(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t userIndex) +CHIP_ERROR DoorLockCluster::SetCredential(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t operationType, uint8_t credentialType, uint16_t credentialIndex, + chip::ByteSpan credentialData, uint16_t userIndex, uint8_t userStatus) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -4208,7 +2627,7 @@ CHIP_ERROR DoorLockCluster::ClearUser(Callback::Cancelable * onSuccessCallback, VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, DoorLock::Commands::ClearUser::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, DoorLock::Commands::SetCredential::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -4219,8 +2638,18 @@ CHIP_ERROR DoorLockCluster::ClearUser(Callback::Cancelable * onSuccessCallback, SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // operationType: dlDataOperationType + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), operationType)); + // credentialType: dlCredentialType + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), credentialType)); + // credentialIndex: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), credentialIndex)); + // credentialData: longOctetString + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), credentialData)); // userIndex: int16u SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), userIndex)); + // userStatus: dlUserStatus + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), userStatus)); SuccessOrExit(err = sender->FinishCommand()); @@ -4236,8 +2665,9 @@ CHIP_ERROR DoorLockCluster::ClearUser(Callback::Cancelable * onSuccessCallback, return err; } -CHIP_ERROR DoorLockCluster::GetCredentialStatus(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint8_t credentialType, uint16_t credentialIndex) +CHIP_ERROR DoorLockCluster::SetUser(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t operationType, uint16_t userIndex, chip::CharSpan userName, uint32_t userUniqueId, + uint8_t userStatus, uint8_t userType, uint8_t credentialRule) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -4249,7 +2679,7 @@ CHIP_ERROR DoorLockCluster::GetCredentialStatus(Callback::Cancelable * onSuccess VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, DoorLock::Commands::GetCredentialStatus::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, DoorLock::Commands::SetUser::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -4260,10 +2690,20 @@ CHIP_ERROR DoorLockCluster::GetCredentialStatus(Callback::Cancelable * onSuccess SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // credentialType: dlCredentialType - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), credentialType)); - // credentialIndex: int16u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), credentialIndex)); + // operationType: dlDataOperationType + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), operationType)); + // userIndex: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), userIndex)); + // userName: charString + SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), userName)); + // userUniqueId: int32u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), userUniqueId)); + // userStatus: dlUserStatus + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), userStatus)); + // userType: dlUserType + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), userType)); + // credentialRule: dlCredentialRule + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), credentialRule)); SuccessOrExit(err = sender->FinishCommand()); @@ -4279,8 +2719,8 @@ CHIP_ERROR DoorLockCluster::GetCredentialStatus(Callback::Cancelable * onSuccess return err; } -CHIP_ERROR DoorLockCluster::GetUser(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t userIndex) +CHIP_ERROR DoorLockCluster::UnlockDoor(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + chip::ByteSpan pinCode) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -4292,7 +2732,7 @@ CHIP_ERROR DoorLockCluster::GetUser(Callback::Cancelable * onSuccessCallback, Ca VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, DoorLock::Commands::GetUser::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, DoorLock::Commands::UnlockDoor::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -4303,8 +2743,8 @@ CHIP_ERROR DoorLockCluster::GetUser(Callback::Cancelable * onSuccessCallback, Ca SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // userIndex: int16u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), userIndex)); + // pinCode: octetString + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), pinCode)); SuccessOrExit(err = sender->FinishCommand()); @@ -4320,8 +2760,11 @@ CHIP_ERROR DoorLockCluster::GetUser(Callback::Cancelable * onSuccessCallback, Ca return err; } -CHIP_ERROR DoorLockCluster::LockDoor(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - chip::ByteSpan pinCode) +// ElectricalMeasurement Cluster Commands + +// EthernetNetworkDiagnostics Cluster Commands +CHIP_ERROR EthernetNetworkDiagnosticsCluster::ResetCounts(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -4333,7 +2776,8 @@ CHIP_ERROR DoorLockCluster::LockDoor(Callback::Cancelable * onSuccessCallback, C VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, DoorLock::Commands::LockDoor::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, + EthernetNetworkDiagnostics::Commands::ResetCounts::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -4343,9 +2787,7 @@ CHIP_ERROR DoorLockCluster::LockDoor(Callback::Cancelable * onSuccessCallback, C SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // pinCode: octetString - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), pinCode)); + // Command takes no arguments. SuccessOrExit(err = sender->FinishCommand()); @@ -4361,9 +2803,14 @@ CHIP_ERROR DoorLockCluster::LockDoor(Callback::Cancelable * onSuccessCallback, C return err; } -CHIP_ERROR DoorLockCluster::SetCredential(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint8_t operationType, uint8_t credentialType, uint16_t credentialIndex, - chip::ByteSpan credentialData, uint16_t userIndex, uint8_t userStatus) +// FixedLabel Cluster Commands + +// FlowMeasurement Cluster Commands + +// GeneralCommissioning Cluster Commands +CHIP_ERROR GeneralCommissioningCluster::ArmFailSafe(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t expiryLengthSeconds, + uint64_t breadcrumb, uint32_t timeoutMs) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -4375,7 +2822,7 @@ CHIP_ERROR DoorLockCluster::SetCredential(Callback::Cancelable * onSuccessCallba VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, DoorLock::Commands::SetCredential::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, GeneralCommissioning::Commands::ArmFailSafe::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -4386,18 +2833,12 @@ CHIP_ERROR DoorLockCluster::SetCredential(Callback::Cancelable * onSuccessCallba SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // operationType: dlDataOperationType - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), operationType)); - // credentialType: dlCredentialType - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), credentialType)); - // credentialIndex: int16u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), credentialIndex)); - // credentialData: longOctetString - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), credentialData)); - // userIndex: int16u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), userIndex)); - // userStatus: dlUserStatus - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), userStatus)); + // expiryLengthSeconds: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), expiryLengthSeconds)); + // breadcrumb: int64u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), breadcrumb)); + // timeoutMs: int32u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), timeoutMs)); SuccessOrExit(err = sender->FinishCommand()); @@ -4413,9 +2854,8 @@ CHIP_ERROR DoorLockCluster::SetCredential(Callback::Cancelable * onSuccessCallba return err; } -CHIP_ERROR DoorLockCluster::SetUser(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint8_t operationType, uint16_t userIndex, chip::CharSpan userName, uint32_t userUniqueId, - uint8_t userStatus, uint8_t userType, uint8_t credentialRule) +CHIP_ERROR GeneralCommissioningCluster::CommissioningComplete(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -4427,7 +2867,8 @@ CHIP_ERROR DoorLockCluster::SetUser(Callback::Cancelable * onSuccessCallback, Ca VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, DoorLock::Commands::SetUser::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, + GeneralCommissioning::Commands::CommissioningComplete::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -4437,21 +2878,7 @@ CHIP_ERROR DoorLockCluster::SetUser(Callback::Cancelable * onSuccessCallback, Ca SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // operationType: dlDataOperationType - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), operationType)); - // userIndex: int16u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), userIndex)); - // userName: charString - SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), userName)); - // userUniqueId: int32u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), userUniqueId)); - // userStatus: dlUserStatus - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), userStatus)); - // userType: dlUserType - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), userType)); - // credentialRule: dlCredentialRule - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), credentialRule)); + // Command takes no arguments. SuccessOrExit(err = sender->FinishCommand()); @@ -4467,8 +2894,9 @@ CHIP_ERROR DoorLockCluster::SetUser(Callback::Cancelable * onSuccessCallback, Ca return err; } -CHIP_ERROR DoorLockCluster::UnlockDoor(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - chip::ByteSpan pinCode) +CHIP_ERROR GeneralCommissioningCluster::SetRegulatoryConfig(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t location, + chip::CharSpan countryCode, uint64_t breadcrumb, uint32_t timeoutMs) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -4480,7 +2908,8 @@ CHIP_ERROR DoorLockCluster::UnlockDoor(Callback::Cancelable * onSuccessCallback, VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, DoorLock::Commands::UnlockDoor::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, + GeneralCommissioning::Commands::SetRegulatoryConfig::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -4491,8 +2920,14 @@ CHIP_ERROR DoorLockCluster::UnlockDoor(Callback::Cancelable * onSuccessCallback, SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // pinCode: octetString - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), pinCode)); + // location: regulatoryLocationType + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), location)); + // countryCode: charString + SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), countryCode)); + // breadcrumb: int64u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), breadcrumb)); + // timeoutMs: int32u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), timeoutMs)); SuccessOrExit(err = sender->FinishCommand()); @@ -4508,420 +2943,139 @@ CHIP_ERROR DoorLockCluster::UnlockDoor(Callback::Cancelable * onSuccessCallback, return err; } -// DoorLock Cluster Attributes -CHIP_ERROR DoorLockCluster::SubscribeAttributeLockState(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = DoorLock::Attributes::LockState::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} +// GeneralDiagnostics Cluster Commands -CHIP_ERROR DoorLockCluster::ReportAttributeLockState(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(DoorLock::Attributes::LockState::Id, onReportCallback, - BasicAttributeFilter); -} +// GroupKeyManagement Cluster Commands -CHIP_ERROR DoorLockCluster::SubscribeAttributeLockType(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) +// Groups Cluster Commands +CHIP_ERROR GroupsCluster::AddGroup(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t groupId, chip::CharSpan groupName) { - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = DoorLock::Attributes::LockType::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; -CHIP_ERROR DoorLockCluster::ReportAttributeLockType(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(DoorLock::Attributes::LockType::Id, onReportCallback, - BasicAttributeFilter); -} + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; -CHIP_ERROR DoorLockCluster::SubscribeAttributeActuatorEnabled(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = DoorLock::Attributes::ActuatorEnabled::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); -CHIP_ERROR DoorLockCluster::ReportAttributeActuatorEnabled(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(DoorLock::Attributes::ActuatorEnabled::Id, onReportCallback, - BasicAttributeFilter); -} + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, Groups::Commands::AddGroup::Id, + (app::CommandPathFlags::kEndpointIdValid) }; -CHIP_ERROR DoorLockCluster::SubscribeAttributeDoorState(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = DoorLock::Attributes::DoorState::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); -CHIP_ERROR DoorLockCluster::ReportAttributeDoorState(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(DoorLock::Attributes::DoorState::Id, onReportCallback, - BasicAttributeFilter); -} + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); -CHIP_ERROR DoorLockCluster::SubscribeAttributeLanguage(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = DoorLock::Attributes::Language::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); -CHIP_ERROR DoorLockCluster::ReportAttributeLanguage(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(DoorLock::Attributes::Language::Id, onReportCallback, - BasicAttributeFilter); -} + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // groupId: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), groupId)); + // groupName: charString + SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), groupName)); -CHIP_ERROR DoorLockCluster::SubscribeAttributeAutoRelockTime(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = DoorLock::Attributes::AutoRelockTime::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = sender->FinishCommand()); -CHIP_ERROR DoorLockCluster::ReportAttributeAutoRelockTime(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(DoorLock::Attributes::AutoRelockTime::Id, onReportCallback, - BasicAttributeFilter); -} + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); -CHIP_ERROR DoorLockCluster::SubscribeAttributeSoundVolume(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = DoorLock::Attributes::SoundVolume::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = mDevice->SendCommands(sender.get())); -CHIP_ERROR DoorLockCluster::ReportAttributeSoundVolume(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(DoorLock::Attributes::SoundVolume::Id, onReportCallback, - BasicAttributeFilter); + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; } -CHIP_ERROR DoorLockCluster::SubscribeAttributeOperatingMode(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) +CHIP_ERROR GroupsCluster::AddGroupIfIdentifying(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t groupId, chip::CharSpan groupName) { - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = DoorLock::Attributes::OperatingMode::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; -CHIP_ERROR DoorLockCluster::ReportAttributeOperatingMode(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(DoorLock::Attributes::OperatingMode::Id, onReportCallback, - BasicAttributeFilter); -} + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; -CHIP_ERROR DoorLockCluster::SubscribeAttributeEnableOneTouchLocking(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = DoorLock::Attributes::EnableOneTouchLocking::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); -CHIP_ERROR DoorLockCluster::ReportAttributeEnableOneTouchLocking(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(DoorLock::Attributes::EnableOneTouchLocking::Id, onReportCallback, - BasicAttributeFilter); -} + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, Groups::Commands::AddGroupIfIdentifying::Id, + (app::CommandPathFlags::kEndpointIdValid) }; -CHIP_ERROR DoorLockCluster::SubscribeAttributeEnablePrivacyModeButton(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = DoorLock::Attributes::EnablePrivacyModeButton::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); -CHIP_ERROR DoorLockCluster::ReportAttributeEnablePrivacyModeButton(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(DoorLock::Attributes::EnablePrivacyModeButton::Id, onReportCallback, - BasicAttributeFilter); -} + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); -CHIP_ERROR DoorLockCluster::SubscribeAttributeWrongCodeEntryLimit(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = DoorLock::Attributes::WrongCodeEntryLimit::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); -CHIP_ERROR DoorLockCluster::ReportAttributeWrongCodeEntryLimit(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(DoorLock::Attributes::WrongCodeEntryLimit::Id, onReportCallback, - BasicAttributeFilter); -} + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // groupId: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), groupId)); + // groupName: charString + SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), groupName)); -CHIP_ERROR DoorLockCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = sender->FinishCommand()); -CHIP_ERROR DoorLockCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); -// ElectricalMeasurement Cluster Commands -// ElectricalMeasurement Cluster Attributes -CHIP_ERROR ElectricalMeasurementCluster::SubscribeAttributeMeasurementType(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ElectricalMeasurement::Attributes::MeasurementType::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = mDevice->SendCommands(sender.get())); -CHIP_ERROR ElectricalMeasurementCluster::ReportAttributeMeasurementType(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ElectricalMeasurement::Attributes::MeasurementType::Id, onReportCallback, - BasicAttributeFilter); + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; } -CHIP_ERROR ElectricalMeasurementCluster::SubscribeAttributeTotalActivePower(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) +CHIP_ERROR GroupsCluster::GetGroupMembership(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t groupList) { - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ElectricalMeasurement::Attributes::TotalActivePower::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; -CHIP_ERROR ElectricalMeasurementCluster::ReportAttributeTotalActivePower(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ElectricalMeasurement::Attributes::TotalActivePower::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ElectricalMeasurementCluster::SubscribeAttributeRmsVoltage(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ElectricalMeasurement::Attributes::RmsVoltage::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ElectricalMeasurementCluster::ReportAttributeRmsVoltage(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ElectricalMeasurement::Attributes::RmsVoltage::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ElectricalMeasurementCluster::SubscribeAttributeRmsVoltageMin(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ElectricalMeasurement::Attributes::RmsVoltageMin::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ElectricalMeasurementCluster::ReportAttributeRmsVoltageMin(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ElectricalMeasurement::Attributes::RmsVoltageMin::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ElectricalMeasurementCluster::SubscribeAttributeRmsVoltageMax(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ElectricalMeasurement::Attributes::RmsVoltageMax::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ElectricalMeasurementCluster::ReportAttributeRmsVoltageMax(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ElectricalMeasurement::Attributes::RmsVoltageMax::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ElectricalMeasurementCluster::SubscribeAttributeRmsCurrent(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ElectricalMeasurement::Attributes::RmsCurrent::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ElectricalMeasurementCluster::ReportAttributeRmsCurrent(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ElectricalMeasurement::Attributes::RmsCurrent::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ElectricalMeasurementCluster::SubscribeAttributeRmsCurrentMin(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ElectricalMeasurement::Attributes::RmsCurrentMin::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ElectricalMeasurementCluster::ReportAttributeRmsCurrentMin(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ElectricalMeasurement::Attributes::RmsCurrentMin::Id, onReportCallback, - BasicAttributeFilter); -} + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; -CHIP_ERROR ElectricalMeasurementCluster::SubscribeAttributeRmsCurrentMax(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ElectricalMeasurement::Attributes::RmsCurrentMax::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); -CHIP_ERROR ElectricalMeasurementCluster::ReportAttributeRmsCurrentMax(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ElectricalMeasurement::Attributes::RmsCurrentMax::Id, onReportCallback, - BasicAttributeFilter); -} + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, Groups::Commands::GetGroupMembership::Id, + (app::CommandPathFlags::kEndpointIdValid) }; -CHIP_ERROR ElectricalMeasurementCluster::SubscribeAttributeActivePower(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ElectricalMeasurement::Attributes::ActivePower::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); -CHIP_ERROR ElectricalMeasurementCluster::ReportAttributeActivePower(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ElectricalMeasurement::Attributes::ActivePower::Id, onReportCallback, - BasicAttributeFilter); -} + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); -CHIP_ERROR ElectricalMeasurementCluster::SubscribeAttributeActivePowerMin(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ElectricalMeasurement::Attributes::ActivePowerMin::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); -CHIP_ERROR ElectricalMeasurementCluster::ReportAttributeActivePowerMin(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ElectricalMeasurement::Attributes::ActivePowerMin::Id, onReportCallback, - BasicAttributeFilter); -} + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // groupList: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), groupList)); -CHIP_ERROR ElectricalMeasurementCluster::SubscribeAttributeActivePowerMax(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ElectricalMeasurement::Attributes::ActivePowerMax::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = sender->FinishCommand()); -CHIP_ERROR ElectricalMeasurementCluster::ReportAttributeActivePowerMax(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ElectricalMeasurement::Attributes::ActivePowerMax::Id, onReportCallback, - BasicAttributeFilter); -} + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); -CHIP_ERROR ElectricalMeasurementCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = mDevice->SendCommands(sender.get())); -CHIP_ERROR ElectricalMeasurementCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; } -// EthernetNetworkDiagnostics Cluster Commands -CHIP_ERROR EthernetNetworkDiagnosticsCluster::ResetCounts(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) +CHIP_ERROR GroupsCluster::RemoveAllGroups(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -4933,8 +3087,7 @@ CHIP_ERROR EthernetNetworkDiagnosticsCluster::ResetCounts(Callback::Cancelable * VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, - EthernetNetworkDiagnostics::Commands::ResetCounts::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, Groups::Commands::RemoveAllGroups::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -4960,287 +3113,91 @@ CHIP_ERROR EthernetNetworkDiagnosticsCluster::ResetCounts(Callback::Cancelable * return err; } -// EthernetNetworkDiagnostics Cluster Attributes -CHIP_ERROR EthernetNetworkDiagnosticsCluster::SubscribeAttributePHYRate(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = EthernetNetworkDiagnostics::Attributes::PHYRate::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR EthernetNetworkDiagnosticsCluster::ReportAttributePHYRate(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(EthernetNetworkDiagnostics::Attributes::PHYRate::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR EthernetNetworkDiagnosticsCluster::SubscribeAttributeFullDuplex(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = EthernetNetworkDiagnostics::Attributes::FullDuplex::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR EthernetNetworkDiagnosticsCluster::ReportAttributeFullDuplex(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(EthernetNetworkDiagnostics::Attributes::FullDuplex::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR EthernetNetworkDiagnosticsCluster::SubscribeAttributePacketRxCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = EthernetNetworkDiagnostics::Attributes::PacketRxCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR EthernetNetworkDiagnosticsCluster::ReportAttributePacketRxCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(EthernetNetworkDiagnostics::Attributes::PacketRxCount::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR EthernetNetworkDiagnosticsCluster::SubscribeAttributePacketTxCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = EthernetNetworkDiagnostics::Attributes::PacketTxCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR EthernetNetworkDiagnosticsCluster::ReportAttributePacketTxCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(EthernetNetworkDiagnostics::Attributes::PacketTxCount::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR EthernetNetworkDiagnosticsCluster::SubscribeAttributeTxErrCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) +CHIP_ERROR GroupsCluster::RemoveGroup(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t groupId) { - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = EthernetNetworkDiagnostics::Attributes::TxErrCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; -CHIP_ERROR EthernetNetworkDiagnosticsCluster::ReportAttributeTxErrCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(EthernetNetworkDiagnostics::Attributes::TxErrCount::Id, onReportCallback, - BasicAttributeFilter); -} + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; -CHIP_ERROR EthernetNetworkDiagnosticsCluster::SubscribeAttributeCollisionCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = EthernetNetworkDiagnostics::Attributes::CollisionCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); -CHIP_ERROR EthernetNetworkDiagnosticsCluster::ReportAttributeCollisionCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(EthernetNetworkDiagnostics::Attributes::CollisionCount::Id, onReportCallback, - BasicAttributeFilter); -} + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, Groups::Commands::RemoveGroup::Id, + (app::CommandPathFlags::kEndpointIdValid) }; -CHIP_ERROR EthernetNetworkDiagnosticsCluster::SubscribeAttributeOverrunCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = EthernetNetworkDiagnostics::Attributes::OverrunCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); -CHIP_ERROR EthernetNetworkDiagnosticsCluster::ReportAttributeOverrunCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(EthernetNetworkDiagnostics::Attributes::OverrunCount::Id, onReportCallback, - BasicAttributeFilter); -} + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); -CHIP_ERROR EthernetNetworkDiagnosticsCluster::SubscribeAttributeCarrierDetect(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = EthernetNetworkDiagnostics::Attributes::CarrierDetect::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); -CHIP_ERROR EthernetNetworkDiagnosticsCluster::ReportAttributeCarrierDetect(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(EthernetNetworkDiagnostics::Attributes::CarrierDetect::Id, onReportCallback, - BasicAttributeFilter); -} + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // groupId: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), groupId)); -CHIP_ERROR EthernetNetworkDiagnosticsCluster::SubscribeAttributeTimeSinceReset(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = EthernetNetworkDiagnostics::Attributes::TimeSinceReset::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = sender->FinishCommand()); -CHIP_ERROR EthernetNetworkDiagnosticsCluster::ReportAttributeTimeSinceReset(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(EthernetNetworkDiagnostics::Attributes::TimeSinceReset::Id, onReportCallback, - BasicAttributeFilter); -} + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); -CHIP_ERROR EthernetNetworkDiagnosticsCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = mDevice->SendCommands(sender.get())); -CHIP_ERROR EthernetNetworkDiagnosticsCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; } -// FixedLabel Cluster Commands -// FixedLabel Cluster Attributes -CHIP_ERROR FixedLabelCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) +CHIP_ERROR GroupsCluster::ViewGroup(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t groupId) { - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; -CHIP_ERROR FixedLabelCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; -// FlowMeasurement Cluster Commands -// FlowMeasurement Cluster Attributes -CHIP_ERROR FlowMeasurementCluster::SubscribeAttributeMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = FlowMeasurement::Attributes::MeasuredValue::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); -CHIP_ERROR FlowMeasurementCluster::ReportAttributeMeasuredValue(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(FlowMeasurement::Attributes::MeasuredValue::Id, onReportCallback, - BasicAttributeFilter); -} + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, Groups::Commands::ViewGroup::Id, + (app::CommandPathFlags::kEndpointIdValid) }; -CHIP_ERROR FlowMeasurementCluster::SubscribeAttributeMinMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = FlowMeasurement::Attributes::MinMeasuredValue::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); -CHIP_ERROR FlowMeasurementCluster::ReportAttributeMinMeasuredValue(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(FlowMeasurement::Attributes::MinMeasuredValue::Id, onReportCallback, - BasicAttributeFilter); -} + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); -CHIP_ERROR FlowMeasurementCluster::SubscribeAttributeMaxMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = FlowMeasurement::Attributes::MaxMeasuredValue::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); -CHIP_ERROR FlowMeasurementCluster::ReportAttributeMaxMeasuredValue(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(FlowMeasurement::Attributes::MaxMeasuredValue::Id, onReportCallback, - BasicAttributeFilter); -} + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // groupId: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), groupId)); -CHIP_ERROR FlowMeasurementCluster::SubscribeAttributeTolerance(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = FlowMeasurement::Attributes::Tolerance::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = sender->FinishCommand()); -CHIP_ERROR FlowMeasurementCluster::ReportAttributeTolerance(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(FlowMeasurement::Attributes::Tolerance::Id, onReportCallback, - BasicAttributeFilter); -} + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); -CHIP_ERROR FlowMeasurementCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = mDevice->SendCommands(sender.get())); -CHIP_ERROR FlowMeasurementCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; } -// GeneralCommissioning Cluster Commands -CHIP_ERROR GeneralCommissioningCluster::ArmFailSafe(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t expiryLengthSeconds, - uint64_t breadcrumb, uint32_t timeoutMs) +// Identify Cluster Commands +CHIP_ERROR IdentifyCluster::Identify(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t identifyTime) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -5252,7 +3209,7 @@ CHIP_ERROR GeneralCommissioningCluster::ArmFailSafe(Callback::Cancelable * onSuc VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, GeneralCommissioning::Commands::ArmFailSafe::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, Identify::Commands::Identify::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -5263,12 +3220,8 @@ CHIP_ERROR GeneralCommissioningCluster::ArmFailSafe(Callback::Cancelable * onSuc SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // expiryLengthSeconds: int16u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), expiryLengthSeconds)); - // breadcrumb: int64u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), breadcrumb)); - // timeoutMs: int32u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), timeoutMs)); + // identifyTime: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), identifyTime)); SuccessOrExit(err = sender->FinishCommand()); @@ -5284,8 +3237,7 @@ CHIP_ERROR GeneralCommissioningCluster::ArmFailSafe(Callback::Cancelable * onSuc return err; } -CHIP_ERROR GeneralCommissioningCluster::CommissioningComplete(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) +CHIP_ERROR IdentifyCluster::IdentifyQuery(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -5297,8 +3249,7 @@ CHIP_ERROR GeneralCommissioningCluster::CommissioningComplete(Callback::Cancelab VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, - GeneralCommissioning::Commands::CommissioningComplete::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, Identify::Commands::IdentifyQuery::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -5324,9 +3275,8 @@ CHIP_ERROR GeneralCommissioningCluster::CommissioningComplete(Callback::Cancelab return err; } -CHIP_ERROR GeneralCommissioningCluster::SetRegulatoryConfig(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t location, - chip::CharSpan countryCode, uint64_t breadcrumb, uint32_t timeoutMs) +CHIP_ERROR IdentifyCluster::TriggerEffect(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t effectIdentifier, uint8_t effectVariant) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -5338,8 +3288,7 @@ CHIP_ERROR GeneralCommissioningCluster::SetRegulatoryConfig(Callback::Cancelable VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, - GeneralCommissioning::Commands::SetRegulatoryConfig::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, Identify::Commands::TriggerEffect::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -5350,14 +3299,10 @@ CHIP_ERROR GeneralCommissioningCluster::SetRegulatoryConfig(Callback::Cancelable SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // location: regulatoryLocationType - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), location)); - // countryCode: charString - SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), countryCode)); - // breadcrumb: int64u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), breadcrumb)); - // timeoutMs: int32u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), timeoutMs)); + // effectIdentifier: identifyEffectIdentifier + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), effectIdentifier)); + // effectVariant: identifyEffectVariant + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), effectVariant)); SuccessOrExit(err = sender->FinishCommand()); @@ -5373,150 +3318,53 @@ CHIP_ERROR GeneralCommissioningCluster::SetRegulatoryConfig(Callback::Cancelable return err; } -// GeneralCommissioning Cluster Attributes -CHIP_ERROR GeneralCommissioningCluster::SubscribeAttributeBreadcrumb(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = GeneralCommissioning::Attributes::Breadcrumb::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR GeneralCommissioningCluster::ReportAttributeBreadcrumb(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(GeneralCommissioning::Attributes::Breadcrumb::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR GeneralCommissioningCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR GeneralCommissioningCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} +// IlluminanceMeasurement Cluster Commands -// GeneralDiagnostics Cluster Commands -// GeneralDiagnostics Cluster Attributes -CHIP_ERROR GeneralDiagnosticsCluster::SubscribeAttributeRebootCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) +// KeypadInput Cluster Commands +CHIP_ERROR KeypadInputCluster::SendKey(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t keyCode) { - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = GeneralDiagnostics::Attributes::RebootCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; -CHIP_ERROR GeneralDiagnosticsCluster::ReportAttributeRebootCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(GeneralDiagnostics::Attributes::RebootCount::Id, onReportCallback, - BasicAttributeFilter); -} + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; -CHIP_ERROR GeneralDiagnosticsCluster::SubscribeAttributeUpTime(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = GeneralDiagnostics::Attributes::UpTime::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); -CHIP_ERROR GeneralDiagnosticsCluster::ReportAttributeUpTime(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(GeneralDiagnostics::Attributes::UpTime::Id, onReportCallback, - BasicAttributeFilter); -} + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, KeypadInput::Commands::SendKey::Id, + (app::CommandPathFlags::kEndpointIdValid) }; -CHIP_ERROR GeneralDiagnosticsCluster::SubscribeAttributeTotalOperationalHours(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = GeneralDiagnostics::Attributes::TotalOperationalHours::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); -CHIP_ERROR GeneralDiagnosticsCluster::ReportAttributeTotalOperationalHours(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(GeneralDiagnostics::Attributes::TotalOperationalHours::Id, onReportCallback, - BasicAttributeFilter); -} + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); -CHIP_ERROR GeneralDiagnosticsCluster::SubscribeAttributeBootReasons(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = GeneralDiagnostics::Attributes::BootReasons::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); -CHIP_ERROR GeneralDiagnosticsCluster::ReportAttributeBootReasons(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(GeneralDiagnostics::Attributes::BootReasons::Id, onReportCallback, - BasicAttributeFilter); -} + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // keyCode: keypadInputCecKeyCode + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), keyCode)); -CHIP_ERROR GeneralDiagnosticsCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = sender->FinishCommand()); -CHIP_ERROR GeneralDiagnosticsCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); -// GroupKeyManagement Cluster Commands -// GroupKeyManagement Cluster Attributes -CHIP_ERROR GroupKeyManagementCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = mDevice->SendCommands(sender.get())); -CHIP_ERROR GroupKeyManagementCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; } -// Groups Cluster Commands -CHIP_ERROR GroupsCluster::AddGroup(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t groupId, chip::CharSpan groupName) +// LevelControl Cluster Commands +CHIP_ERROR LevelControlCluster::Move(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t moveMode, uint8_t rate, uint8_t optionMask, uint8_t optionOverride) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -5528,7 +3376,7 @@ CHIP_ERROR GroupsCluster::AddGroup(Callback::Cancelable * onSuccessCallback, Cal VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, Groups::Commands::AddGroup::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, LevelControl::Commands::Move::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -5539,10 +3387,14 @@ CHIP_ERROR GroupsCluster::AddGroup(Callback::Cancelable * onSuccessCallback, Cal SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // groupId: int16u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), groupId)); - // groupName: charString - SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), groupName)); + // moveMode: moveMode + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), moveMode)); + // rate: int8u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), rate)); + // optionMask: bitmap8 + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), optionMask)); + // optionOverride: bitmap8 + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), optionOverride)); SuccessOrExit(err = sender->FinishCommand()); @@ -5558,8 +3410,8 @@ CHIP_ERROR GroupsCluster::AddGroup(Callback::Cancelable * onSuccessCallback, Cal return err; } -CHIP_ERROR GroupsCluster::AddGroupIfIdentifying(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t groupId, chip::CharSpan groupName) +CHIP_ERROR LevelControlCluster::MoveToLevel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t level, uint16_t transitionTime, uint8_t optionMask, uint8_t optionOverride) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -5571,7 +3423,7 @@ CHIP_ERROR GroupsCluster::AddGroupIfIdentifying(Callback::Cancelable * onSuccess VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, Groups::Commands::AddGroupIfIdentifying::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, LevelControl::Commands::MoveToLevel::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -5582,10 +3434,14 @@ CHIP_ERROR GroupsCluster::AddGroupIfIdentifying(Callback::Cancelable * onSuccess SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // groupId: int16u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), groupId)); - // groupName: charString - SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), groupName)); + // level: int8u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), level)); + // transitionTime: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), transitionTime)); + // optionMask: bitmap8 + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), optionMask)); + // optionOverride: bitmap8 + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), optionOverride)); SuccessOrExit(err = sender->FinishCommand()); @@ -5601,8 +3457,9 @@ CHIP_ERROR GroupsCluster::AddGroupIfIdentifying(Callback::Cancelable * onSuccess return err; } -CHIP_ERROR GroupsCluster::GetGroupMembership(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t groupList) +CHIP_ERROR LevelControlCluster::MoveToLevelWithOnOff(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t level, + uint16_t transitionTime) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -5614,7 +3471,7 @@ CHIP_ERROR GroupsCluster::GetGroupMembership(Callback::Cancelable * onSuccessCal VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, Groups::Commands::GetGroupMembership::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, LevelControl::Commands::MoveToLevelWithOnOff::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -5625,8 +3482,10 @@ CHIP_ERROR GroupsCluster::GetGroupMembership(Callback::Cancelable * onSuccessCal SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // groupList: int16u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), groupList)); + // level: int8u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), level)); + // transitionTime: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), transitionTime)); SuccessOrExit(err = sender->FinishCommand()); @@ -5642,7 +3501,8 @@ CHIP_ERROR GroupsCluster::GetGroupMembership(Callback::Cancelable * onSuccessCal return err; } -CHIP_ERROR GroupsCluster::RemoveAllGroups(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) +CHIP_ERROR LevelControlCluster::MoveWithOnOff(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t moveMode, uint8_t rate) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -5654,7 +3514,7 @@ CHIP_ERROR GroupsCluster::RemoveAllGroups(Callback::Cancelable * onSuccessCallba VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, Groups::Commands::RemoveAllGroups::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, LevelControl::Commands::MoveWithOnOff::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -5664,7 +3524,11 @@ CHIP_ERROR GroupsCluster::RemoveAllGroups(Callback::Cancelable * onSuccessCallba SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - // Command takes no arguments. + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // moveMode: moveMode + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), moveMode)); + // rate: int8u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), rate)); SuccessOrExit(err = sender->FinishCommand()); @@ -5680,8 +3544,9 @@ CHIP_ERROR GroupsCluster::RemoveAllGroups(Callback::Cancelable * onSuccessCallba return err; } -CHIP_ERROR GroupsCluster::RemoveGroup(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t groupId) +CHIP_ERROR LevelControlCluster::Step(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t stepMode, uint8_t stepSize, uint16_t transitionTime, uint8_t optionMask, + uint8_t optionOverride) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -5693,7 +3558,7 @@ CHIP_ERROR GroupsCluster::RemoveGroup(Callback::Cancelable * onSuccessCallback, VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, Groups::Commands::RemoveGroup::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, LevelControl::Commands::Step::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -5704,8 +3569,16 @@ CHIP_ERROR GroupsCluster::RemoveGroup(Callback::Cancelable * onSuccessCallback, SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // groupId: int16u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), groupId)); + // stepMode: stepMode + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), stepMode)); + // stepSize: int8u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), stepSize)); + // transitionTime: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), transitionTime)); + // optionMask: bitmap8 + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), optionMask)); + // optionOverride: bitmap8 + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), optionOverride)); SuccessOrExit(err = sender->FinishCommand()); @@ -5721,8 +3594,8 @@ CHIP_ERROR GroupsCluster::RemoveGroup(Callback::Cancelable * onSuccessCallback, return err; } -CHIP_ERROR GroupsCluster::ViewGroup(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t groupId) +CHIP_ERROR LevelControlCluster::StepWithOnOff(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t stepMode, uint8_t stepSize, uint16_t transitionTime) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -5734,7 +3607,7 @@ CHIP_ERROR GroupsCluster::ViewGroup(Callback::Cancelable * onSuccessCallback, Ca VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, Groups::Commands::ViewGroup::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, LevelControl::Commands::StepWithOnOff::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -5745,8 +3618,12 @@ CHIP_ERROR GroupsCluster::ViewGroup(Callback::Cancelable * onSuccessCallback, Ca SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // groupId: int16u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), groupId)); + // stepMode: stepMode + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), stepMode)); + // stepSize: int8u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), stepSize)); + // transitionTime: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), transitionTime)); SuccessOrExit(err = sender->FinishCommand()); @@ -5762,44 +3639,8 @@ CHIP_ERROR GroupsCluster::ViewGroup(Callback::Cancelable * onSuccessCallback, Ca return err; } -// Groups Cluster Attributes -CHIP_ERROR GroupsCluster::SubscribeAttributeNameSupport(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Groups::Attributes::NameSupport::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR GroupsCluster::ReportAttributeNameSupport(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Groups::Attributes::NameSupport::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR GroupsCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR GroupsCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} - -// Identify Cluster Commands -CHIP_ERROR IdentifyCluster::Identify(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t identifyTime) +CHIP_ERROR LevelControlCluster::Stop(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t optionMask, uint8_t optionOverride) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -5811,7 +3652,7 @@ CHIP_ERROR IdentifyCluster::Identify(Callback::Cancelable * onSuccessCallback, C VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, Identify::Commands::Identify::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, LevelControl::Commands::Stop::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -5822,8 +3663,10 @@ CHIP_ERROR IdentifyCluster::Identify(Callback::Cancelable * onSuccessCallback, C SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // identifyTime: int16u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), identifyTime)); + // optionMask: bitmap8 + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), optionMask)); + // optionOverride: bitmap8 + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), optionOverride)); SuccessOrExit(err = sender->FinishCommand()); @@ -5839,7 +3682,7 @@ CHIP_ERROR IdentifyCluster::Identify(Callback::Cancelable * onSuccessCallback, C return err; } -CHIP_ERROR IdentifyCluster::IdentifyQuery(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) +CHIP_ERROR LevelControlCluster::StopWithOnOff(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -5851,7 +3694,7 @@ CHIP_ERROR IdentifyCluster::IdentifyQuery(Callback::Cancelable * onSuccessCallba VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, Identify::Commands::IdentifyQuery::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, LevelControl::Commands::StopWithOnOff::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -5877,8 +3720,8 @@ CHIP_ERROR IdentifyCluster::IdentifyQuery(Callback::Cancelable * onSuccessCallba return err; } -CHIP_ERROR IdentifyCluster::TriggerEffect(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint8_t effectIdentifier, uint8_t effectVariant) +// LowPower Cluster Commands +CHIP_ERROR LowPowerCluster::Sleep(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -5890,7 +3733,7 @@ CHIP_ERROR IdentifyCluster::TriggerEffect(Callback::Cancelable * onSuccessCallba VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, Identify::Commands::TriggerEffect::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, LowPower::Commands::Sleep::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -5900,11 +3743,7 @@ CHIP_ERROR IdentifyCluster::TriggerEffect(Callback::Cancelable * onSuccessCallba SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // effectIdentifier: identifyEffectIdentifier - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), effectIdentifier)); - // effectVariant: identifyEffectVariant - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), effectVariant)); + // Command takes no arguments. SuccessOrExit(err = sender->FinishCommand()); @@ -5920,169 +3759,51 @@ CHIP_ERROR IdentifyCluster::TriggerEffect(Callback::Cancelable * onSuccessCallba return err; } -// Identify Cluster Attributes -CHIP_ERROR IdentifyCluster::SubscribeAttributeIdentifyTime(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) +// MediaInput Cluster Commands +CHIP_ERROR MediaInputCluster::HideInputStatus(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Identify::Attributes::IdentifyTime::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; -CHIP_ERROR IdentifyCluster::ReportAttributeIdentifyTime(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Identify::Attributes::IdentifyTime::Id, onReportCallback, - BasicAttributeFilter); -} + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; -CHIP_ERROR IdentifyCluster::SubscribeAttributeIdentifyType(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Identify::Attributes::IdentifyType::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); -CHIP_ERROR IdentifyCluster::ReportAttributeIdentifyType(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Identify::Attributes::IdentifyType::Id, onReportCallback, - BasicAttributeFilter); -} + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, MediaInput::Commands::HideInputStatus::Id, + (app::CommandPathFlags::kEndpointIdValid) }; -CHIP_ERROR IdentifyCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); -CHIP_ERROR IdentifyCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); -// IlluminanceMeasurement Cluster Commands -// IlluminanceMeasurement Cluster Attributes -CHIP_ERROR IlluminanceMeasurementCluster::SubscribeAttributeMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = IlluminanceMeasurement::Attributes::MeasuredValue::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); -CHIP_ERROR IlluminanceMeasurementCluster::ReportAttributeMeasuredValue(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(IlluminanceMeasurement::Attributes::MeasuredValue::Id, onReportCallback, - BasicAttributeFilter); -} + // Command takes no arguments. -CHIP_ERROR IlluminanceMeasurementCluster::SubscribeAttributeMinMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = IlluminanceMeasurement::Attributes::MinMeasuredValue::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = sender->FinishCommand()); -CHIP_ERROR IlluminanceMeasurementCluster::ReportAttributeMinMeasuredValue(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(IlluminanceMeasurement::Attributes::MinMeasuredValue::Id, onReportCallback, - BasicAttributeFilter); -} + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); -CHIP_ERROR IlluminanceMeasurementCluster::SubscribeAttributeMaxMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = IlluminanceMeasurement::Attributes::MaxMeasuredValue::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = mDevice->SendCommands(sender.get())); -CHIP_ERROR IlluminanceMeasurementCluster::ReportAttributeMaxMeasuredValue(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(IlluminanceMeasurement::Attributes::MaxMeasuredValue::Id, onReportCallback, - BasicAttributeFilter); + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; } -CHIP_ERROR IlluminanceMeasurementCluster::SubscribeAttributeTolerance(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) +CHIP_ERROR MediaInputCluster::RenameInput(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t index, chip::CharSpan name) { - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = IlluminanceMeasurement::Attributes::Tolerance::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR IlluminanceMeasurementCluster::ReportAttributeTolerance(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(IlluminanceMeasurement::Attributes::Tolerance::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR IlluminanceMeasurementCluster::SubscribeAttributeLightSensorType(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = IlluminanceMeasurement::Attributes::LightSensorType::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR IlluminanceMeasurementCluster::ReportAttributeLightSensorType(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(IlluminanceMeasurement::Attributes::LightSensorType::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR IlluminanceMeasurementCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR IlluminanceMeasurementCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} - -// KeypadInput Cluster Commands -CHIP_ERROR KeypadInputCluster::SendKey(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint8_t keyCode) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - TLV::TLVWriter * writer = nullptr; - uint8_t argSeqNumber = 0; + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; // Used when encoding non-empty command. Suppress error message when encoding empty commands. (void) writer; @@ -6090,7 +3811,7 @@ CHIP_ERROR KeypadInputCluster::SendKey(Callback::Cancelable * onSuccessCallback, VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, KeypadInput::Commands::SendKey::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, MediaInput::Commands::RenameInput::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -6101,8 +3822,10 @@ CHIP_ERROR KeypadInputCluster::SendKey(Callback::Cancelable * onSuccessCallback, SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // keyCode: keypadInputCecKeyCode - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), keyCode)); + // index: int8u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), index)); + // name: charString + SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), name)); SuccessOrExit(err = sender->FinishCommand()); @@ -6118,27 +3841,8 @@ CHIP_ERROR KeypadInputCluster::SendKey(Callback::Cancelable * onSuccessCallback, return err; } -// KeypadInput Cluster Attributes -CHIP_ERROR KeypadInputCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR KeypadInputCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} - -// LevelControl Cluster Commands -CHIP_ERROR LevelControlCluster::Move(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint8_t moveMode, uint8_t rate, uint8_t optionMask, uint8_t optionOverride) +CHIP_ERROR MediaInputCluster::SelectInput(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t index) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -6150,7 +3854,7 @@ CHIP_ERROR LevelControlCluster::Move(Callback::Cancelable * onSuccessCallback, C VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, LevelControl::Commands::Move::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, MediaInput::Commands::SelectInput::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -6161,14 +3865,8 @@ CHIP_ERROR LevelControlCluster::Move(Callback::Cancelable * onSuccessCallback, C SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // moveMode: moveMode - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), moveMode)); - // rate: int8u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), rate)); - // optionMask: bitmap8 - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), optionMask)); - // optionOverride: bitmap8 - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), optionOverride)); + // index: int8u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), index)); SuccessOrExit(err = sender->FinishCommand()); @@ -6184,8 +3882,7 @@ CHIP_ERROR LevelControlCluster::Move(Callback::Cancelable * onSuccessCallback, C return err; } -CHIP_ERROR LevelControlCluster::MoveToLevel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint8_t level, uint16_t transitionTime, uint8_t optionMask, uint8_t optionOverride) +CHIP_ERROR MediaInputCluster::ShowInputStatus(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -6197,7 +3894,7 @@ CHIP_ERROR LevelControlCluster::MoveToLevel(Callback::Cancelable * onSuccessCall VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, LevelControl::Commands::MoveToLevel::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, MediaInput::Commands::ShowInputStatus::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -6207,15 +3904,7 @@ CHIP_ERROR LevelControlCluster::MoveToLevel(Callback::Cancelable * onSuccessCall SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // level: int8u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), level)); - // transitionTime: int16u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), transitionTime)); - // optionMask: bitmap8 - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), optionMask)); - // optionOverride: bitmap8 - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), optionOverride)); + // Command takes no arguments. SuccessOrExit(err = sender->FinishCommand()); @@ -6231,9 +3920,9 @@ CHIP_ERROR LevelControlCluster::MoveToLevel(Callback::Cancelable * onSuccessCall return err; } -CHIP_ERROR LevelControlCluster::MoveToLevelWithOnOff(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t level, - uint16_t transitionTime) +// MediaPlayback Cluster Commands +CHIP_ERROR MediaPlaybackCluster::MediaFastForward(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -6245,7 +3934,7 @@ CHIP_ERROR LevelControlCluster::MoveToLevelWithOnOff(Callback::Cancelable * onSu VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, LevelControl::Commands::MoveToLevelWithOnOff::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, MediaPlayback::Commands::MediaFastForward::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -6255,11 +3944,7 @@ CHIP_ERROR LevelControlCluster::MoveToLevelWithOnOff(Callback::Cancelable * onSu SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // level: int8u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), level)); - // transitionTime: int16u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), transitionTime)); + // Command takes no arguments. SuccessOrExit(err = sender->FinishCommand()); @@ -6275,8 +3960,7 @@ CHIP_ERROR LevelControlCluster::MoveToLevelWithOnOff(Callback::Cancelable * onSu return err; } -CHIP_ERROR LevelControlCluster::MoveWithOnOff(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint8_t moveMode, uint8_t rate) +CHIP_ERROR MediaPlaybackCluster::MediaNext(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -6288,7 +3972,7 @@ CHIP_ERROR LevelControlCluster::MoveWithOnOff(Callback::Cancelable * onSuccessCa VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, LevelControl::Commands::MoveWithOnOff::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, MediaPlayback::Commands::MediaNext::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -6298,11 +3982,7 @@ CHIP_ERROR LevelControlCluster::MoveWithOnOff(Callback::Cancelable * onSuccessCa SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // moveMode: moveMode - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), moveMode)); - // rate: int8u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), rate)); + // Command takes no arguments. SuccessOrExit(err = sender->FinishCommand()); @@ -6318,9 +3998,7 @@ CHIP_ERROR LevelControlCluster::MoveWithOnOff(Callback::Cancelable * onSuccessCa return err; } -CHIP_ERROR LevelControlCluster::Step(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint8_t stepMode, uint8_t stepSize, uint16_t transitionTime, uint8_t optionMask, - uint8_t optionOverride) +CHIP_ERROR MediaPlaybackCluster::MediaPause(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -6332,7 +4010,7 @@ CHIP_ERROR LevelControlCluster::Step(Callback::Cancelable * onSuccessCallback, C VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, LevelControl::Commands::Step::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, MediaPlayback::Commands::MediaPause::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -6342,17 +4020,7 @@ CHIP_ERROR LevelControlCluster::Step(Callback::Cancelable * onSuccessCallback, C SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // stepMode: stepMode - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), stepMode)); - // stepSize: int8u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), stepSize)); - // transitionTime: int16u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), transitionTime)); - // optionMask: bitmap8 - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), optionMask)); - // optionOverride: bitmap8 - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), optionOverride)); + // Command takes no arguments. SuccessOrExit(err = sender->FinishCommand()); @@ -6368,8 +4036,7 @@ CHIP_ERROR LevelControlCluster::Step(Callback::Cancelable * onSuccessCallback, C return err; } -CHIP_ERROR LevelControlCluster::StepWithOnOff(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint8_t stepMode, uint8_t stepSize, uint16_t transitionTime) +CHIP_ERROR MediaPlaybackCluster::MediaPlay(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -6381,7 +4048,7 @@ CHIP_ERROR LevelControlCluster::StepWithOnOff(Callback::Cancelable * onSuccessCa VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, LevelControl::Commands::StepWithOnOff::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, MediaPlayback::Commands::MediaPlay::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -6391,13 +4058,7 @@ CHIP_ERROR LevelControlCluster::StepWithOnOff(Callback::Cancelable * onSuccessCa SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // stepMode: stepMode - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), stepMode)); - // stepSize: int8u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), stepSize)); - // transitionTime: int16u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), transitionTime)); + // Command takes no arguments. SuccessOrExit(err = sender->FinishCommand()); @@ -6413,8 +4074,7 @@ CHIP_ERROR LevelControlCluster::StepWithOnOff(Callback::Cancelable * onSuccessCa return err; } -CHIP_ERROR LevelControlCluster::Stop(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint8_t optionMask, uint8_t optionOverride) +CHIP_ERROR MediaPlaybackCluster::MediaPrevious(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -6426,7 +4086,7 @@ CHIP_ERROR LevelControlCluster::Stop(Callback::Cancelable * onSuccessCallback, C VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, LevelControl::Commands::Stop::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, MediaPlayback::Commands::MediaPrevious::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -6436,11 +4096,7 @@ CHIP_ERROR LevelControlCluster::Stop(Callback::Cancelable * onSuccessCallback, C SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // optionMask: bitmap8 - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), optionMask)); - // optionOverride: bitmap8 - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), optionOverride)); + // Command takes no arguments. SuccessOrExit(err = sender->FinishCommand()); @@ -6456,7 +4112,7 @@ CHIP_ERROR LevelControlCluster::Stop(Callback::Cancelable * onSuccessCallback, C return err; } -CHIP_ERROR LevelControlCluster::StopWithOnOff(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) +CHIP_ERROR MediaPlaybackCluster::MediaRewind(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -6468,7 +4124,7 @@ CHIP_ERROR LevelControlCluster::StopWithOnOff(Callback::Cancelable * onSuccessCa VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, LevelControl::Commands::StopWithOnOff::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, MediaPlayback::Commands::MediaRewind::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -6494,264 +4150,8 @@ CHIP_ERROR LevelControlCluster::StopWithOnOff(Callback::Cancelable * onSuccessCa return err; } -// LevelControl Cluster Attributes -CHIP_ERROR LevelControlCluster::SubscribeAttributeCurrentLevel(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = LevelControl::Attributes::CurrentLevel::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR LevelControlCluster::ReportAttributeCurrentLevel(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(LevelControl::Attributes::CurrentLevel::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR LevelControlCluster::SubscribeAttributeRemainingTime(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = LevelControl::Attributes::RemainingTime::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR LevelControlCluster::ReportAttributeRemainingTime(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(LevelControl::Attributes::RemainingTime::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR LevelControlCluster::SubscribeAttributeMinLevel(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = LevelControl::Attributes::MinLevel::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR LevelControlCluster::ReportAttributeMinLevel(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(LevelControl::Attributes::MinLevel::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR LevelControlCluster::SubscribeAttributeMaxLevel(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = LevelControl::Attributes::MaxLevel::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR LevelControlCluster::ReportAttributeMaxLevel(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(LevelControl::Attributes::MaxLevel::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR LevelControlCluster::SubscribeAttributeCurrentFrequency(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = LevelControl::Attributes::CurrentFrequency::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR LevelControlCluster::ReportAttributeCurrentFrequency(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(LevelControl::Attributes::CurrentFrequency::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR LevelControlCluster::SubscribeAttributeMinFrequency(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = LevelControl::Attributes::MinFrequency::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR LevelControlCluster::ReportAttributeMinFrequency(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(LevelControl::Attributes::MinFrequency::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR LevelControlCluster::SubscribeAttributeMaxFrequency(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = LevelControl::Attributes::MaxFrequency::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR LevelControlCluster::ReportAttributeMaxFrequency(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(LevelControl::Attributes::MaxFrequency::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR LevelControlCluster::SubscribeAttributeOptions(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = LevelControl::Attributes::Options::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR LevelControlCluster::ReportAttributeOptions(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(LevelControl::Attributes::Options::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR LevelControlCluster::SubscribeAttributeOnOffTransitionTime(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = LevelControl::Attributes::OnOffTransitionTime::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR LevelControlCluster::ReportAttributeOnOffTransitionTime(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(LevelControl::Attributes::OnOffTransitionTime::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR LevelControlCluster::SubscribeAttributeOnLevel(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = LevelControl::Attributes::OnLevel::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR LevelControlCluster::ReportAttributeOnLevel(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(LevelControl::Attributes::OnLevel::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR LevelControlCluster::SubscribeAttributeOnTransitionTime(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = LevelControl::Attributes::OnTransitionTime::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR LevelControlCluster::ReportAttributeOnTransitionTime(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(LevelControl::Attributes::OnTransitionTime::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR LevelControlCluster::SubscribeAttributeOffTransitionTime(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = LevelControl::Attributes::OffTransitionTime::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR LevelControlCluster::ReportAttributeOffTransitionTime(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(LevelControl::Attributes::OffTransitionTime::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR LevelControlCluster::SubscribeAttributeDefaultMoveRate(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = LevelControl::Attributes::DefaultMoveRate::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR LevelControlCluster::ReportAttributeDefaultMoveRate(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(LevelControl::Attributes::DefaultMoveRate::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR LevelControlCluster::SubscribeAttributeStartUpCurrentLevel(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = LevelControl::Attributes::StartUpCurrentLevel::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR LevelControlCluster::ReportAttributeStartUpCurrentLevel(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(LevelControl::Attributes::StartUpCurrentLevel::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR LevelControlCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR LevelControlCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} - -// LowPower Cluster Commands -CHIP_ERROR LowPowerCluster::Sleep(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) +CHIP_ERROR MediaPlaybackCluster::MediaSeek(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint64_t position) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -6763,7 +4163,7 @@ CHIP_ERROR LowPowerCluster::Sleep(Callback::Cancelable * onSuccessCallback, Call VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, LowPower::Commands::Sleep::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, MediaPlayback::Commands::MediaSeek::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -6773,7 +4173,9 @@ CHIP_ERROR LowPowerCluster::Sleep(Callback::Cancelable * onSuccessCallback, Call SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - // Command takes no arguments. + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // position: int64u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), position)); SuccessOrExit(err = sender->FinishCommand()); @@ -6789,26 +4191,8 @@ CHIP_ERROR LowPowerCluster::Sleep(Callback::Cancelable * onSuccessCallback, Call return err; } -// LowPower Cluster Attributes -CHIP_ERROR LowPowerCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR LowPowerCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} - -// MediaInput Cluster Commands -CHIP_ERROR MediaInputCluster::HideInputStatus(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) +CHIP_ERROR MediaPlaybackCluster::MediaSkipBackward(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint64_t deltaPositionMilliseconds) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -6820,7 +4204,7 @@ CHIP_ERROR MediaInputCluster::HideInputStatus(Callback::Cancelable * onSuccessCa VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, MediaInput::Commands::HideInputStatus::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, MediaPlayback::Commands::MediaSkipBackward::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -6830,7 +4214,9 @@ CHIP_ERROR MediaInputCluster::HideInputStatus(Callback::Cancelable * onSuccessCa SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - // Command takes no arguments. + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // deltaPositionMilliseconds: int64u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), deltaPositionMilliseconds)); SuccessOrExit(err = sender->FinishCommand()); @@ -6846,8 +4232,8 @@ CHIP_ERROR MediaInputCluster::HideInputStatus(Callback::Cancelable * onSuccessCa return err; } -CHIP_ERROR MediaInputCluster::RenameInput(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint8_t index, chip::CharSpan name) +CHIP_ERROR MediaPlaybackCluster::MediaSkipForward(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint64_t deltaPositionMilliseconds) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -6859,7 +4245,7 @@ CHIP_ERROR MediaInputCluster::RenameInput(Callback::Cancelable * onSuccessCallba VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, MediaInput::Commands::RenameInput::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, MediaPlayback::Commands::MediaSkipForward::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -6870,10 +4256,8 @@ CHIP_ERROR MediaInputCluster::RenameInput(Callback::Cancelable * onSuccessCallba SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // index: int8u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), index)); - // name: charString - SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), name)); + // deltaPositionMilliseconds: int64u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), deltaPositionMilliseconds)); SuccessOrExit(err = sender->FinishCommand()); @@ -6889,8 +4273,7 @@ CHIP_ERROR MediaInputCluster::RenameInput(Callback::Cancelable * onSuccessCallba return err; } -CHIP_ERROR MediaInputCluster::SelectInput(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint8_t index) +CHIP_ERROR MediaPlaybackCluster::MediaStartOver(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -6902,7 +4285,7 @@ CHIP_ERROR MediaInputCluster::SelectInput(Callback::Cancelable * onSuccessCallba VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, MediaInput::Commands::SelectInput::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, MediaPlayback::Commands::MediaStartOver::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -6912,9 +4295,7 @@ CHIP_ERROR MediaInputCluster::SelectInput(Callback::Cancelable * onSuccessCallba SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // index: int8u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), index)); + // Command takes no arguments. SuccessOrExit(err = sender->FinishCommand()); @@ -6930,7 +4311,7 @@ CHIP_ERROR MediaInputCluster::SelectInput(Callback::Cancelable * onSuccessCallba return err; } -CHIP_ERROR MediaInputCluster::ShowInputStatus(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) +CHIP_ERROR MediaPlaybackCluster::MediaStop(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -6942,7 +4323,7 @@ CHIP_ERROR MediaInputCluster::ShowInputStatus(Callback::Cancelable * onSuccessCa VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, MediaInput::Commands::ShowInputStatus::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, MediaPlayback::Commands::MediaStop::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -6968,44 +4349,9 @@ CHIP_ERROR MediaInputCluster::ShowInputStatus(Callback::Cancelable * onSuccessCa return err; } -// MediaInput Cluster Attributes -CHIP_ERROR MediaInputCluster::SubscribeAttributeCurrentMediaInput(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = MediaInput::Attributes::CurrentMediaInput::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR MediaInputCluster::ReportAttributeCurrentMediaInput(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(MediaInput::Attributes::CurrentMediaInput::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR MediaInputCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR MediaInputCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} - -// MediaPlayback Cluster Commands -CHIP_ERROR MediaPlaybackCluster::MediaFastForward(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) +// ModeSelect Cluster Commands +CHIP_ERROR ModeSelectCluster::ChangeToMode(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t newMode) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -7017,7 +4363,7 @@ CHIP_ERROR MediaPlaybackCluster::MediaFastForward(Callback::Cancelable * onSucce VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, MediaPlayback::Commands::MediaFastForward::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, ModeSelect::Commands::ChangeToMode::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -7027,7 +4373,9 @@ CHIP_ERROR MediaPlaybackCluster::MediaFastForward(Callback::Cancelable * onSucce SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - // Command takes no arguments. + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // newMode: int8u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), newMode)); SuccessOrExit(err = sender->FinishCommand()); @@ -7043,7 +4391,10 @@ CHIP_ERROR MediaPlaybackCluster::MediaFastForward(Callback::Cancelable * onSucce return err; } -CHIP_ERROR MediaPlaybackCluster::MediaNext(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) +// NetworkCommissioning Cluster Commands +CHIP_ERROR NetworkCommissioningCluster::AddOrUpdateThreadNetwork(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + chip::ByteSpan operationalDataset, uint64_t breadcrumb) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -7055,7 +4406,8 @@ CHIP_ERROR MediaPlaybackCluster::MediaNext(Callback::Cancelable * onSuccessCallb VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, MediaPlayback::Commands::MediaNext::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, + NetworkCommissioning::Commands::AddOrUpdateThreadNetwork::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -7065,7 +4417,11 @@ CHIP_ERROR MediaPlaybackCluster::MediaNext(Callback::Cancelable * onSuccessCallb SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - // Command takes no arguments. + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // operationalDataset: octetString + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), operationalDataset)); + // breadcrumb: int64u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), breadcrumb)); SuccessOrExit(err = sender->FinishCommand()); @@ -7081,7 +4437,9 @@ CHIP_ERROR MediaPlaybackCluster::MediaNext(Callback::Cancelable * onSuccessCallb return err; } -CHIP_ERROR MediaPlaybackCluster::MediaPause(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) +CHIP_ERROR NetworkCommissioningCluster::AddOrUpdateWiFiNetwork(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, chip::ByteSpan ssid, + chip::ByteSpan credentials, uint64_t breadcrumb) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -7093,7 +4451,8 @@ CHIP_ERROR MediaPlaybackCluster::MediaPause(Callback::Cancelable * onSuccessCall VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, MediaPlayback::Commands::MediaPause::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, + NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -7103,7 +4462,13 @@ CHIP_ERROR MediaPlaybackCluster::MediaPause(Callback::Cancelable * onSuccessCall SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - // Command takes no arguments. + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // ssid: octetString + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), ssid)); + // credentials: octetString + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), credentials)); + // breadcrumb: int64u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), breadcrumb)); SuccessOrExit(err = sender->FinishCommand()); @@ -7119,7 +4484,9 @@ CHIP_ERROR MediaPlaybackCluster::MediaPause(Callback::Cancelable * onSuccessCall return err; } -CHIP_ERROR MediaPlaybackCluster::MediaPlay(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) +CHIP_ERROR NetworkCommissioningCluster::ConnectNetwork(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, chip::ByteSpan networkID, + uint64_t breadcrumb) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -7131,7 +4498,8 @@ CHIP_ERROR MediaPlaybackCluster::MediaPlay(Callback::Cancelable * onSuccessCallb VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, MediaPlayback::Commands::MediaPlay::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, + NetworkCommissioning::Commands::ConnectNetwork::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -7141,7 +4509,11 @@ CHIP_ERROR MediaPlaybackCluster::MediaPlay(Callback::Cancelable * onSuccessCallb SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - // Command takes no arguments. + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // networkID: octetString + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), networkID)); + // breadcrumb: int64u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), breadcrumb)); SuccessOrExit(err = sender->FinishCommand()); @@ -7157,7 +4529,9 @@ CHIP_ERROR MediaPlaybackCluster::MediaPlay(Callback::Cancelable * onSuccessCallb return err; } -CHIP_ERROR MediaPlaybackCluster::MediaPrevious(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) +CHIP_ERROR NetworkCommissioningCluster::RemoveNetwork(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, chip::ByteSpan networkID, + uint64_t breadcrumb) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -7169,7 +4543,7 @@ CHIP_ERROR MediaPlaybackCluster::MediaPrevious(Callback::Cancelable * onSuccessC VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, MediaPlayback::Commands::MediaPrevious::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, NetworkCommissioning::Commands::RemoveNetwork::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -7179,7 +4553,11 @@ CHIP_ERROR MediaPlaybackCluster::MediaPrevious(Callback::Cancelable * onSuccessC SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - // Command takes no arguments. + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // networkID: octetString + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), networkID)); + // breadcrumb: int64u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), breadcrumb)); SuccessOrExit(err = sender->FinishCommand()); @@ -7195,7 +4573,9 @@ CHIP_ERROR MediaPlaybackCluster::MediaPrevious(Callback::Cancelable * onSuccessC return err; } -CHIP_ERROR MediaPlaybackCluster::MediaRewind(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) +CHIP_ERROR NetworkCommissioningCluster::ReorderNetwork(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, chip::ByteSpan networkID, + uint8_t networkIndex, uint64_t breadcrumb) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -7207,7 +4587,8 @@ CHIP_ERROR MediaPlaybackCluster::MediaRewind(Callback::Cancelable * onSuccessCal VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, MediaPlayback::Commands::MediaRewind::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, + NetworkCommissioning::Commands::ReorderNetwork::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -7217,7 +4598,13 @@ CHIP_ERROR MediaPlaybackCluster::MediaRewind(Callback::Cancelable * onSuccessCal SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - // Command takes no arguments. + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // networkID: octetString + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), networkID)); + // networkIndex: int8u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), networkIndex)); + // breadcrumb: int64u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), breadcrumb)); SuccessOrExit(err = sender->FinishCommand()); @@ -7233,8 +4620,9 @@ CHIP_ERROR MediaPlaybackCluster::MediaRewind(Callback::Cancelable * onSuccessCal return err; } -CHIP_ERROR MediaPlaybackCluster::MediaSeek(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint64_t position) +CHIP_ERROR NetworkCommissioningCluster::ScanNetworks(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, chip::ByteSpan ssid, + uint64_t breadcrumb) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -7246,7 +4634,7 @@ CHIP_ERROR MediaPlaybackCluster::MediaSeek(Callback::Cancelable * onSuccessCallb VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, MediaPlayback::Commands::MediaSeek::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, NetworkCommissioning::Commands::ScanNetworks::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -7257,8 +4645,10 @@ CHIP_ERROR MediaPlaybackCluster::MediaSeek(Callback::Cancelable * onSuccessCallb SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // position: int64u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), position)); + // ssid: octetString + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), ssid)); + // breadcrumb: int64u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), breadcrumb)); SuccessOrExit(err = sender->FinishCommand()); @@ -7274,8 +4664,10 @@ CHIP_ERROR MediaPlaybackCluster::MediaSeek(Callback::Cancelable * onSuccessCallb return err; } -CHIP_ERROR MediaPlaybackCluster::MediaSkipBackward(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint64_t deltaPositionMilliseconds) +// OtaSoftwareUpdateProvider Cluster Commands +CHIP_ERROR OtaSoftwareUpdateProviderCluster::ApplyUpdateRequest(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + chip::ByteSpan updateToken, uint32_t newVersion) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -7287,7 +4679,8 @@ CHIP_ERROR MediaPlaybackCluster::MediaSkipBackward(Callback::Cancelable * onSucc VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, MediaPlayback::Commands::MediaSkipBackward::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, + OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -7298,8 +4691,10 @@ CHIP_ERROR MediaPlaybackCluster::MediaSkipBackward(Callback::Cancelable * onSucc SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // deltaPositionMilliseconds: int64u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), deltaPositionMilliseconds)); + // updateToken: octetString + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), updateToken)); + // newVersion: int32u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), newVersion)); SuccessOrExit(err = sender->FinishCommand()); @@ -7315,8 +4710,9 @@ CHIP_ERROR MediaPlaybackCluster::MediaSkipBackward(Callback::Cancelable * onSucc return err; } -CHIP_ERROR MediaPlaybackCluster::MediaSkipForward(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint64_t deltaPositionMilliseconds) +CHIP_ERROR OtaSoftwareUpdateProviderCluster::NotifyUpdateApplied(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + chip::ByteSpan updateToken, uint32_t softwareVersion) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -7328,7 +4724,8 @@ CHIP_ERROR MediaPlaybackCluster::MediaSkipForward(Callback::Cancelable * onSucce VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, MediaPlayback::Commands::MediaSkipForward::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, + OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -7339,8 +4736,10 @@ CHIP_ERROR MediaPlaybackCluster::MediaSkipForward(Callback::Cancelable * onSucce SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // deltaPositionMilliseconds: int64u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), deltaPositionMilliseconds)); + // updateToken: octetString + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), updateToken)); + // softwareVersion: int32u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), softwareVersion)); SuccessOrExit(err = sender->FinishCommand()); @@ -7356,7 +4755,11 @@ CHIP_ERROR MediaPlaybackCluster::MediaSkipForward(Callback::Cancelable * onSucce return err; } -CHIP_ERROR MediaPlaybackCluster::MediaStartOver(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) +CHIP_ERROR OtaSoftwareUpdateProviderCluster::QueryImage(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, chip::VendorId vendorId, + uint16_t productId, uint32_t softwareVersion, uint8_t protocolsSupported, + uint16_t hardwareVersion, chip::CharSpan location, bool requestorCanConsent, + chip::ByteSpan metadataForProvider) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -7368,7 +4771,8 @@ CHIP_ERROR MediaPlaybackCluster::MediaStartOver(Callback::Cancelable * onSuccess VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, MediaPlayback::Commands::MediaStartOver::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, + OtaSoftwareUpdateProvider::Commands::QueryImage::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -7378,7 +4782,23 @@ CHIP_ERROR MediaPlaybackCluster::MediaStartOver(Callback::Cancelable * onSuccess SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - // Command takes no arguments. + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // vendorId: vendorId + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), vendorId)); + // productId: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), productId)); + // softwareVersion: int32u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), softwareVersion)); + // protocolsSupported: OTADownloadProtocol + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), protocolsSupported)); + // hardwareVersion: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), hardwareVersion)); + // location: charString + SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), location)); + // requestorCanConsent: boolean + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), requestorCanConsent)); + // metadataForProvider: octetString + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), metadataForProvider)); SuccessOrExit(err = sender->FinishCommand()); @@ -7394,7 +4814,11 @@ CHIP_ERROR MediaPlaybackCluster::MediaStartOver(Callback::Cancelable * onSuccess return err; } -CHIP_ERROR MediaPlaybackCluster::MediaStop(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) +// OtaSoftwareUpdateRequestor Cluster Commands +CHIP_ERROR OtaSoftwareUpdateRequestorCluster::AnnounceOtaProvider(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + chip::NodeId providerLocation, chip::VendorId vendorId, + uint8_t announcementReason, chip::ByteSpan metadataForNode) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -7406,7 +4830,8 @@ CHIP_ERROR MediaPlaybackCluster::MediaStop(Callback::Cancelable * onSuccessCallb VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, MediaPlayback::Commands::MediaStop::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, + OtaSoftwareUpdateRequestor::Commands::AnnounceOtaProvider::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -7416,7 +4841,15 @@ CHIP_ERROR MediaPlaybackCluster::MediaStop(Callback::Cancelable * onSuccessCallb SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - // Command takes no arguments. + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // providerLocation: nodeId + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), providerLocation)); + // vendorId: vendorId + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), vendorId)); + // announcementReason: OTAAnnouncementReason + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), announcementReason)); + // metadataForNode: octetString + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), metadataForNode)); SuccessOrExit(err = sender->FinishCommand()); @@ -7432,112 +4865,10 @@ CHIP_ERROR MediaPlaybackCluster::MediaStop(Callback::Cancelable * onSuccessCallb return err; } -// MediaPlayback Cluster Attributes -CHIP_ERROR MediaPlaybackCluster::SubscribeAttributePlaybackState(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = MediaPlayback::Attributes::PlaybackState::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR MediaPlaybackCluster::ReportAttributePlaybackState(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(MediaPlayback::Attributes::PlaybackState::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR MediaPlaybackCluster::SubscribeAttributeStartTime(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = MediaPlayback::Attributes::StartTime::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR MediaPlaybackCluster::ReportAttributeStartTime(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(MediaPlayback::Attributes::StartTime::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR MediaPlaybackCluster::SubscribeAttributeDuration(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = MediaPlayback::Attributes::Duration::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR MediaPlaybackCluster::ReportAttributeDuration(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(MediaPlayback::Attributes::Duration::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR MediaPlaybackCluster::SubscribeAttributeSeekRangeEnd(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = MediaPlayback::Attributes::SeekRangeEnd::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR MediaPlaybackCluster::ReportAttributeSeekRangeEnd(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(MediaPlayback::Attributes::SeekRangeEnd::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR MediaPlaybackCluster::SubscribeAttributeSeekRangeStart(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = MediaPlayback::Attributes::SeekRangeStart::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR MediaPlaybackCluster::ReportAttributeSeekRangeStart(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(MediaPlayback::Attributes::SeekRangeStart::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR MediaPlaybackCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR MediaPlaybackCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} +// OccupancySensing Cluster Commands -// ModeSelect Cluster Commands -CHIP_ERROR ModeSelectCluster::ChangeToMode(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint8_t newMode) +// OnOff Cluster Commands +CHIP_ERROR OnOffCluster::Off(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -7549,7 +4880,7 @@ CHIP_ERROR ModeSelectCluster::ChangeToMode(Callback::Cancelable * onSuccessCallb VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, ModeSelect::Commands::ChangeToMode::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, OnOff::Commands::Off::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -7559,9 +4890,7 @@ CHIP_ERROR ModeSelectCluster::ChangeToMode(Callback::Cancelable * onSuccessCallb SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // newMode: int8u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), newMode)); + // Command takes no arguments. SuccessOrExit(err = sender->FinishCommand()); @@ -7577,96 +4906,50 @@ CHIP_ERROR ModeSelectCluster::ChangeToMode(Callback::Cancelable * onSuccessCallb return err; } -// ModeSelect Cluster Attributes -CHIP_ERROR ModeSelectCluster::SubscribeAttributeCurrentMode(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) +CHIP_ERROR OnOffCluster::OffWithEffect(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t effectId, uint8_t effectVariant) { - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ModeSelect::Attributes::CurrentMode::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; -CHIP_ERROR ModeSelectCluster::ReportAttributeCurrentMode(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ModeSelect::Attributes::CurrentMode::Id, onReportCallback, - BasicAttributeFilter); -} + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; -CHIP_ERROR ModeSelectCluster::SubscribeAttributeOnMode(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ModeSelect::Attributes::OnMode::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); -CHIP_ERROR ModeSelectCluster::ReportAttributeOnMode(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ModeSelect::Attributes::OnMode::Id, onReportCallback, - BasicAttributeFilter); -} + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, OnOff::Commands::OffWithEffect::Id, + (app::CommandPathFlags::kEndpointIdValid) }; -CHIP_ERROR ModeSelectCluster::SubscribeAttributeStartUpMode(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ModeSelect::Attributes::StartUpMode::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); -CHIP_ERROR ModeSelectCluster::ReportAttributeStartUpMode(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ModeSelect::Attributes::StartUpMode::Id, onReportCallback, - BasicAttributeFilter); -} + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); -CHIP_ERROR ModeSelectCluster::SubscribeAttributeDescription(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ModeSelect::Attributes::Description::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); -CHIP_ERROR ModeSelectCluster::ReportAttributeDescription(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ModeSelect::Attributes::Description::Id, onReportCallback, - BasicAttributeFilter); -} + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // effectId: onOffEffectIdentifier + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), effectId)); + // effectVariant: onOffDelayedAllOffEffectVariant + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), effectVariant)); -CHIP_ERROR ModeSelectCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = sender->FinishCommand()); -CHIP_ERROR ModeSelectCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); + + SuccessOrExit(err = mDevice->SendCommands(sender.get())); + + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; } -// NetworkCommissioning Cluster Commands -CHIP_ERROR NetworkCommissioningCluster::AddOrUpdateThreadNetwork(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - chip::ByteSpan operationalDataset, uint64_t breadcrumb) +CHIP_ERROR OnOffCluster::On(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -7678,8 +4961,7 @@ CHIP_ERROR NetworkCommissioningCluster::AddOrUpdateThreadNetwork(Callback::Cance VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, - NetworkCommissioning::Commands::AddOrUpdateThreadNetwork::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, OnOff::Commands::On::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -7689,11 +4971,7 @@ CHIP_ERROR NetworkCommissioningCluster::AddOrUpdateThreadNetwork(Callback::Cance SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // operationalDataset: octetString - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), operationalDataset)); - // breadcrumb: int64u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), breadcrumb)); + // Command takes no arguments. SuccessOrExit(err = sender->FinishCommand()); @@ -7709,9 +4987,7 @@ CHIP_ERROR NetworkCommissioningCluster::AddOrUpdateThreadNetwork(Callback::Cance return err; } -CHIP_ERROR NetworkCommissioningCluster::AddOrUpdateWiFiNetwork(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, chip::ByteSpan ssid, - chip::ByteSpan credentials, uint64_t breadcrumb) +CHIP_ERROR OnOffCluster::OnWithRecallGlobalScene(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -7723,8 +4999,7 @@ CHIP_ERROR NetworkCommissioningCluster::AddOrUpdateWiFiNetwork(Callback::Cancela VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, - NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, OnOff::Commands::OnWithRecallGlobalScene::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -7734,13 +5009,7 @@ CHIP_ERROR NetworkCommissioningCluster::AddOrUpdateWiFiNetwork(Callback::Cancela SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // ssid: octetString - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), ssid)); - // credentials: octetString - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), credentials)); - // breadcrumb: int64u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), breadcrumb)); + // Command takes no arguments. SuccessOrExit(err = sender->FinishCommand()); @@ -7756,9 +5025,8 @@ CHIP_ERROR NetworkCommissioningCluster::AddOrUpdateWiFiNetwork(Callback::Cancela return err; } -CHIP_ERROR NetworkCommissioningCluster::ConnectNetwork(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, chip::ByteSpan networkID, - uint64_t breadcrumb) +CHIP_ERROR OnOffCluster::OnWithTimedOff(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t onOffControl, uint16_t onTime, uint16_t offWaitTime) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -7770,8 +5038,7 @@ CHIP_ERROR NetworkCommissioningCluster::ConnectNetwork(Callback::Cancelable * on VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, - NetworkCommissioning::Commands::ConnectNetwork::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, OnOff::Commands::OnWithTimedOff::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -7782,10 +5049,12 @@ CHIP_ERROR NetworkCommissioningCluster::ConnectNetwork(Callback::Cancelable * on SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // networkID: octetString - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), networkID)); - // breadcrumb: int64u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), breadcrumb)); + // onOffControl: onOffControl + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), onOffControl)); + // onTime: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), onTime)); + // offWaitTime: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), offWaitTime)); SuccessOrExit(err = sender->FinishCommand()); @@ -7801,9 +5070,7 @@ CHIP_ERROR NetworkCommissioningCluster::ConnectNetwork(Callback::Cancelable * on return err; } -CHIP_ERROR NetworkCommissioningCluster::RemoveNetwork(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, chip::ByteSpan networkID, - uint64_t breadcrumb) +CHIP_ERROR OnOffCluster::Toggle(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -7815,7 +5082,7 @@ CHIP_ERROR NetworkCommissioningCluster::RemoveNetwork(Callback::Cancelable * onS VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, NetworkCommissioning::Commands::RemoveNetwork::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, OnOff::Commands::Toggle::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -7825,11 +5092,7 @@ CHIP_ERROR NetworkCommissioningCluster::RemoveNetwork(Callback::Cancelable * onS SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // networkID: octetString - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), networkID)); - // breadcrumb: int64u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), breadcrumb)); + // Command takes no arguments. SuccessOrExit(err = sender->FinishCommand()); @@ -7845,9 +5108,12 @@ CHIP_ERROR NetworkCommissioningCluster::RemoveNetwork(Callback::Cancelable * onS return err; } -CHIP_ERROR NetworkCommissioningCluster::ReorderNetwork(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, chip::ByteSpan networkID, - uint8_t networkIndex, uint64_t breadcrumb) +// OnOffSwitchConfiguration Cluster Commands + +// OperationalCredentials Cluster Commands +CHIP_ERROR OperationalCredentialsCluster::AddNOC(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + chip::ByteSpan NOCValue, chip::ByteSpan ICACValue, chip::ByteSpan IPKValue, + chip::NodeId caseAdminNode, uint16_t adminVendorId) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -7859,8 +5125,7 @@ CHIP_ERROR NetworkCommissioningCluster::ReorderNetwork(Callback::Cancelable * on VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, - NetworkCommissioning::Commands::ReorderNetwork::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, OperationalCredentials::Commands::AddNOC::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -7871,12 +5136,16 @@ CHIP_ERROR NetworkCommissioningCluster::ReorderNetwork(Callback::Cancelable * on SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // networkID: octetString - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), networkID)); - // networkIndex: int8u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), networkIndex)); - // breadcrumb: int64u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), breadcrumb)); + // NOCValue: octetString + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), NOCValue)); + // ICACValue: octetString + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), ICACValue)); + // IPKValue: octetString + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), IPKValue)); + // caseAdminNode: nodeId + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), caseAdminNode)); + // adminVendorId: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), adminVendorId)); SuccessOrExit(err = sender->FinishCommand()); @@ -7892,9 +5161,9 @@ CHIP_ERROR NetworkCommissioningCluster::ReorderNetwork(Callback::Cancelable * on return err; } -CHIP_ERROR NetworkCommissioningCluster::ScanNetworks(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, chip::ByteSpan ssid, - uint64_t breadcrumb) +CHIP_ERROR OperationalCredentialsCluster::AddTrustedRootCertificate(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + chip::ByteSpan rootCertificate) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -7906,7 +5175,8 @@ CHIP_ERROR NetworkCommissioningCluster::ScanNetworks(Callback::Cancelable * onSu VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, NetworkCommissioning::Commands::ScanNetworks::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, + OperationalCredentials::Commands::AddTrustedRootCertificate::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -7917,10 +5187,8 @@ CHIP_ERROR NetworkCommissioningCluster::ScanNetworks(Callback::Cancelable * onSu SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // ssid: octetString - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), ssid)); - // breadcrumb: int64u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), breadcrumb)); + // rootCertificate: octetString + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), rootCertificate)); SuccessOrExit(err = sender->FinishCommand()); @@ -7936,45 +5204,9 @@ CHIP_ERROR NetworkCommissioningCluster::ScanNetworks(Callback::Cancelable * onSu return err; } -// NetworkCommissioning Cluster Attributes -CHIP_ERROR NetworkCommissioningCluster::SubscribeAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::FeatureMap::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR NetworkCommissioningCluster::ReportAttributeFeatureMap(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::FeatureMap::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR NetworkCommissioningCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR NetworkCommissioningCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} - -// OtaSoftwareUpdateProvider Cluster Commands -CHIP_ERROR OtaSoftwareUpdateProviderCluster::ApplyUpdateRequest(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - chip::ByteSpan updateToken, uint32_t newVersion) +CHIP_ERROR OperationalCredentialsCluster::AttestationRequest(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + chip::ByteSpan attestationNonce) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -7987,7 +5219,7 @@ CHIP_ERROR OtaSoftwareUpdateProviderCluster::ApplyUpdateRequest(Callback::Cancel VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, - OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Id, + OperationalCredentials::Commands::AttestationRequest::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -7998,10 +5230,8 @@ CHIP_ERROR OtaSoftwareUpdateProviderCluster::ApplyUpdateRequest(Callback::Cancel SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // updateToken: octetString - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), updateToken)); - // newVersion: int32u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), newVersion)); + // attestationNonce: octetString + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), attestationNonce)); SuccessOrExit(err = sender->FinishCommand()); @@ -8017,9 +5247,8 @@ CHIP_ERROR OtaSoftwareUpdateProviderCluster::ApplyUpdateRequest(Callback::Cancel return err; } -CHIP_ERROR OtaSoftwareUpdateProviderCluster::NotifyUpdateApplied(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - chip::ByteSpan updateToken, uint32_t softwareVersion) +CHIP_ERROR OperationalCredentialsCluster::CertificateChainRequest(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t certificateType) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -8032,7 +5261,7 @@ CHIP_ERROR OtaSoftwareUpdateProviderCluster::NotifyUpdateApplied(Callback::Cance VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, - OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Id, + OperationalCredentials::Commands::CertificateChainRequest::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -8043,10 +5272,8 @@ CHIP_ERROR OtaSoftwareUpdateProviderCluster::NotifyUpdateApplied(Callback::Cance SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // updateToken: octetString - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), updateToken)); - // softwareVersion: int32u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), softwareVersion)); + // certificateType: int8u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), certificateType)); SuccessOrExit(err = sender->FinishCommand()); @@ -8062,11 +5289,8 @@ CHIP_ERROR OtaSoftwareUpdateProviderCluster::NotifyUpdateApplied(Callback::Cance return err; } -CHIP_ERROR OtaSoftwareUpdateProviderCluster::QueryImage(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, chip::VendorId vendorId, - uint16_t productId, uint32_t softwareVersion, uint8_t protocolsSupported, - uint16_t hardwareVersion, chip::CharSpan location, bool requestorCanConsent, - chip::ByteSpan metadataForProvider) +CHIP_ERROR OperationalCredentialsCluster::OpCSRRequest(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, chip::ByteSpan CSRNonce) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -8079,7 +5303,7 @@ CHIP_ERROR OtaSoftwareUpdateProviderCluster::QueryImage(Callback::Cancelable * o VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, - OtaSoftwareUpdateProvider::Commands::QueryImage::Id, + OperationalCredentials::Commands::OpCSRRequest::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -8090,22 +5314,8 @@ CHIP_ERROR OtaSoftwareUpdateProviderCluster::QueryImage(Callback::Cancelable * o SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // vendorId: vendorId - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), vendorId)); - // productId: int16u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), productId)); - // softwareVersion: int32u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), softwareVersion)); - // protocolsSupported: OTADownloadProtocol - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), protocolsSupported)); - // hardwareVersion: int16u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), hardwareVersion)); - // location: charString - SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), location)); - // requestorCanConsent: boolean - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), requestorCanConsent)); - // metadataForProvider: octetString - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), metadataForProvider)); + // CSRNonce: octetString + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), CSRNonce)); SuccessOrExit(err = sender->FinishCommand()); @@ -8121,29 +5331,8 @@ CHIP_ERROR OtaSoftwareUpdateProviderCluster::QueryImage(Callback::Cancelable * o return err; } -// OtaSoftwareUpdateProvider Cluster Attributes -CHIP_ERROR OtaSoftwareUpdateProviderCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR OtaSoftwareUpdateProviderCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} - -// OtaSoftwareUpdateRequestor Cluster Commands -CHIP_ERROR OtaSoftwareUpdateRequestorCluster::AnnounceOtaProvider(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - chip::NodeId providerLocation, chip::VendorId vendorId, - uint8_t announcementReason, chip::ByteSpan metadataForNode) +CHIP_ERROR OperationalCredentialsCluster::RemoveFabric(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t fabricIndex) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -8156,7 +5345,7 @@ CHIP_ERROR OtaSoftwareUpdateRequestorCluster::AnnounceOtaProvider(Callback::Canc VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, - OtaSoftwareUpdateRequestor::Commands::AnnounceOtaProvider::Id, + OperationalCredentials::Commands::RemoveFabric::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -8167,14 +5356,8 @@ CHIP_ERROR OtaSoftwareUpdateRequestorCluster::AnnounceOtaProvider(Callback::Canc SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // providerLocation: nodeId - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), providerLocation)); - // vendorId: vendorId - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), vendorId)); - // announcementReason: OTAAnnouncementReason - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), announcementReason)); - // metadataForNode: octetString - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), metadataForNode)); + // fabricIndex: int8u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), fabricIndex)); SuccessOrExit(err = sender->FinishCommand()); @@ -8190,130 +5373,51 @@ CHIP_ERROR OtaSoftwareUpdateRequestorCluster::AnnounceOtaProvider(Callback::Canc return err; } -// OtaSoftwareUpdateRequestor Cluster Attributes -CHIP_ERROR OtaSoftwareUpdateRequestorCluster::SubscribeAttributeDefaultOtaProvider(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) +CHIP_ERROR OperationalCredentialsCluster::RemoveTrustedRootCertificate(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, + chip::ByteSpan trustedRootIdentifier) { - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = OtaSoftwareUpdateRequestor::Attributes::DefaultOtaProvider::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; -CHIP_ERROR OtaSoftwareUpdateRequestorCluster::ReportAttributeDefaultOtaProvider(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(OtaSoftwareUpdateRequestor::Attributes::DefaultOtaProvider::Id, onReportCallback, - BasicAttributeFilter); -} + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; -CHIP_ERROR OtaSoftwareUpdateRequestorCluster::SubscribeAttributeUpdatePossible(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); -CHIP_ERROR OtaSoftwareUpdateRequestorCluster::ReportAttributeUpdatePossible(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR OtaSoftwareUpdateRequestorCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR OtaSoftwareUpdateRequestorCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, + OperationalCredentials::Commands::RemoveTrustedRootCertificate::Id, + (app::CommandPathFlags::kEndpointIdValid) }; -// OccupancySensing Cluster Commands -// OccupancySensing Cluster Attributes -CHIP_ERROR OccupancySensingCluster::SubscribeAttributeOccupancy(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = OccupancySensing::Attributes::Occupancy::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); -CHIP_ERROR OccupancySensingCluster::ReportAttributeOccupancy(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(OccupancySensing::Attributes::Occupancy::Id, onReportCallback, - BasicAttributeFilter); -} + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); -CHIP_ERROR OccupancySensingCluster::SubscribeAttributeOccupancySensorType(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = OccupancySensing::Attributes::OccupancySensorType::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); -CHIP_ERROR OccupancySensingCluster::ReportAttributeOccupancySensorType(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(OccupancySensing::Attributes::OccupancySensorType::Id, onReportCallback, - BasicAttributeFilter); -} + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // trustedRootIdentifier: octetString + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), trustedRootIdentifier)); -CHIP_ERROR OccupancySensingCluster::SubscribeAttributeOccupancySensorTypeBitmap(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = OccupancySensing::Attributes::OccupancySensorTypeBitmap::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = sender->FinishCommand()); -CHIP_ERROR OccupancySensingCluster::ReportAttributeOccupancySensorTypeBitmap(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(OccupancySensing::Attributes::OccupancySensorTypeBitmap::Id, onReportCallback, - BasicAttributeFilter); -} + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); -CHIP_ERROR OccupancySensingCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = mDevice->SendCommands(sender.get())); -CHIP_ERROR OccupancySensingCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; } -// OnOff Cluster Commands -CHIP_ERROR OnOffCluster::Off(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) +CHIP_ERROR OperationalCredentialsCluster::UpdateFabricLabel(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, chip::CharSpan label) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -8325,7 +5429,8 @@ CHIP_ERROR OnOffCluster::Off(Callback::Cancelable * onSuccessCallback, Callback: VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, OnOff::Commands::Off::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, + OperationalCredentials::Commands::UpdateFabricLabel::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -8335,7 +5440,9 @@ CHIP_ERROR OnOffCluster::Off(Callback::Cancelable * onSuccessCallback, Callback: SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - // Command takes no arguments. + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // label: charString + SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), label)); SuccessOrExit(err = sender->FinishCommand()); @@ -8351,8 +5458,9 @@ CHIP_ERROR OnOffCluster::Off(Callback::Cancelable * onSuccessCallback, Callback: return err; } -CHIP_ERROR OnOffCluster::OffWithEffect(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint8_t effectId, uint8_t effectVariant) +CHIP_ERROR OperationalCredentialsCluster::UpdateNOC(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, chip::ByteSpan NOCValue, + chip::ByteSpan ICACValue) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -8364,7 +5472,7 @@ CHIP_ERROR OnOffCluster::OffWithEffect(Callback::Cancelable * onSuccessCallback, VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, OnOff::Commands::OffWithEffect::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, OperationalCredentials::Commands::UpdateNOC::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -8375,10 +5483,10 @@ CHIP_ERROR OnOffCluster::OffWithEffect(Callback::Cancelable * onSuccessCallback, SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // effectId: onOffEffectIdentifier - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), effectId)); - // effectVariant: onOffDelayedAllOffEffectVariant - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), effectVariant)); + // NOCValue: octetString + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), NOCValue)); + // ICACValue: octetString + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), ICACValue)); SuccessOrExit(err = sender->FinishCommand()); @@ -8394,7 +5502,20 @@ CHIP_ERROR OnOffCluster::OffWithEffect(Callback::Cancelable * onSuccessCallback, return err; } -CHIP_ERROR OnOffCluster::On(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) +// PowerSource Cluster Commands + +// PowerSourceConfiguration Cluster Commands + +// PressureMeasurement Cluster Commands + +// PumpConfigurationAndControl Cluster Commands + +// RelativeHumidityMeasurement Cluster Commands + +// Scenes Cluster Commands +CHIP_ERROR ScenesCluster::AddScene(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t groupId, uint8_t sceneId, uint16_t transitionTime, chip::CharSpan sceneName, + chip::ClusterId clusterId, uint8_t length, uint8_t value) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -8406,7 +5527,7 @@ CHIP_ERROR OnOffCluster::On(Callback::Cancelable * onSuccessCallback, Callback:: VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, OnOff::Commands::On::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, Scenes::Commands::AddScene::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -8416,7 +5537,21 @@ CHIP_ERROR OnOffCluster::On(Callback::Cancelable * onSuccessCallback, Callback:: SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - // Command takes no arguments. + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // groupId: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), groupId)); + // sceneId: int8u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), sceneId)); + // transitionTime: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), transitionTime)); + // sceneName: charString + SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), sceneName)); + // clusterId: clusterId + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), clusterId)); + // length: int8u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), length)); + // value: int8u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), value)); SuccessOrExit(err = sender->FinishCommand()); @@ -8432,7 +5567,8 @@ CHIP_ERROR OnOffCluster::On(Callback::Cancelable * onSuccessCallback, Callback:: return err; } -CHIP_ERROR OnOffCluster::OnWithRecallGlobalScene(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) +CHIP_ERROR ScenesCluster::GetSceneMembership(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t groupId) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -8444,7 +5580,7 @@ CHIP_ERROR OnOffCluster::OnWithRecallGlobalScene(Callback::Cancelable * onSucces VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, OnOff::Commands::OnWithRecallGlobalScene::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, Scenes::Commands::GetSceneMembership::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -8454,7 +5590,9 @@ CHIP_ERROR OnOffCluster::OnWithRecallGlobalScene(Callback::Cancelable * onSucces SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - // Command takes no arguments. + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // groupId: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), groupId)); SuccessOrExit(err = sender->FinishCommand()); @@ -8470,8 +5608,8 @@ CHIP_ERROR OnOffCluster::OnWithRecallGlobalScene(Callback::Cancelable * onSucces return err; } -CHIP_ERROR OnOffCluster::OnWithTimedOff(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint8_t onOffControl, uint16_t onTime, uint16_t offWaitTime) +CHIP_ERROR ScenesCluster::RecallScene(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t groupId, uint8_t sceneId, uint16_t transitionTime) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -8483,7 +5621,7 @@ CHIP_ERROR OnOffCluster::OnWithTimedOff(Callback::Cancelable * onSuccessCallback VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, OnOff::Commands::OnWithTimedOff::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, Scenes::Commands::RecallScene::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -8494,12 +5632,12 @@ CHIP_ERROR OnOffCluster::OnWithTimedOff(Callback::Cancelable * onSuccessCallback SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // onOffControl: onOffControl - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), onOffControl)); - // onTime: int16u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), onTime)); - // offWaitTime: int16u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), offWaitTime)); + // groupId: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), groupId)); + // sceneId: int8u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), sceneId)); + // transitionTime: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), transitionTime)); SuccessOrExit(err = sender->FinishCommand()); @@ -8515,7 +5653,8 @@ CHIP_ERROR OnOffCluster::OnWithTimedOff(Callback::Cancelable * onSuccessCallback return err; } -CHIP_ERROR OnOffCluster::Toggle(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) +CHIP_ERROR ScenesCluster::RemoveAllScenes(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t groupId) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -8527,7 +5666,7 @@ CHIP_ERROR OnOffCluster::Toggle(Callback::Cancelable * onSuccessCallback, Callba VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, OnOff::Commands::Toggle::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, Scenes::Commands::RemoveAllScenes::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -8537,7 +5676,9 @@ CHIP_ERROR OnOffCluster::Toggle(Callback::Cancelable * onSuccessCallback, Callba SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - // Command takes no arguments. + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // groupId: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), groupId)); SuccessOrExit(err = sender->FinishCommand()); @@ -8553,182 +5694,8 @@ CHIP_ERROR OnOffCluster::Toggle(Callback::Cancelable * onSuccessCallback, Callba return err; } -// OnOff Cluster Attributes -CHIP_ERROR OnOffCluster::SubscribeAttributeOnOff(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = OnOff::Attributes::OnOff::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR OnOffCluster::ReportAttributeOnOff(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(OnOff::Attributes::OnOff::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR OnOffCluster::SubscribeAttributeGlobalSceneControl(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = OnOff::Attributes::GlobalSceneControl::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR OnOffCluster::ReportAttributeGlobalSceneControl(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(OnOff::Attributes::GlobalSceneControl::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR OnOffCluster::SubscribeAttributeOnTime(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = OnOff::Attributes::OnTime::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR OnOffCluster::ReportAttributeOnTime(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(OnOff::Attributes::OnTime::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR OnOffCluster::SubscribeAttributeOffWaitTime(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = OnOff::Attributes::OffWaitTime::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR OnOffCluster::ReportAttributeOffWaitTime(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(OnOff::Attributes::OffWaitTime::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR OnOffCluster::SubscribeAttributeStartUpOnOff(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = OnOff::Attributes::StartUpOnOff::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR OnOffCluster::ReportAttributeStartUpOnOff(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(OnOff::Attributes::StartUpOnOff::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR OnOffCluster::SubscribeAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::FeatureMap::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR OnOffCluster::ReportAttributeFeatureMap(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::FeatureMap::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR OnOffCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR OnOffCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} - -// OnOffSwitchConfiguration Cluster Commands -// OnOffSwitchConfiguration Cluster Attributes -CHIP_ERROR OnOffSwitchConfigurationCluster::SubscribeAttributeSwitchType(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = OnOffSwitchConfiguration::Attributes::SwitchType::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR OnOffSwitchConfigurationCluster::ReportAttributeSwitchType(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(OnOffSwitchConfiguration::Attributes::SwitchType::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR OnOffSwitchConfigurationCluster::SubscribeAttributeSwitchActions(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = OnOffSwitchConfiguration::Attributes::SwitchActions::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR OnOffSwitchConfigurationCluster::ReportAttributeSwitchActions(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(OnOffSwitchConfiguration::Attributes::SwitchActions::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR OnOffSwitchConfigurationCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR OnOffSwitchConfigurationCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} - -// OperationalCredentials Cluster Commands -CHIP_ERROR OperationalCredentialsCluster::AddNOC(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - chip::ByteSpan NOCValue, chip::ByteSpan ICACValue, chip::ByteSpan IPKValue, - chip::NodeId caseAdminNode, uint16_t adminVendorId) +CHIP_ERROR ScenesCluster::RemoveScene(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t groupId, uint8_t sceneId) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -8740,7 +5707,7 @@ CHIP_ERROR OperationalCredentialsCluster::AddNOC(Callback::Cancelable * onSucces VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, OperationalCredentials::Commands::AddNOC::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, Scenes::Commands::RemoveScene::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -8751,16 +5718,10 @@ CHIP_ERROR OperationalCredentialsCluster::AddNOC(Callback::Cancelable * onSucces SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // NOCValue: octetString - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), NOCValue)); - // ICACValue: octetString - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), ICACValue)); - // IPKValue: octetString - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), IPKValue)); - // caseAdminNode: nodeId - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), caseAdminNode)); - // adminVendorId: int16u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), adminVendorId)); + // groupId: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), groupId)); + // sceneId: int8u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), sceneId)); SuccessOrExit(err = sender->FinishCommand()); @@ -8776,9 +5737,8 @@ CHIP_ERROR OperationalCredentialsCluster::AddNOC(Callback::Cancelable * onSucces return err; } -CHIP_ERROR OperationalCredentialsCluster::AddTrustedRootCertificate(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - chip::ByteSpan rootCertificate) +CHIP_ERROR ScenesCluster::StoreScene(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t groupId, uint8_t sceneId) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -8790,8 +5750,7 @@ CHIP_ERROR OperationalCredentialsCluster::AddTrustedRootCertificate(Callback::Ca VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, - OperationalCredentials::Commands::AddTrustedRootCertificate::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, Scenes::Commands::StoreScene::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -8802,8 +5761,10 @@ CHIP_ERROR OperationalCredentialsCluster::AddTrustedRootCertificate(Callback::Ca SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // rootCertificate: octetString - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), rootCertificate)); + // groupId: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), groupId)); + // sceneId: int8u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), sceneId)); SuccessOrExit(err = sender->FinishCommand()); @@ -8819,9 +5780,8 @@ CHIP_ERROR OperationalCredentialsCluster::AddTrustedRootCertificate(Callback::Ca return err; } -CHIP_ERROR OperationalCredentialsCluster::AttestationRequest(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - chip::ByteSpan attestationNonce) +CHIP_ERROR ScenesCluster::ViewScene(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t groupId, uint8_t sceneId) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -8833,8 +5793,7 @@ CHIP_ERROR OperationalCredentialsCluster::AttestationRequest(Callback::Cancelabl VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, - OperationalCredentials::Commands::AttestationRequest::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, Scenes::Commands::ViewScene::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -8845,8 +5804,10 @@ CHIP_ERROR OperationalCredentialsCluster::AttestationRequest(Callback::Cancelabl SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // attestationNonce: octetString - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), attestationNonce)); + // groupId: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), groupId)); + // sceneId: int8u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), sceneId)); SuccessOrExit(err = sender->FinishCommand()); @@ -8862,8 +5823,9 @@ CHIP_ERROR OperationalCredentialsCluster::AttestationRequest(Callback::Cancelabl return err; } -CHIP_ERROR OperationalCredentialsCluster::CertificateChainRequest(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t certificateType) +// SoftwareDiagnostics Cluster Commands +CHIP_ERROR SoftwareDiagnosticsCluster::ResetWatermarks(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -8876,7 +5838,7 @@ CHIP_ERROR OperationalCredentialsCluster::CertificateChainRequest(Callback::Canc VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, - OperationalCredentials::Commands::CertificateChainRequest::Id, + SoftwareDiagnostics::Commands::ResetWatermarks::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -8886,9 +5848,7 @@ CHIP_ERROR OperationalCredentialsCluster::CertificateChainRequest(Callback::Canc SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // certificateType: int8u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), certificateType)); + // Command takes no arguments. SuccessOrExit(err = sender->FinishCommand()); @@ -8904,8 +5864,11 @@ CHIP_ERROR OperationalCredentialsCluster::CertificateChainRequest(Callback::Canc return err; } -CHIP_ERROR OperationalCredentialsCluster::OpCSRRequest(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, chip::ByteSpan CSRNonce) +// Switch Cluster Commands + +// TvChannel Cluster Commands +CHIP_ERROR TvChannelCluster::ChangeChannel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + chip::CharSpan match) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -8917,8 +5880,7 @@ CHIP_ERROR OperationalCredentialsCluster::OpCSRRequest(Callback::Cancelable * on VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, - OperationalCredentials::Commands::OpCSRRequest::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, TvChannel::Commands::ChangeChannel::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -8929,8 +5891,8 @@ CHIP_ERROR OperationalCredentialsCluster::OpCSRRequest(Callback::Cancelable * on SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // CSRNonce: octetString - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), CSRNonce)); + // match: charString + SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), match)); SuccessOrExit(err = sender->FinishCommand()); @@ -8946,8 +5908,9 @@ CHIP_ERROR OperationalCredentialsCluster::OpCSRRequest(Callback::Cancelable * on return err; } -CHIP_ERROR OperationalCredentialsCluster::RemoveFabric(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t fabricIndex) +CHIP_ERROR TvChannelCluster::ChangeChannelByNumber(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint16_t majorNumber, + uint16_t minorNumber) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -8959,8 +5922,7 @@ CHIP_ERROR OperationalCredentialsCluster::RemoveFabric(Callback::Cancelable * on VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, - OperationalCredentials::Commands::RemoveFabric::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, TvChannel::Commands::ChangeChannelByNumber::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -8971,8 +5933,10 @@ CHIP_ERROR OperationalCredentialsCluster::RemoveFabric(Callback::Cancelable * on SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // fabricIndex: int8u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), fabricIndex)); + // majorNumber: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), majorNumber)); + // minorNumber: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), minorNumber)); SuccessOrExit(err = sender->FinishCommand()); @@ -8988,9 +5952,8 @@ CHIP_ERROR OperationalCredentialsCluster::RemoveFabric(Callback::Cancelable * on return err; } -CHIP_ERROR OperationalCredentialsCluster::RemoveTrustedRootCertificate(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - chip::ByteSpan trustedRootIdentifier) +CHIP_ERROR TvChannelCluster::SkipChannel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint16_t count) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -9002,8 +5965,7 @@ CHIP_ERROR OperationalCredentialsCluster::RemoveTrustedRootCertificate(Callback: VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, - OperationalCredentials::Commands::RemoveTrustedRootCertificate::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, TvChannel::Commands::SkipChannel::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -9014,8 +5976,8 @@ CHIP_ERROR OperationalCredentialsCluster::RemoveTrustedRootCertificate(Callback: SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // trustedRootIdentifier: octetString - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), trustedRootIdentifier)); + // count: int16u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), count)); SuccessOrExit(err = sender->FinishCommand()); @@ -9031,8 +5993,9 @@ CHIP_ERROR OperationalCredentialsCluster::RemoveTrustedRootCertificate(Callback: return err; } -CHIP_ERROR OperationalCredentialsCluster::UpdateFabricLabel(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, chip::CharSpan label) +// TargetNavigator Cluster Commands +CHIP_ERROR TargetNavigatorCluster::NavigateTarget(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t target, chip::CharSpan data) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -9044,8 +6007,7 @@ CHIP_ERROR OperationalCredentialsCluster::UpdateFabricLabel(Callback::Cancelable VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, - OperationalCredentials::Commands::UpdateFabricLabel::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, TargetNavigator::Commands::NavigateTarget::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -9056,8 +6018,10 @@ CHIP_ERROR OperationalCredentialsCluster::UpdateFabricLabel(Callback::Cancelable SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // label: charString - SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), label)); + // target: int8u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), target)); + // data: charString + SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), data)); SuccessOrExit(err = sender->FinishCommand()); @@ -9073,9 +6037,12 @@ CHIP_ERROR OperationalCredentialsCluster::UpdateFabricLabel(Callback::Cancelable return err; } -CHIP_ERROR OperationalCredentialsCluster::UpdateNOC(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, chip::ByteSpan NOCValue, - chip::ByteSpan ICACValue) +// TemperatureMeasurement Cluster Commands + +// TestCluster Cluster Commands +CHIP_ERROR TestClusterCluster::SimpleStructEchoRequest(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t a, bool b, uint8_t c, + chip::ByteSpan d, chip::CharSpan e, uint8_t f, float g, double h) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -9087,7 +6054,8 @@ CHIP_ERROR OperationalCredentialsCluster::UpdateNOC(Callback::Cancelable * onSuc VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, OperationalCredentials::Commands::UpdateNOC::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, + TestCluster::Commands::SimpleStructEchoRequest::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -9098,10 +6066,22 @@ CHIP_ERROR OperationalCredentialsCluster::UpdateNOC(Callback::Cancelable * onSuc SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // NOCValue: octetString - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), NOCValue)); - // ICACValue: octetString - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), ICACValue)); + // a: int8u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), a)); + // b: boolean + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), b)); + // c: simpleEnum + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), c)); + // d: octetString + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), d)); + // e: charString + SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), e)); + // f: simpleBitmap + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), f)); + // g: single + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), g)); + // h: double + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), h)); SuccessOrExit(err = sender->FinishCommand()); @@ -9117,855 +6097,174 @@ CHIP_ERROR OperationalCredentialsCluster::UpdateNOC(Callback::Cancelable * onSuc return err; } -// OperationalCredentials Cluster Attributes -CHIP_ERROR OperationalCredentialsCluster::SubscribeAttributeSupportedFabrics(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) +CHIP_ERROR TestClusterCluster::Test(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = OperationalCredentials::Attributes::SupportedFabrics::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; -CHIP_ERROR OperationalCredentialsCluster::ReportAttributeSupportedFabrics(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(OperationalCredentials::Attributes::SupportedFabrics::Id, onReportCallback, - BasicAttributeFilter); -} + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; -CHIP_ERROR OperationalCredentialsCluster::SubscribeAttributeCommissionedFabrics(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = OperationalCredentials::Attributes::CommissionedFabrics::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); -CHIP_ERROR OperationalCredentialsCluster::ReportAttributeCommissionedFabrics(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(OperationalCredentials::Attributes::CommissionedFabrics::Id, onReportCallback, - BasicAttributeFilter); -} + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, TestCluster::Commands::Test::Id, + (app::CommandPathFlags::kEndpointIdValid) }; -CHIP_ERROR OperationalCredentialsCluster::SubscribeAttributeCurrentFabricIndex(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = OperationalCredentials::Attributes::CurrentFabricIndex::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); -CHIP_ERROR OperationalCredentialsCluster::ReportAttributeCurrentFabricIndex(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(OperationalCredentials::Attributes::CurrentFabricIndex::Id, onReportCallback, - BasicAttributeFilter); -} + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); -CHIP_ERROR OperationalCredentialsCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); -CHIP_ERROR OperationalCredentialsCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} + // Command takes no arguments. -// PowerSource Cluster Commands -// PowerSource Cluster Attributes -CHIP_ERROR PowerSourceCluster::SubscribeAttributeStatus(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PowerSource::Attributes::Status::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = sender->FinishCommand()); -CHIP_ERROR PowerSourceCluster::ReportAttributeStatus(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PowerSource::Attributes::Status::Id, onReportCallback, - BasicAttributeFilter); -} + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); -CHIP_ERROR PowerSourceCluster::SubscribeAttributeOrder(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PowerSource::Attributes::Order::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = mDevice->SendCommands(sender.get())); -CHIP_ERROR PowerSourceCluster::ReportAttributeOrder(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PowerSource::Attributes::Order::Id, onReportCallback, - BasicAttributeFilter); + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; } -CHIP_ERROR PowerSourceCluster::SubscribeAttributeDescription(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) +CHIP_ERROR TestClusterCluster::TestAddArguments(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t arg1, uint8_t arg2) { - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PowerSource::Attributes::Description::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; -CHIP_ERROR PowerSourceCluster::ReportAttributeDescription(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PowerSource::Attributes::Description::Id, onReportCallback, - BasicAttributeFilter); -} + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; -CHIP_ERROR PowerSourceCluster::SubscribeAttributeBatteryVoltage(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PowerSource::Attributes::BatteryVoltage::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); -CHIP_ERROR PowerSourceCluster::ReportAttributeBatteryVoltage(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PowerSource::Attributes::BatteryVoltage::Id, onReportCallback, - BasicAttributeFilter); -} + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, TestCluster::Commands::TestAddArguments::Id, + (app::CommandPathFlags::kEndpointIdValid) }; -CHIP_ERROR PowerSourceCluster::SubscribeAttributeBatteryPercentRemaining(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PowerSource::Attributes::BatteryPercentRemaining::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); -CHIP_ERROR PowerSourceCluster::ReportAttributeBatteryPercentRemaining(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PowerSource::Attributes::BatteryPercentRemaining::Id, onReportCallback, - BasicAttributeFilter); -} + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); -CHIP_ERROR PowerSourceCluster::SubscribeAttributeBatteryTimeRemaining(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PowerSource::Attributes::BatteryTimeRemaining::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); -CHIP_ERROR PowerSourceCluster::ReportAttributeBatteryTimeRemaining(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PowerSource::Attributes::BatteryTimeRemaining::Id, onReportCallback, - BasicAttributeFilter); -} + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // arg1: int8u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), arg1)); + // arg2: int8u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), arg2)); -CHIP_ERROR PowerSourceCluster::SubscribeAttributeBatteryChargeLevel(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PowerSource::Attributes::BatteryChargeLevel::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = sender->FinishCommand()); -CHIP_ERROR PowerSourceCluster::ReportAttributeBatteryChargeLevel(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PowerSource::Attributes::BatteryChargeLevel::Id, onReportCallback, - BasicAttributeFilter); -} + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); -CHIP_ERROR PowerSourceCluster::SubscribeAttributeBatteryChargeState(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PowerSource::Attributes::BatteryChargeState::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = mDevice->SendCommands(sender.get())); -CHIP_ERROR PowerSourceCluster::ReportAttributeBatteryChargeState(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PowerSource::Attributes::BatteryChargeState::Id, onReportCallback, - BasicAttributeFilter); + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; } -CHIP_ERROR PowerSourceCluster::SubscribeAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) +CHIP_ERROR TestClusterCluster::TestEnumsRequest(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + chip::VendorId arg1, uint8_t arg2) { - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::FeatureMap::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; -CHIP_ERROR PowerSourceCluster::ReportAttributeFeatureMap(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::FeatureMap::Id, onReportCallback, - BasicAttributeFilter); -} + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; -CHIP_ERROR PowerSourceCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); -CHIP_ERROR PowerSourceCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, TestCluster::Commands::TestEnumsRequest::Id, + (app::CommandPathFlags::kEndpointIdValid) }; -// PowerSourceConfiguration Cluster Commands -// PowerSourceConfiguration Cluster Attributes + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); -// PressureMeasurement Cluster Commands -// PressureMeasurement Cluster Attributes -CHIP_ERROR PressureMeasurementCluster::SubscribeAttributeMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PressureMeasurement::Attributes::MeasuredValue::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); -CHIP_ERROR PressureMeasurementCluster::ReportAttributeMeasuredValue(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PressureMeasurement::Attributes::MeasuredValue::Id, onReportCallback, - BasicAttributeFilter); -} + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); -CHIP_ERROR PressureMeasurementCluster::SubscribeAttributeMinMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PressureMeasurement::Attributes::MinMeasuredValue::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // arg1: vendorId + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), arg1)); + // arg2: simpleEnum + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), arg2)); -CHIP_ERROR PressureMeasurementCluster::ReportAttributeMinMeasuredValue(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PressureMeasurement::Attributes::MinMeasuredValue::Id, onReportCallback, - BasicAttributeFilter); -} + SuccessOrExit(err = sender->FinishCommand()); -CHIP_ERROR PressureMeasurementCluster::SubscribeAttributeMaxMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PressureMeasurement::Attributes::MaxMeasuredValue::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); -CHIP_ERROR PressureMeasurementCluster::ReportAttributeMaxMeasuredValue(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PressureMeasurement::Attributes::MaxMeasuredValue::Id, onReportCallback, - BasicAttributeFilter); -} + SuccessOrExit(err = mDevice->SendCommands(sender.get())); -CHIP_ERROR PressureMeasurementCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; } -CHIP_ERROR PressureMeasurementCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) +CHIP_ERROR TestClusterCluster::TestListInt8UArgumentRequest(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t arg1) { - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; -// PumpConfigurationAndControl Cluster Commands -// PumpConfigurationAndControl Cluster Attributes -CHIP_ERROR PumpConfigurationAndControlCluster::SubscribeAttributeMaxPressure(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PumpConfigurationAndControl::Attributes::MaxPressure::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; -CHIP_ERROR PumpConfigurationAndControlCluster::ReportAttributeMaxPressure(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PumpConfigurationAndControl::Attributes::MaxPressure::Id, onReportCallback, - BasicAttributeFilter); -} + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); -CHIP_ERROR PumpConfigurationAndControlCluster::SubscribeAttributeMaxSpeed(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PumpConfigurationAndControl::Attributes::MaxSpeed::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::ReportAttributeMaxSpeed(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PumpConfigurationAndControl::Attributes::MaxSpeed::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::SubscribeAttributeMaxFlow(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PumpConfigurationAndControl::Attributes::MaxFlow::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::ReportAttributeMaxFlow(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PumpConfigurationAndControl::Attributes::MaxFlow::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::SubscribeAttributeMinConstPressure(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PumpConfigurationAndControl::Attributes::MinConstPressure::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::ReportAttributeMinConstPressure(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PumpConfigurationAndControl::Attributes::MinConstPressure::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::SubscribeAttributeMaxConstPressure(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PumpConfigurationAndControl::Attributes::MaxConstPressure::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::ReportAttributeMaxConstPressure(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PumpConfigurationAndControl::Attributes::MaxConstPressure::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::SubscribeAttributeMinCompPressure(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PumpConfigurationAndControl::Attributes::MinCompPressure::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::ReportAttributeMinCompPressure(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PumpConfigurationAndControl::Attributes::MinCompPressure::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::SubscribeAttributeMaxCompPressure(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PumpConfigurationAndControl::Attributes::MaxCompPressure::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::ReportAttributeMaxCompPressure(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PumpConfigurationAndControl::Attributes::MaxCompPressure::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::SubscribeAttributeMinConstSpeed(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PumpConfigurationAndControl::Attributes::MinConstSpeed::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::ReportAttributeMinConstSpeed(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PumpConfigurationAndControl::Attributes::MinConstSpeed::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::SubscribeAttributeMaxConstSpeed(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PumpConfigurationAndControl::Attributes::MaxConstSpeed::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::ReportAttributeMaxConstSpeed(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PumpConfigurationAndControl::Attributes::MaxConstSpeed::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::SubscribeAttributeMinConstFlow(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PumpConfigurationAndControl::Attributes::MinConstFlow::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::ReportAttributeMinConstFlow(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PumpConfigurationAndControl::Attributes::MinConstFlow::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::SubscribeAttributeMaxConstFlow(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PumpConfigurationAndControl::Attributes::MaxConstFlow::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::ReportAttributeMaxConstFlow(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PumpConfigurationAndControl::Attributes::MaxConstFlow::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::SubscribeAttributeMinConstTemp(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PumpConfigurationAndControl::Attributes::MinConstTemp::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::ReportAttributeMinConstTemp(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PumpConfigurationAndControl::Attributes::MinConstTemp::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::SubscribeAttributeMaxConstTemp(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PumpConfigurationAndControl::Attributes::MaxConstTemp::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::ReportAttributeMaxConstTemp(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PumpConfigurationAndControl::Attributes::MaxConstTemp::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::SubscribeAttributePumpStatus(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PumpConfigurationAndControl::Attributes::PumpStatus::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::ReportAttributePumpStatus(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PumpConfigurationAndControl::Attributes::PumpStatus::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::SubscribeAttributeEffectiveOperationMode(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::ReportAttributeEffectiveOperationMode(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PumpConfigurationAndControl::Attributes::EffectiveOperationMode::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::SubscribeAttributeEffectiveControlMode(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PumpConfigurationAndControl::Attributes::EffectiveControlMode::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::ReportAttributeEffectiveControlMode(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PumpConfigurationAndControl::Attributes::EffectiveControlMode::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::SubscribeAttributeCapacity(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PumpConfigurationAndControl::Attributes::Capacity::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::ReportAttributeCapacity(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PumpConfigurationAndControl::Attributes::Capacity::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::SubscribeAttributeSpeed(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PumpConfigurationAndControl::Attributes::Speed::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::ReportAttributeSpeed(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PumpConfigurationAndControl::Attributes::Speed::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::SubscribeAttributeLifetimeRunningHours(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PumpConfigurationAndControl::Attributes::LifetimeRunningHours::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::ReportAttributeLifetimeRunningHours(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PumpConfigurationAndControl::Attributes::LifetimeRunningHours::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::SubscribeAttributePower(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PumpConfigurationAndControl::Attributes::Power::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::ReportAttributePower(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PumpConfigurationAndControl::Attributes::Power::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::SubscribeAttributeLifetimeEnergyConsumed(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::ReportAttributeLifetimeEnergyConsumed(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::SubscribeAttributeOperationMode(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PumpConfigurationAndControl::Attributes::OperationMode::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::ReportAttributeOperationMode(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PumpConfigurationAndControl::Attributes::OperationMode::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::SubscribeAttributeControlMode(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PumpConfigurationAndControl::Attributes::ControlMode::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::ReportAttributeControlMode(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PumpConfigurationAndControl::Attributes::ControlMode::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::SubscribeAttributeAlarmMask(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PumpConfigurationAndControl::Attributes::AlarmMask::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::ReportAttributeAlarmMask(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PumpConfigurationAndControl::Attributes::AlarmMask::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::SubscribeAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::FeatureMap::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::ReportAttributeFeatureMap(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::FeatureMap::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} - -// RelativeHumidityMeasurement Cluster Commands -// RelativeHumidityMeasurement Cluster Attributes -CHIP_ERROR RelativeHumidityMeasurementCluster::SubscribeAttributeMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = RelativeHumidityMeasurement::Attributes::MeasuredValue::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR RelativeHumidityMeasurementCluster::ReportAttributeMeasuredValue(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(RelativeHumidityMeasurement::Attributes::MeasuredValue::Id, onReportCallback, - BasicAttributeFilter); -} + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, + TestCluster::Commands::TestListInt8UArgumentRequest::Id, + (app::CommandPathFlags::kEndpointIdValid) }; -CHIP_ERROR RelativeHumidityMeasurementCluster::SubscribeAttributeMinMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = RelativeHumidityMeasurement::Attributes::MinMeasuredValue::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); -CHIP_ERROR RelativeHumidityMeasurementCluster::ReportAttributeMinMeasuredValue(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(RelativeHumidityMeasurement::Attributes::MinMeasuredValue::Id, onReportCallback, - BasicAttributeFilter); -} + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); -CHIP_ERROR RelativeHumidityMeasurementCluster::SubscribeAttributeMaxMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); -CHIP_ERROR RelativeHumidityMeasurementCluster::ReportAttributeMaxMeasuredValue(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::Id, onReportCallback, - BasicAttributeFilter); -} + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // arg1: int8u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), arg1)); -CHIP_ERROR RelativeHumidityMeasurementCluster::SubscribeAttributeTolerance(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = RelativeHumidityMeasurement::Attributes::Tolerance::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = sender->FinishCommand()); -CHIP_ERROR RelativeHumidityMeasurementCluster::ReportAttributeTolerance(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(RelativeHumidityMeasurement::Attributes::Tolerance::Id, onReportCallback, - BasicAttributeFilter); -} + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); -CHIP_ERROR RelativeHumidityMeasurementCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = mDevice->SendCommands(sender.get())); -CHIP_ERROR RelativeHumidityMeasurementCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; } -// Scenes Cluster Commands -CHIP_ERROR ScenesCluster::AddScene(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t groupId, uint8_t sceneId, uint16_t transitionTime, chip::CharSpan sceneName, - chip::ClusterId clusterId, uint8_t length, uint8_t value) +CHIP_ERROR TestClusterCluster::TestListInt8UReverseRequest(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t arg1) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -9977,7 +6276,8 @@ CHIP_ERROR ScenesCluster::AddScene(Callback::Cancelable * onSuccessCallback, Cal VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, Scenes::Commands::AddScene::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, + TestCluster::Commands::TestListInt8UReverseRequest::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -9988,20 +6288,8 @@ CHIP_ERROR ScenesCluster::AddScene(Callback::Cancelable * onSuccessCallback, Cal SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // groupId: int16u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), groupId)); - // sceneId: int8u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), sceneId)); - // transitionTime: int16u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), transitionTime)); - // sceneName: charString - SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), sceneName)); - // clusterId: clusterId - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), clusterId)); - // length: int8u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), length)); - // value: int8u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), value)); + // arg1: int8u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), arg1)); SuccessOrExit(err = sender->FinishCommand()); @@ -10017,8 +6305,9 @@ CHIP_ERROR ScenesCluster::AddScene(Callback::Cancelable * onSuccessCallback, Cal return err; } -CHIP_ERROR ScenesCluster::GetSceneMembership(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t groupId) +CHIP_ERROR TestClusterCluster::TestListNestedStructListArgumentRequest(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t a, bool b, + uint32_t e, chip::ByteSpan f, uint8_t g) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -10030,7 +6319,8 @@ CHIP_ERROR ScenesCluster::GetSceneMembership(Callback::Cancelable * onSuccessCal VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, Scenes::Commands::GetSceneMembership::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, + TestCluster::Commands::TestListNestedStructListArgumentRequest::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -10041,8 +6331,16 @@ CHIP_ERROR ScenesCluster::GetSceneMembership(Callback::Cancelable * onSuccessCal SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // groupId: int16u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), groupId)); + // a: int8u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), a)); + // b: boolean + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), b)); + // e: int32u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), e)); + // f: octetString + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), f)); + // g: int8u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), g)); SuccessOrExit(err = sender->FinishCommand()); @@ -10058,8 +6356,9 @@ CHIP_ERROR ScenesCluster::GetSceneMembership(Callback::Cancelable * onSuccessCal return err; } -CHIP_ERROR ScenesCluster::RecallScene(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t groupId, uint8_t sceneId, uint16_t transitionTime) +CHIP_ERROR TestClusterCluster::TestListStructArgumentRequest(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t a, bool b, uint8_t c, + chip::ByteSpan d, chip::CharSpan e, uint8_t f, float g, double h) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -10071,7 +6370,8 @@ CHIP_ERROR ScenesCluster::RecallScene(Callback::Cancelable * onSuccessCallback, VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, Scenes::Commands::RecallScene::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, + TestCluster::Commands::TestListStructArgumentRequest::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -10082,15 +6382,25 @@ CHIP_ERROR ScenesCluster::RecallScene(Callback::Cancelable * onSuccessCallback, SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // groupId: int16u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), groupId)); - // sceneId: int8u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), sceneId)); - // transitionTime: int16u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), transitionTime)); - - SuccessOrExit(err = sender->FinishCommand()); - + // a: int8u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), a)); + // b: boolean + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), b)); + // c: simpleEnum + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), c)); + // d: octetString + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), d)); + // e: charString + SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), e)); + // f: simpleBitmap + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), f)); + // g: single + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), g)); + // h: double + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), h)); + + SuccessOrExit(err = sender->FinishCommand()); + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); @@ -10103,8 +6413,8 @@ CHIP_ERROR ScenesCluster::RecallScene(Callback::Cancelable * onSuccessCallback, return err; } -CHIP_ERROR ScenesCluster::RemoveAllScenes(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t groupId) +CHIP_ERROR TestClusterCluster::TestNestedStructArgumentRequest(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t a, bool b) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -10116,7 +6426,8 @@ CHIP_ERROR ScenesCluster::RemoveAllScenes(Callback::Cancelable * onSuccessCallba VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, Scenes::Commands::RemoveAllScenes::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, + TestCluster::Commands::TestNestedStructArgumentRequest::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -10127,8 +6438,10 @@ CHIP_ERROR ScenesCluster::RemoveAllScenes(Callback::Cancelable * onSuccessCallba SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // groupId: int16u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), groupId)); + // a: int8u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), a)); + // b: boolean + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), b)); SuccessOrExit(err = sender->FinishCommand()); @@ -10144,8 +6457,9 @@ CHIP_ERROR ScenesCluster::RemoveAllScenes(Callback::Cancelable * onSuccessCallba return err; } -CHIP_ERROR ScenesCluster::RemoveScene(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t groupId, uint8_t sceneId) +CHIP_ERROR TestClusterCluster::TestNestedStructListArgumentRequest(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t a, bool b, + uint32_t e, chip::ByteSpan f, uint8_t g) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -10157,7 +6471,8 @@ CHIP_ERROR ScenesCluster::RemoveScene(Callback::Cancelable * onSuccessCallback, VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, Scenes::Commands::RemoveScene::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, + TestCluster::Commands::TestNestedStructListArgumentRequest::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -10168,10 +6483,16 @@ CHIP_ERROR ScenesCluster::RemoveScene(Callback::Cancelable * onSuccessCallback, SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // groupId: int16u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), groupId)); - // sceneId: int8u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), sceneId)); + // a: int8u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), a)); + // b: boolean + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), b)); + // e: int32u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), e)); + // f: octetString + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), f)); + // g: int8u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), g)); SuccessOrExit(err = sender->FinishCommand()); @@ -10187,8 +6508,7 @@ CHIP_ERROR ScenesCluster::RemoveScene(Callback::Cancelable * onSuccessCallback, return err; } -CHIP_ERROR ScenesCluster::StoreScene(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t groupId, uint8_t sceneId) +CHIP_ERROR TestClusterCluster::TestNotHandled(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -10200,7 +6520,7 @@ CHIP_ERROR ScenesCluster::StoreScene(Callback::Cancelable * onSuccessCallback, C VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, Scenes::Commands::StoreScene::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, TestCluster::Commands::TestNotHandled::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -10210,11 +6530,7 @@ CHIP_ERROR ScenesCluster::StoreScene(Callback::Cancelable * onSuccessCallback, C SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // groupId: int16u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), groupId)); - // sceneId: int8u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), sceneId)); + // Command takes no arguments. SuccessOrExit(err = sender->FinishCommand()); @@ -10230,8 +6546,8 @@ CHIP_ERROR ScenesCluster::StoreScene(Callback::Cancelable * onSuccessCallback, C return err; } -CHIP_ERROR ScenesCluster::ViewScene(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t groupId, uint8_t sceneId) +CHIP_ERROR TestClusterCluster::TestNullableOptionalRequest(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t arg1) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -10243,7 +6559,8 @@ CHIP_ERROR ScenesCluster::ViewScene(Callback::Cancelable * onSuccessCallback, Ca VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, Scenes::Commands::ViewScene::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, + TestCluster::Commands::TestNullableOptionalRequest::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -10254,10 +6571,8 @@ CHIP_ERROR ScenesCluster::ViewScene(Callback::Cancelable * onSuccessCallback, Ca SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // groupId: int16u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), groupId)); - // sceneId: int8u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), sceneId)); + // arg1: int8u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), arg1)); SuccessOrExit(err = sender->FinishCommand()); @@ -10273,112 +6588,8 @@ CHIP_ERROR ScenesCluster::ViewScene(Callback::Cancelable * onSuccessCallback, Ca return err; } -// Scenes Cluster Attributes -CHIP_ERROR ScenesCluster::SubscribeAttributeSceneCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Scenes::Attributes::SceneCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ScenesCluster::ReportAttributeSceneCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Scenes::Attributes::SceneCount::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ScenesCluster::SubscribeAttributeCurrentScene(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Scenes::Attributes::CurrentScene::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ScenesCluster::ReportAttributeCurrentScene(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Scenes::Attributes::CurrentScene::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ScenesCluster::SubscribeAttributeCurrentGroup(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Scenes::Attributes::CurrentGroup::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ScenesCluster::ReportAttributeCurrentGroup(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Scenes::Attributes::CurrentGroup::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ScenesCluster::SubscribeAttributeSceneValid(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Scenes::Attributes::SceneValid::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ScenesCluster::ReportAttributeSceneValid(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Scenes::Attributes::SceneValid::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ScenesCluster::SubscribeAttributeNameSupport(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Scenes::Attributes::NameSupport::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ScenesCluster::ReportAttributeNameSupport(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Scenes::Attributes::NameSupport::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ScenesCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ScenesCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} - -// SoftwareDiagnostics Cluster Commands -CHIP_ERROR SoftwareDiagnosticsCluster::ResetWatermarks(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) +CHIP_ERROR TestClusterCluster::TestSimpleOptionalArgumentRequest(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, bool arg1) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -10391,7 +6602,7 @@ CHIP_ERROR SoftwareDiagnosticsCluster::ResetWatermarks(Callback::Cancelable * on VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, - SoftwareDiagnostics::Commands::ResetWatermarks::Id, + TestCluster::Commands::TestSimpleOptionalArgumentRequest::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -10401,7 +6612,9 @@ CHIP_ERROR SoftwareDiagnosticsCluster::ResetWatermarks(Callback::Cancelable * on SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - // Command takes no arguments. + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // arg1: boolean + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), arg1)); SuccessOrExit(err = sender->FinishCommand()); @@ -10417,165 +6630,7 @@ CHIP_ERROR SoftwareDiagnosticsCluster::ResetWatermarks(Callback::Cancelable * on return err; } -// SoftwareDiagnostics Cluster Attributes -CHIP_ERROR SoftwareDiagnosticsCluster::SubscribeAttributeCurrentHeapFree(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = SoftwareDiagnostics::Attributes::CurrentHeapFree::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR SoftwareDiagnosticsCluster::ReportAttributeCurrentHeapFree(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(SoftwareDiagnostics::Attributes::CurrentHeapFree::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR SoftwareDiagnosticsCluster::SubscribeAttributeCurrentHeapUsed(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = SoftwareDiagnostics::Attributes::CurrentHeapUsed::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR SoftwareDiagnosticsCluster::ReportAttributeCurrentHeapUsed(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(SoftwareDiagnostics::Attributes::CurrentHeapUsed::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR SoftwareDiagnosticsCluster::SubscribeAttributeCurrentHeapHighWatermark(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR SoftwareDiagnosticsCluster::ReportAttributeCurrentHeapHighWatermark(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR SoftwareDiagnosticsCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR SoftwareDiagnosticsCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} - -// Switch Cluster Commands -// Switch Cluster Attributes -CHIP_ERROR SwitchCluster::SubscribeAttributeNumberOfPositions(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Switch::Attributes::NumberOfPositions::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR SwitchCluster::ReportAttributeNumberOfPositions(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Switch::Attributes::NumberOfPositions::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR SwitchCluster::SubscribeAttributeCurrentPosition(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Switch::Attributes::CurrentPosition::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR SwitchCluster::ReportAttributeCurrentPosition(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Switch::Attributes::CurrentPosition::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR SwitchCluster::SubscribeAttributeMultiPressMax(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Switch::Attributes::MultiPressMax::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR SwitchCluster::ReportAttributeMultiPressMax(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Switch::Attributes::MultiPressMax::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR SwitchCluster::SubscribeAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::FeatureMap::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR SwitchCluster::ReportAttributeFeatureMap(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::FeatureMap::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR SwitchCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR SwitchCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} - -// TvChannel Cluster Commands -CHIP_ERROR TvChannelCluster::ChangeChannel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - chip::CharSpan match) +CHIP_ERROR TestClusterCluster::TestSpecific(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -10587,7 +6642,7 @@ CHIP_ERROR TvChannelCluster::ChangeChannel(Callback::Cancelable * onSuccessCallb VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, TvChannel::Commands::ChangeChannel::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, TestCluster::Commands::TestSpecific::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -10597,9 +6652,7 @@ CHIP_ERROR TvChannelCluster::ChangeChannel(Callback::Cancelable * onSuccessCallb SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // match: charString - SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), match)); + // Command takes no arguments. SuccessOrExit(err = sender->FinishCommand()); @@ -10615,9 +6668,9 @@ CHIP_ERROR TvChannelCluster::ChangeChannel(Callback::Cancelable * onSuccessCallb return err; } -CHIP_ERROR TvChannelCluster::ChangeChannelByNumber(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t majorNumber, - uint16_t minorNumber) +CHIP_ERROR TestClusterCluster::TestStructArgumentRequest(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback, uint8_t a, bool b, uint8_t c, + chip::ByteSpan d, chip::CharSpan e, uint8_t f, float g, double h) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -10629,7 +6682,8 @@ CHIP_ERROR TvChannelCluster::ChangeChannelByNumber(Callback::Cancelable * onSucc VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, TvChannel::Commands::ChangeChannelByNumber::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, + TestCluster::Commands::TestStructArgumentRequest::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -10640,10 +6694,22 @@ CHIP_ERROR TvChannelCluster::ChangeChannelByNumber(Callback::Cancelable * onSucc SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // majorNumber: int16u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), majorNumber)); - // minorNumber: int16u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), minorNumber)); + // a: int8u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), a)); + // b: boolean + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), b)); + // c: simpleEnum + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), c)); + // d: octetString + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), d)); + // e: charString + SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), e)); + // f: simpleBitmap + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), f)); + // g: single + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), g)); + // h: double + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), h)); SuccessOrExit(err = sender->FinishCommand()); @@ -10659,8 +6725,8 @@ CHIP_ERROR TvChannelCluster::ChangeChannelByNumber(Callback::Cancelable * onSucc return err; } -CHIP_ERROR TvChannelCluster::SkipChannel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t count) +CHIP_ERROR TestClusterCluster::TestUnknownCommand(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -10672,7 +6738,7 @@ CHIP_ERROR TvChannelCluster::SkipChannel(Callback::Cancelable * onSuccessCallbac VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, TvChannel::Commands::SkipChannel::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, TestCluster::Commands::TestUnknownCommand::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -10682,9 +6748,7 @@ CHIP_ERROR TvChannelCluster::SkipChannel(Callback::Cancelable * onSuccessCallbac SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // count: int16u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), count)); + // Command takes no arguments. SuccessOrExit(err = sender->FinishCommand()); @@ -10700,27 +6764,8 @@ CHIP_ERROR TvChannelCluster::SkipChannel(Callback::Cancelable * onSuccessCallbac return err; } -// TvChannel Cluster Attributes -CHIP_ERROR TvChannelCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TvChannelCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} - -// TargetNavigator Cluster Commands -CHIP_ERROR TargetNavigatorCluster::NavigateTarget(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t target, chip::CharSpan data) +CHIP_ERROR TestClusterCluster::TimedInvokeRequest(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -10732,7 +6777,7 @@ CHIP_ERROR TargetNavigatorCluster::NavigateTarget(Callback::Cancelable * onSucce VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, TargetNavigator::Commands::NavigateTarget::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, TestCluster::Commands::TimedInvokeRequest::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -10742,11 +6787,7 @@ CHIP_ERROR TargetNavigatorCluster::NavigateTarget(Callback::Cancelable * onSucce SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // target: int8u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), target)); - // data: charString - SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), data)); + // Command takes no arguments. SuccessOrExit(err = sender->FinishCommand()); @@ -10762,174 +6803,13 @@ CHIP_ERROR TargetNavigatorCluster::NavigateTarget(Callback::Cancelable * onSucce return err; } -// TargetNavigator Cluster Attributes -CHIP_ERROR TargetNavigatorCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) +// Thermostat Cluster Commands +CHIP_ERROR ThermostatCluster::ClearWeeklySchedule(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) { - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TargetNavigatorCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} - -// TemperatureMeasurement Cluster Commands -// TemperatureMeasurement Cluster Attributes -CHIP_ERROR TemperatureMeasurementCluster::SubscribeAttributeMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TemperatureMeasurement::Attributes::MeasuredValue::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TemperatureMeasurementCluster::ReportAttributeMeasuredValue(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TemperatureMeasurement::Attributes::MeasuredValue::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TemperatureMeasurementCluster::SubscribeAttributeMinMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TemperatureMeasurement::Attributes::MinMeasuredValue::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TemperatureMeasurementCluster::ReportAttributeMinMeasuredValue(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TemperatureMeasurement::Attributes::MinMeasuredValue::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TemperatureMeasurementCluster::SubscribeAttributeMaxMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TemperatureMeasurement::Attributes::MaxMeasuredValue::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TemperatureMeasurementCluster::ReportAttributeMaxMeasuredValue(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TemperatureMeasurement::Attributes::MaxMeasuredValue::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TemperatureMeasurementCluster::SubscribeAttributeTolerance(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TemperatureMeasurement::Attributes::Tolerance::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TemperatureMeasurementCluster::ReportAttributeTolerance(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TemperatureMeasurement::Attributes::Tolerance::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TemperatureMeasurementCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TemperatureMeasurementCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} - -// TestCluster Cluster Commands -CHIP_ERROR TestClusterCluster::SimpleStructEchoRequest(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t a, bool b, uint8_t c, - chip::ByteSpan d, chip::CharSpan e, uint8_t f, float g, double h) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - TLV::TLVWriter * writer = nullptr; - uint8_t argSeqNumber = 0; - - // Used when encoding non-empty command. Suppress error message when encoding empty commands. - (void) writer; - (void) argSeqNumber; - - VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, - TestCluster::Commands::SimpleStructEchoRequest::Id, - (app::CommandPathFlags::kEndpointIdValid) }; - - CommandSenderHandle sender( - Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); - - VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); - - SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - - VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // a: int8u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), a)); - // b: boolean - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), b)); - // c: simpleEnum - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), c)); - // d: octetString - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), d)); - // e: charString - SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), e)); - // f: simpleBitmap - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), f)); - // g: single - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), g)); - // h: double - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), h)); - - SuccessOrExit(err = sender->FinishCommand()); - - // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. - mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); - - SuccessOrExit(err = mDevice->SendCommands(sender.get())); - - // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object - // now. - sender.release(); -exit: - return err; -} - -CHIP_ERROR TestClusterCluster::Test(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - TLV::TLVWriter * writer = nullptr; - uint8_t argSeqNumber = 0; + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; // Used when encoding non-empty command. Suppress error message when encoding empty commands. (void) writer; @@ -10937,7 +6817,7 @@ CHIP_ERROR TestClusterCluster::Test(Callback::Cancelable * onSuccessCallback, Ca VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, TestCluster::Commands::Test::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, Thermostat::Commands::ClearWeeklySchedule::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -10963,94 +6843,7 @@ CHIP_ERROR TestClusterCluster::Test(Callback::Cancelable * onSuccessCallback, Ca return err; } -CHIP_ERROR TestClusterCluster::TestAddArguments(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint8_t arg1, uint8_t arg2) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - TLV::TLVWriter * writer = nullptr; - uint8_t argSeqNumber = 0; - - // Used when encoding non-empty command. Suppress error message when encoding empty commands. - (void) writer; - (void) argSeqNumber; - - VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, TestCluster::Commands::TestAddArguments::Id, - (app::CommandPathFlags::kEndpointIdValid) }; - - CommandSenderHandle sender( - Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); - - VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); - - SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - - VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // arg1: int8u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), arg1)); - // arg2: int8u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), arg2)); - - SuccessOrExit(err = sender->FinishCommand()); - - // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. - mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); - - SuccessOrExit(err = mDevice->SendCommands(sender.get())); - - // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object - // now. - sender.release(); -exit: - return err; -} - -CHIP_ERROR TestClusterCluster::TestEnumsRequest(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - chip::VendorId arg1, uint8_t arg2) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - TLV::TLVWriter * writer = nullptr; - uint8_t argSeqNumber = 0; - - // Used when encoding non-empty command. Suppress error message when encoding empty commands. - (void) writer; - (void) argSeqNumber; - - VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, TestCluster::Commands::TestEnumsRequest::Id, - (app::CommandPathFlags::kEndpointIdValid) }; - - CommandSenderHandle sender( - Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); - - VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); - - SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - - VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // arg1: vendorId - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), arg1)); - // arg2: simpleEnum - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), arg2)); - - SuccessOrExit(err = sender->FinishCommand()); - - // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. - mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); - - SuccessOrExit(err = mDevice->SendCommands(sender.get())); - - // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object - // now. - sender.release(); -exit: - return err; -} - -CHIP_ERROR TestClusterCluster::TestListInt8UArgumentRequest(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t arg1) +CHIP_ERROR ThermostatCluster::GetRelayStatusLog(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -11062,8 +6855,7 @@ CHIP_ERROR TestClusterCluster::TestListInt8UArgumentRequest(Callback::Cancelable VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, - TestCluster::Commands::TestListInt8UArgumentRequest::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, Thermostat::Commands::GetRelayStatusLog::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -11073,9 +6865,7 @@ CHIP_ERROR TestClusterCluster::TestListInt8UArgumentRequest(Callback::Cancelable SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // arg1: int8u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), arg1)); + // Command takes no arguments. SuccessOrExit(err = sender->FinishCommand()); @@ -11091,8 +6881,8 @@ CHIP_ERROR TestClusterCluster::TestListInt8UArgumentRequest(Callback::Cancelable return err; } -CHIP_ERROR TestClusterCluster::TestListInt8UReverseRequest(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t arg1) +CHIP_ERROR ThermostatCluster::GetWeeklySchedule(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t daysToReturn, uint8_t modeToReturn) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -11104,8 +6894,7 @@ CHIP_ERROR TestClusterCluster::TestListInt8UReverseRequest(Callback::Cancelable VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, - TestCluster::Commands::TestListInt8UReverseRequest::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, Thermostat::Commands::GetWeeklySchedule::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -11116,8 +6905,10 @@ CHIP_ERROR TestClusterCluster::TestListInt8UReverseRequest(Callback::Cancelable SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // arg1: int8u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), arg1)); + // daysToReturn: dayOfWeek + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), daysToReturn)); + // modeToReturn: modeForSequence + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), modeToReturn)); SuccessOrExit(err = sender->FinishCommand()); @@ -11133,9 +6924,9 @@ CHIP_ERROR TestClusterCluster::TestListInt8UReverseRequest(Callback::Cancelable return err; } -CHIP_ERROR TestClusterCluster::TestListNestedStructListArgumentRequest(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t a, bool b, - uint32_t e, chip::ByteSpan f, uint8_t g) +CHIP_ERROR ThermostatCluster::SetWeeklySchedule(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t numberOfTransitionsForSequence, uint8_t dayOfWeekForSequence, + uint8_t modeForSequence, uint8_t payload) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -11147,8 +6938,7 @@ CHIP_ERROR TestClusterCluster::TestListNestedStructListArgumentRequest(Callback: VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, - TestCluster::Commands::TestListNestedStructListArgumentRequest::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, Thermostat::Commands::SetWeeklySchedule::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -11159,3380 +6949,31 @@ CHIP_ERROR TestClusterCluster::TestListNestedStructListArgumentRequest(Callback: SuccessOrExit(err = sender->PrepareCommand(cmdParams)); VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // a: int8u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), a)); - // b: boolean - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), b)); - // e: int32u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), e)); - // f: octetString - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), f)); - // g: int8u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), g)); + // numberOfTransitionsForSequence: enum8 + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), numberOfTransitionsForSequence)); + // dayOfWeekForSequence: dayOfWeek + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), dayOfWeekForSequence)); + // modeForSequence: modeForSequence + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), modeForSequence)); + // payload: int8u + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), payload)); SuccessOrExit(err = sender->FinishCommand()); // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. - mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); - - SuccessOrExit(err = mDevice->SendCommands(sender.get())); - - // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object - // now. - sender.release(); -exit: - return err; -} - -CHIP_ERROR TestClusterCluster::TestListStructArgumentRequest(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t a, bool b, uint8_t c, - chip::ByteSpan d, chip::CharSpan e, uint8_t f, float g, double h) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - TLV::TLVWriter * writer = nullptr; - uint8_t argSeqNumber = 0; - - // Used when encoding non-empty command. Suppress error message when encoding empty commands. - (void) writer; - (void) argSeqNumber; - - VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, - TestCluster::Commands::TestListStructArgumentRequest::Id, - (app::CommandPathFlags::kEndpointIdValid) }; - - CommandSenderHandle sender( - Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); - - VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); - - SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - - VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // a: int8u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), a)); - // b: boolean - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), b)); - // c: simpleEnum - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), c)); - // d: octetString - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), d)); - // e: charString - SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), e)); - // f: simpleBitmap - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), f)); - // g: single - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), g)); - // h: double - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), h)); - - SuccessOrExit(err = sender->FinishCommand()); - - // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. - mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); - - SuccessOrExit(err = mDevice->SendCommands(sender.get())); - - // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object - // now. - sender.release(); -exit: - return err; -} - -CHIP_ERROR TestClusterCluster::TestNestedStructArgumentRequest(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t a, bool b) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - TLV::TLVWriter * writer = nullptr; - uint8_t argSeqNumber = 0; - - // Used when encoding non-empty command. Suppress error message when encoding empty commands. - (void) writer; - (void) argSeqNumber; - - VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, - TestCluster::Commands::TestNestedStructArgumentRequest::Id, - (app::CommandPathFlags::kEndpointIdValid) }; - - CommandSenderHandle sender( - Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); - - VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); - - SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - - VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // a: int8u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), a)); - // b: boolean - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), b)); - - SuccessOrExit(err = sender->FinishCommand()); - - // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. - mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); - - SuccessOrExit(err = mDevice->SendCommands(sender.get())); - - // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object - // now. - sender.release(); -exit: - return err; -} - -CHIP_ERROR TestClusterCluster::TestNestedStructListArgumentRequest(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t a, bool b, - uint32_t e, chip::ByteSpan f, uint8_t g) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - TLV::TLVWriter * writer = nullptr; - uint8_t argSeqNumber = 0; - - // Used when encoding non-empty command. Suppress error message when encoding empty commands. - (void) writer; - (void) argSeqNumber; - - VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, - TestCluster::Commands::TestNestedStructListArgumentRequest::Id, - (app::CommandPathFlags::kEndpointIdValid) }; - - CommandSenderHandle sender( - Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); - - VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); - - SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - - VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // a: int8u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), a)); - // b: boolean - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), b)); - // e: int32u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), e)); - // f: octetString - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), f)); - // g: int8u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), g)); - - SuccessOrExit(err = sender->FinishCommand()); - - // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. - mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); - - SuccessOrExit(err = mDevice->SendCommands(sender.get())); - - // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object - // now. - sender.release(); -exit: - return err; -} - -CHIP_ERROR TestClusterCluster::TestNotHandled(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - TLV::TLVWriter * writer = nullptr; - uint8_t argSeqNumber = 0; - - // Used when encoding non-empty command. Suppress error message when encoding empty commands. - (void) writer; - (void) argSeqNumber; - - VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, TestCluster::Commands::TestNotHandled::Id, - (app::CommandPathFlags::kEndpointIdValid) }; - - CommandSenderHandle sender( - Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); - - VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); - - SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - - // Command takes no arguments. - - SuccessOrExit(err = sender->FinishCommand()); - - // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. - mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); - - SuccessOrExit(err = mDevice->SendCommands(sender.get())); - - // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object - // now. - sender.release(); -exit: - return err; -} - -CHIP_ERROR TestClusterCluster::TestNullableOptionalRequest(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t arg1) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - TLV::TLVWriter * writer = nullptr; - uint8_t argSeqNumber = 0; - - // Used when encoding non-empty command. Suppress error message when encoding empty commands. - (void) writer; - (void) argSeqNumber; - - VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, - TestCluster::Commands::TestNullableOptionalRequest::Id, - (app::CommandPathFlags::kEndpointIdValid) }; - - CommandSenderHandle sender( - Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); - - VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); - - SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - - VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // arg1: int8u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), arg1)); - - SuccessOrExit(err = sender->FinishCommand()); - - // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. - mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); - - SuccessOrExit(err = mDevice->SendCommands(sender.get())); - - // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object - // now. - sender.release(); -exit: - return err; -} - -CHIP_ERROR TestClusterCluster::TestSimpleOptionalArgumentRequest(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, bool arg1) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - TLV::TLVWriter * writer = nullptr; - uint8_t argSeqNumber = 0; - - // Used when encoding non-empty command. Suppress error message when encoding empty commands. - (void) writer; - (void) argSeqNumber; - - VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, - TestCluster::Commands::TestSimpleOptionalArgumentRequest::Id, - (app::CommandPathFlags::kEndpointIdValid) }; - - CommandSenderHandle sender( - Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); - - VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); - - SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - - VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // arg1: boolean - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), arg1)); - - SuccessOrExit(err = sender->FinishCommand()); - - // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. - mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); - - SuccessOrExit(err = mDevice->SendCommands(sender.get())); - - // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object - // now. - sender.release(); -exit: - return err; -} - -CHIP_ERROR TestClusterCluster::TestSpecific(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - TLV::TLVWriter * writer = nullptr; - uint8_t argSeqNumber = 0; - - // Used when encoding non-empty command. Suppress error message when encoding empty commands. - (void) writer; - (void) argSeqNumber; - - VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, TestCluster::Commands::TestSpecific::Id, - (app::CommandPathFlags::kEndpointIdValid) }; - - CommandSenderHandle sender( - Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); - - VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); - - SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - - // Command takes no arguments. - - SuccessOrExit(err = sender->FinishCommand()); - - // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. - mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); - - SuccessOrExit(err = mDevice->SendCommands(sender.get())); - - // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object - // now. - sender.release(); -exit: - return err; -} - -CHIP_ERROR TestClusterCluster::TestStructArgumentRequest(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t a, bool b, uint8_t c, - chip::ByteSpan d, chip::CharSpan e, uint8_t f, float g, double h) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - TLV::TLVWriter * writer = nullptr; - uint8_t argSeqNumber = 0; - - // Used when encoding non-empty command. Suppress error message when encoding empty commands. - (void) writer; - (void) argSeqNumber; - - VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, - TestCluster::Commands::TestStructArgumentRequest::Id, - (app::CommandPathFlags::kEndpointIdValid) }; - - CommandSenderHandle sender( - Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); - - VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); - - SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - - VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // a: int8u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), a)); - // b: boolean - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), b)); - // c: simpleEnum - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), c)); - // d: octetString - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), d)); - // e: charString - SuccessOrExit(err = writer->PutString(TLV::ContextTag(argSeqNumber++), e)); - // f: simpleBitmap - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), f)); - // g: single - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), g)); - // h: double - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), h)); - - SuccessOrExit(err = sender->FinishCommand()); - - // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. - mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); - - SuccessOrExit(err = mDevice->SendCommands(sender.get())); - - // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object - // now. - sender.release(); -exit: - return err; -} - -CHIP_ERROR TestClusterCluster::TestUnknownCommand(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - TLV::TLVWriter * writer = nullptr; - uint8_t argSeqNumber = 0; - - // Used when encoding non-empty command. Suppress error message when encoding empty commands. - (void) writer; - (void) argSeqNumber; - - VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, TestCluster::Commands::TestUnknownCommand::Id, - (app::CommandPathFlags::kEndpointIdValid) }; - - CommandSenderHandle sender( - Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); - - VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); - - SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - - // Command takes no arguments. - - SuccessOrExit(err = sender->FinishCommand()); - - // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. - mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); - - SuccessOrExit(err = mDevice->SendCommands(sender.get())); - - // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object - // now. - sender.release(); -exit: - return err; -} - -CHIP_ERROR TestClusterCluster::TimedInvokeRequest(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - TLV::TLVWriter * writer = nullptr; - uint8_t argSeqNumber = 0; - - // Used when encoding non-empty command. Suppress error message when encoding empty commands. - (void) writer; - (void) argSeqNumber; - - VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, TestCluster::Commands::TimedInvokeRequest::Id, - (app::CommandPathFlags::kEndpointIdValid) }; - - CommandSenderHandle sender( - Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); - - VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); - - SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - - // Command takes no arguments. - - SuccessOrExit(err = sender->FinishCommand()); - - // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. - mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); - - SuccessOrExit(err = mDevice->SendCommands(sender.get())); - - // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object - // now. - sender.release(); -exit: - return err; -} - -// TestCluster Cluster Attributes -CHIP_ERROR TestClusterCluster::SubscribeAttributeBoolean(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::Boolean::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeBoolean(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::Boolean::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeBitmap8(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::Bitmap8::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeBitmap8(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::Bitmap8::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeBitmap16(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::Bitmap16::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeBitmap16(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::Bitmap16::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeBitmap32(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::Bitmap32::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeBitmap32(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::Bitmap32::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeBitmap64(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::Bitmap64::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeBitmap64(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::Bitmap64::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeInt8u(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::Int8u::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeInt8u(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::Int8u::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeInt16u(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::Int16u::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeInt16u(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::Int16u::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeInt24u(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::Int24u::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeInt24u(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::Int24u::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeInt32u(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::Int32u::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeInt32u(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::Int32u::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeInt40u(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::Int40u::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeInt40u(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::Int40u::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeInt48u(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::Int48u::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeInt48u(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::Int48u::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeInt56u(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::Int56u::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeInt56u(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::Int56u::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeInt64u(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::Int64u::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeInt64u(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::Int64u::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeInt8s(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::Int8s::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeInt8s(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::Int8s::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeInt16s(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::Int16s::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeInt16s(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::Int16s::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeInt24s(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::Int24s::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeInt24s(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::Int24s::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeInt32s(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::Int32s::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeInt32s(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::Int32s::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeInt40s(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::Int40s::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeInt40s(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::Int40s::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeInt48s(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::Int48s::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeInt48s(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::Int48s::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeInt56s(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::Int56s::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeInt56s(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::Int56s::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeInt64s(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::Int64s::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeInt64s(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::Int64s::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeEnum8(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::Enum8::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeEnum8(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::Enum8::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeEnum16(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::Enum16::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeEnum16(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::Enum16::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeFloatSingle(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::FloatSingle::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeFloatSingle(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::FloatSingle::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeFloatDouble(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::FloatDouble::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeFloatDouble(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::FloatDouble::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeOctetString(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::OctetString::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeOctetString(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::OctetString::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeLongOctetString(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::LongOctetString::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeLongOctetString(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::LongOctetString::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeCharString(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::CharString::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeCharString(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::CharString::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeLongCharString(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::LongCharString::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeLongCharString(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::LongCharString::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeEpochUs(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::EpochUs::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeEpochUs(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::EpochUs::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeEpochS(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::EpochS::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeEpochS(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::EpochS::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeVendorId(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::VendorId::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeVendorId(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::VendorId::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeEnumAttr(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::EnumAttr::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeEnumAttr(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::EnumAttr::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeRangeRestrictedInt8u(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::RangeRestrictedInt8u::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeRangeRestrictedInt8u(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::RangeRestrictedInt8u::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeRangeRestrictedInt8s(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::RangeRestrictedInt8s::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeRangeRestrictedInt8s(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::RangeRestrictedInt8s::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeRangeRestrictedInt16u(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::RangeRestrictedInt16u::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeRangeRestrictedInt16u(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::RangeRestrictedInt16u::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeRangeRestrictedInt16s(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::RangeRestrictedInt16s::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeRangeRestrictedInt16s(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::RangeRestrictedInt16s::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeUnsupported(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::Unsupported::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeUnsupported(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::Unsupported::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeNullableBoolean(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::NullableBoolean::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeNullableBoolean(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::NullableBoolean::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeNullableBitmap8(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::NullableBitmap8::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeNullableBitmap8(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::NullableBitmap8::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeNullableBitmap16(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::NullableBitmap16::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeNullableBitmap16(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::NullableBitmap16::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeNullableBitmap32(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::NullableBitmap32::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeNullableBitmap32(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::NullableBitmap32::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeNullableBitmap64(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::NullableBitmap64::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeNullableBitmap64(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::NullableBitmap64::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeNullableInt8u(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::NullableInt8u::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeNullableInt8u(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::NullableInt8u::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeNullableInt16u(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::NullableInt16u::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeNullableInt16u(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::NullableInt16u::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeNullableInt24u(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::NullableInt24u::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeNullableInt24u(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::NullableInt24u::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeNullableInt32u(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::NullableInt32u::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeNullableInt32u(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::NullableInt32u::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeNullableInt40u(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::NullableInt40u::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeNullableInt40u(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::NullableInt40u::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeNullableInt48u(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::NullableInt48u::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeNullableInt48u(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::NullableInt48u::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeNullableInt56u(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::NullableInt56u::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeNullableInt56u(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::NullableInt56u::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeNullableInt64u(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::NullableInt64u::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeNullableInt64u(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::NullableInt64u::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeNullableInt8s(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::NullableInt8s::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeNullableInt8s(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::NullableInt8s::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeNullableInt16s(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::NullableInt16s::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeNullableInt16s(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::NullableInt16s::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeNullableInt24s(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::NullableInt24s::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeNullableInt24s(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::NullableInt24s::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeNullableInt32s(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::NullableInt32s::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeNullableInt32s(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::NullableInt32s::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeNullableInt40s(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::NullableInt40s::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeNullableInt40s(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::NullableInt40s::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeNullableInt48s(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::NullableInt48s::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeNullableInt48s(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::NullableInt48s::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeNullableInt56s(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::NullableInt56s::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeNullableInt56s(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::NullableInt56s::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeNullableInt64s(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::NullableInt64s::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeNullableInt64s(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::NullableInt64s::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeNullableEnum8(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::NullableEnum8::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeNullableEnum8(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::NullableEnum8::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeNullableEnum16(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::NullableEnum16::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeNullableEnum16(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::NullableEnum16::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeNullableFloatSingle(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::NullableFloatSingle::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeNullableFloatSingle(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::NullableFloatSingle::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeNullableFloatDouble(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::NullableFloatDouble::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeNullableFloatDouble(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::NullableFloatDouble::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeNullableOctetString(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::NullableOctetString::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeNullableOctetString(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::NullableOctetString::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeNullableCharString(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::NullableCharString::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeNullableCharString(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::NullableCharString::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeNullableEnumAttr(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::NullableEnumAttr::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeNullableEnumAttr(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::NullableEnumAttr::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeNullableRangeRestrictedInt8u(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::NullableRangeRestrictedInt8u::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeNullableRangeRestrictedInt8u(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::NullableRangeRestrictedInt8u::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeNullableRangeRestrictedInt8s(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::NullableRangeRestrictedInt8s::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeNullableRangeRestrictedInt8s(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::NullableRangeRestrictedInt8s::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeNullableRangeRestrictedInt16u(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::NullableRangeRestrictedInt16u::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeNullableRangeRestrictedInt16u(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::NullableRangeRestrictedInt16u::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeNullableRangeRestrictedInt16s(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TestCluster::Attributes::NullableRangeRestrictedInt16s::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeNullableRangeRestrictedInt16s(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TestCluster::Attributes::NullableRangeRestrictedInt16s::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TestClusterCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} - -// Thermostat Cluster Commands -CHIP_ERROR ThermostatCluster::ClearWeeklySchedule(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - TLV::TLVWriter * writer = nullptr; - uint8_t argSeqNumber = 0; - - // Used when encoding non-empty command. Suppress error message when encoding empty commands. - (void) writer; - (void) argSeqNumber; - - VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, Thermostat::Commands::ClearWeeklySchedule::Id, - (app::CommandPathFlags::kEndpointIdValid) }; - - CommandSenderHandle sender( - Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); - - VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); - - SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - - // Command takes no arguments. - - SuccessOrExit(err = sender->FinishCommand()); - - // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. - mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); - - SuccessOrExit(err = mDevice->SendCommands(sender.get())); - - // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object - // now. - sender.release(); -exit: - return err; -} - -CHIP_ERROR ThermostatCluster::GetRelayStatusLog(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - TLV::TLVWriter * writer = nullptr; - uint8_t argSeqNumber = 0; - - // Used when encoding non-empty command. Suppress error message when encoding empty commands. - (void) writer; - (void) argSeqNumber; - - VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, Thermostat::Commands::GetRelayStatusLog::Id, - (app::CommandPathFlags::kEndpointIdValid) }; - - CommandSenderHandle sender( - Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); - - VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); - - SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - - // Command takes no arguments. - - SuccessOrExit(err = sender->FinishCommand()); - - // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. - mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); - - SuccessOrExit(err = mDevice->SendCommands(sender.get())); - - // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object - // now. - sender.release(); -exit: - return err; -} - -CHIP_ERROR ThermostatCluster::GetWeeklySchedule(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint8_t daysToReturn, uint8_t modeToReturn) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - TLV::TLVWriter * writer = nullptr; - uint8_t argSeqNumber = 0; - - // Used when encoding non-empty command. Suppress error message when encoding empty commands. - (void) writer; - (void) argSeqNumber; - - VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, Thermostat::Commands::GetWeeklySchedule::Id, - (app::CommandPathFlags::kEndpointIdValid) }; - - CommandSenderHandle sender( - Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); - - VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); - - SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - - VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // daysToReturn: dayOfWeek - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), daysToReturn)); - // modeToReturn: modeForSequence - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), modeToReturn)); - - SuccessOrExit(err = sender->FinishCommand()); - - // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. - mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); - - SuccessOrExit(err = mDevice->SendCommands(sender.get())); - - // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object - // now. - sender.release(); -exit: - return err; -} - -CHIP_ERROR ThermostatCluster::SetWeeklySchedule(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint8_t numberOfTransitionsForSequence, uint8_t dayOfWeekForSequence, - uint8_t modeForSequence, uint8_t payload) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - TLV::TLVWriter * writer = nullptr; - uint8_t argSeqNumber = 0; - - // Used when encoding non-empty command. Suppress error message when encoding empty commands. - (void) writer; - (void) argSeqNumber; - - VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, Thermostat::Commands::SetWeeklySchedule::Id, - (app::CommandPathFlags::kEndpointIdValid) }; - - CommandSenderHandle sender( - Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); - - VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); - - SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - - VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // numberOfTransitionsForSequence: enum8 - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), numberOfTransitionsForSequence)); - // dayOfWeekForSequence: dayOfWeek - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), dayOfWeekForSequence)); - // modeForSequence: modeForSequence - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), modeForSequence)); - // payload: int8u - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), payload)); - - SuccessOrExit(err = sender->FinishCommand()); - - // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. - mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); - - SuccessOrExit(err = mDevice->SendCommands(sender.get())); - - // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object - // now. - sender.release(); -exit: - return err; -} - -CHIP_ERROR ThermostatCluster::SetpointRaiseLower(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint8_t mode, int8_t amount) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - TLV::TLVWriter * writer = nullptr; - uint8_t argSeqNumber = 0; - - // Used when encoding non-empty command. Suppress error message when encoding empty commands. - (void) writer; - (void) argSeqNumber; - - VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, Thermostat::Commands::SetpointRaiseLower::Id, - (app::CommandPathFlags::kEndpointIdValid) }; - - CommandSenderHandle sender( - Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); - - VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); - - SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - - VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // mode: setpointAdjustMode - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), mode)); - // amount: int8s - SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), amount)); - - SuccessOrExit(err = sender->FinishCommand()); - - // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. - mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); - - SuccessOrExit(err = mDevice->SendCommands(sender.get())); - - // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object - // now. - sender.release(); -exit: - return err; -} - -// Thermostat Cluster Attributes -CHIP_ERROR ThermostatCluster::SubscribeAttributeLocalTemperature(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Thermostat::Attributes::LocalTemperature::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThermostatCluster::ReportAttributeLocalTemperature(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Thermostat::Attributes::LocalTemperature::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThermostatCluster::SubscribeAttributeAbsMinHeatSetpointLimit(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Thermostat::Attributes::AbsMinHeatSetpointLimit::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThermostatCluster::ReportAttributeAbsMinHeatSetpointLimit(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Thermostat::Attributes::AbsMinHeatSetpointLimit::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThermostatCluster::SubscribeAttributeAbsMaxHeatSetpointLimit(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Thermostat::Attributes::AbsMaxHeatSetpointLimit::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThermostatCluster::ReportAttributeAbsMaxHeatSetpointLimit(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Thermostat::Attributes::AbsMaxHeatSetpointLimit::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThermostatCluster::SubscribeAttributeAbsMinCoolSetpointLimit(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Thermostat::Attributes::AbsMinCoolSetpointLimit::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThermostatCluster::ReportAttributeAbsMinCoolSetpointLimit(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Thermostat::Attributes::AbsMinCoolSetpointLimit::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThermostatCluster::SubscribeAttributeAbsMaxCoolSetpointLimit(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Thermostat::Attributes::AbsMaxCoolSetpointLimit::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThermostatCluster::ReportAttributeAbsMaxCoolSetpointLimit(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Thermostat::Attributes::AbsMaxCoolSetpointLimit::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThermostatCluster::SubscribeAttributeOccupiedCoolingSetpoint(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Thermostat::Attributes::OccupiedCoolingSetpoint::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThermostatCluster::ReportAttributeOccupiedCoolingSetpoint(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Thermostat::Attributes::OccupiedCoolingSetpoint::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThermostatCluster::SubscribeAttributeOccupiedHeatingSetpoint(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Thermostat::Attributes::OccupiedHeatingSetpoint::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThermostatCluster::ReportAttributeOccupiedHeatingSetpoint(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Thermostat::Attributes::OccupiedHeatingSetpoint::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThermostatCluster::SubscribeAttributeMinHeatSetpointLimit(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Thermostat::Attributes::MinHeatSetpointLimit::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThermostatCluster::ReportAttributeMinHeatSetpointLimit(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Thermostat::Attributes::MinHeatSetpointLimit::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThermostatCluster::SubscribeAttributeMaxHeatSetpointLimit(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Thermostat::Attributes::MaxHeatSetpointLimit::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThermostatCluster::ReportAttributeMaxHeatSetpointLimit(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Thermostat::Attributes::MaxHeatSetpointLimit::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThermostatCluster::SubscribeAttributeMinCoolSetpointLimit(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Thermostat::Attributes::MinCoolSetpointLimit::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThermostatCluster::ReportAttributeMinCoolSetpointLimit(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Thermostat::Attributes::MinCoolSetpointLimit::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThermostatCluster::SubscribeAttributeMaxCoolSetpointLimit(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Thermostat::Attributes::MaxCoolSetpointLimit::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThermostatCluster::ReportAttributeMaxCoolSetpointLimit(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Thermostat::Attributes::MaxCoolSetpointLimit::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThermostatCluster::SubscribeAttributeMinSetpointDeadBand(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Thermostat::Attributes::MinSetpointDeadBand::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThermostatCluster::ReportAttributeMinSetpointDeadBand(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Thermostat::Attributes::MinSetpointDeadBand::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThermostatCluster::SubscribeAttributeControlSequenceOfOperation(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Thermostat::Attributes::ControlSequenceOfOperation::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThermostatCluster::ReportAttributeControlSequenceOfOperation(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Thermostat::Attributes::ControlSequenceOfOperation::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThermostatCluster::SubscribeAttributeSystemMode(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Thermostat::Attributes::SystemMode::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThermostatCluster::ReportAttributeSystemMode(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Thermostat::Attributes::SystemMode::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThermostatCluster::SubscribeAttributeStartOfWeek(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Thermostat::Attributes::StartOfWeek::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThermostatCluster::ReportAttributeStartOfWeek(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Thermostat::Attributes::StartOfWeek::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThermostatCluster::SubscribeAttributeNumberOfWeeklyTransitions(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Thermostat::Attributes::NumberOfWeeklyTransitions::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThermostatCluster::ReportAttributeNumberOfWeeklyTransitions(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Thermostat::Attributes::NumberOfWeeklyTransitions::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThermostatCluster::SubscribeAttributeNumberOfDailyTransitions(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Thermostat::Attributes::NumberOfDailyTransitions::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThermostatCluster::ReportAttributeNumberOfDailyTransitions(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Thermostat::Attributes::NumberOfDailyTransitions::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThermostatCluster::SubscribeAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::FeatureMap::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThermostatCluster::ReportAttributeFeatureMap(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::FeatureMap::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThermostatCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThermostatCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} - -// ThermostatUserInterfaceConfiguration Cluster Commands -// ThermostatUserInterfaceConfiguration Cluster Attributes -CHIP_ERROR ThermostatUserInterfaceConfigurationCluster::SubscribeAttributeTemperatureDisplayMode( - Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR -ThermostatUserInterfaceConfigurationCluster::ReportAttributeTemperatureDisplayMode(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThermostatUserInterfaceConfigurationCluster::SubscribeAttributeKeypadLockout(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThermostatUserInterfaceConfigurationCluster::ReportAttributeKeypadLockout(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThermostatUserInterfaceConfiguration::Attributes::KeypadLockout::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThermostatUserInterfaceConfigurationCluster::SubscribeAttributeScheduleProgrammingVisibility( - Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR -ThermostatUserInterfaceConfigurationCluster::ReportAttributeScheduleProgrammingVisibility(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThermostatUserInterfaceConfiguration::Attributes::ScheduleProgrammingVisibility::Id, - onReportCallback, BasicAttributeFilter); -} - -CHIP_ERROR ThermostatUserInterfaceConfigurationCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThermostatUserInterfaceConfigurationCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} - -// ThreadNetworkDiagnostics Cluster Commands -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ResetCounts(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) -{ - CHIP_ERROR err = CHIP_NO_ERROR; - TLV::TLVWriter * writer = nullptr; - uint8_t argSeqNumber = 0; - - // Used when encoding non-empty command. Suppress error message when encoding empty commands. - (void) writer; - (void) argSeqNumber; - - VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, - ThreadNetworkDiagnostics::Commands::ResetCounts::Id, - (app::CommandPathFlags::kEndpointIdValid) }; - - CommandSenderHandle sender( - Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); - - VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); - - SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - - // Command takes no arguments. - - SuccessOrExit(err = sender->FinishCommand()); - - // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. - mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); - - SuccessOrExit(err = mDevice->SendCommands(sender.get())); - - // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object - // now. - sender.release(); -exit: - return err; -} - -// ThreadNetworkDiagnostics Cluster Attributes -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeChannel(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::Channel::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeChannel(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::Channel::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeRoutingRole(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::RoutingRole::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeRoutingRole(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::RoutingRole::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeNetworkName(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::NetworkName::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeNetworkName(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::NetworkName::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributePanId(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::PanId::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributePanId(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::PanId::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeExtendedPanId(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::ExtendedPanId::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeExtendedPanId(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::ExtendedPanId::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeMeshLocalPrefix(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeMeshLocalPrefix(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeOverrunCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::OverrunCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeOverrunCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::OverrunCount::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributePartitionId(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::PartitionId::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributePartitionId(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::PartitionId::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeWeighting(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::Weighting::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeWeighting(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::Weighting::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeDataVersion(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::DataVersion::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeDataVersion(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::DataVersion::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeStableDataVersion(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::StableDataVersion::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeStableDataVersion(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::StableDataVersion::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeLeaderRouterId(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::LeaderRouterId::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeLeaderRouterId(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::LeaderRouterId::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeDetachedRoleCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeDetachedRoleCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeChildRoleCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::ChildRoleCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeChildRoleCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::ChildRoleCount::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeRouterRoleCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::RouterRoleCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeRouterRoleCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::RouterRoleCount::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeLeaderRoleCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeLeaderRoleCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeAttachAttemptCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeAttachAttemptCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributePartitionIdChangeCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributePartitionIdChangeCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeBetterPartitionAttachAttemptCount( - Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR -ThreadNetworkDiagnosticsCluster::ReportAttributeBetterPartitionAttachAttemptCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeParentChangeCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::ParentChangeCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeParentChangeCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::ParentChangeCount::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeTxTotalCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::TxTotalCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeTxTotalCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::TxTotalCount::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeTxUnicastCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::TxUnicastCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeTxUnicastCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::TxUnicastCount::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeTxBroadcastCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeTxBroadcastCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeTxAckRequestedCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeTxAckRequestedCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeTxAckedCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::TxAckedCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeTxAckedCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::TxAckedCount::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeTxNoAckRequestedCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeTxNoAckRequestedCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeTxDataCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::TxDataCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeTxDataCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::TxDataCount::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeTxDataPollCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::TxDataPollCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeTxDataPollCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::TxDataPollCount::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeTxBeaconCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::TxBeaconCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeTxBeaconCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::TxBeaconCount::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeTxBeaconRequestCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeTxBeaconRequestCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeTxOtherCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::TxOtherCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeTxOtherCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::TxOtherCount::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeTxRetryCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::TxRetryCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeTxRetryCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::TxRetryCount::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeTxDirectMaxRetryExpiryCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeTxDirectMaxRetryExpiryCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeTxIndirectMaxRetryExpiryCount( - Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeTxIndirectMaxRetryExpiryCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeTxErrCcaCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeTxErrCcaCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeTxErrAbortCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeTxErrAbortCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeTxErrBusyChannelCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeTxErrBusyChannelCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeRxTotalCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::RxTotalCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeRxTotalCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::RxTotalCount::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeRxUnicastCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::RxUnicastCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeRxUnicastCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::RxUnicastCount::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeRxBroadcastCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeRxBroadcastCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeRxDataCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::RxDataCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeRxDataCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::RxDataCount::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeRxDataPollCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::RxDataPollCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeRxDataPollCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::RxDataPollCount::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeRxBeaconCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::RxBeaconCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeRxBeaconCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::RxBeaconCount::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeRxBeaconRequestCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeRxBeaconRequestCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeRxOtherCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::RxOtherCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeRxOtherCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::RxOtherCount::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeRxAddressFilteredCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeRxAddressFilteredCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeRxDestAddrFilteredCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeRxDestAddrFilteredCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeRxDuplicatedCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeRxDuplicatedCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeRxErrNoFrameCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeRxErrNoFrameCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeRxErrUnknownNeighborCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeRxErrUnknownNeighborCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeRxErrInvalidSrcAddrCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeRxErrInvalidSrcAddrCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeRxErrSecCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::RxErrSecCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeRxErrSecCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::RxErrSecCount::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeRxErrFcsCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeRxErrFcsCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeRxErrOtherCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeRxErrOtherCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeActiveTimestamp(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeActiveTimestamp(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributePendingTimestamp(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::PendingTimestamp::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributePendingTimestamp(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::PendingTimestamp::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeDelay(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::Delay::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeDelay(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::Delay::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeChannelMask(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = ThreadNetworkDiagnostics::Attributes::ChannelMask::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeChannelMask(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(ThreadNetworkDiagnostics::Attributes::ChannelMask::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} - -// UserLabel Cluster Commands -// UserLabel Cluster Attributes - -// WakeOnLan Cluster Commands -// WakeOnLan Cluster Attributes -CHIP_ERROR WakeOnLanCluster::SubscribeAttributeWakeOnLanMacAddress(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = WakeOnLan::Attributes::WakeOnLanMacAddress::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR WakeOnLanCluster::ReportAttributeWakeOnLanMacAddress(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(WakeOnLan::Attributes::WakeOnLanMacAddress::Id, onReportCallback, - BasicAttributeFilter); -} + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); -CHIP_ERROR WakeOnLanCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = mDevice->SendCommands(sender.get())); -CHIP_ERROR WakeOnLanCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; } -// WiFiNetworkDiagnostics Cluster Commands -CHIP_ERROR WiFiNetworkDiagnosticsCluster::ResetCounts(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback) +CHIP_ERROR ThermostatCluster::SetpointRaiseLower(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, + uint8_t mode, int8_t amount) { CHIP_ERROR err = CHIP_NO_ERROR; TLV::TLVWriter * writer = nullptr; @@ -14544,7 +6985,7 @@ CHIP_ERROR WiFiNetworkDiagnosticsCluster::ResetCounts(Callback::Cancelable * onS VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); - app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, WiFiNetworkDiagnostics::Commands::ResetCounts::Id, + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, Thermostat::Commands::SetpointRaiseLower::Id, (app::CommandPathFlags::kEndpointIdValid) }; CommandSenderHandle sender( @@ -14554,7 +6995,11 @@ CHIP_ERROR WiFiNetworkDiagnosticsCluster::ResetCounts(Callback::Cancelable * onS SuccessOrExit(err = sender->PrepareCommand(cmdParams)); - // Command takes no arguments. + VerifyOrExit((writer = sender->GetCommandDataIBTLVWriter()) != nullptr, err = CHIP_ERROR_INCORRECT_STATE); + // mode: setpointAdjustMode + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), mode)); + // amount: int8s + SuccessOrExit(err = writer->Put(TLV::ContextTag(argSeqNumber++), amount)); SuccessOrExit(err = sender->FinishCommand()); @@ -14570,243 +7015,91 @@ CHIP_ERROR WiFiNetworkDiagnosticsCluster::ResetCounts(Callback::Cancelable * onS return err; } -// WiFiNetworkDiagnostics Cluster Attributes -CHIP_ERROR WiFiNetworkDiagnosticsCluster::SubscribeAttributeBssid(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = WiFiNetworkDiagnostics::Attributes::Bssid::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR WiFiNetworkDiagnosticsCluster::ReportAttributeBssid(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(WiFiNetworkDiagnostics::Attributes::Bssid::Id, onReportCallback, - BasicAttributeFilter); -} +// ThermostatUserInterfaceConfiguration Cluster Commands -CHIP_ERROR WiFiNetworkDiagnosticsCluster::SubscribeAttributeSecurityType(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) +// ThreadNetworkDiagnostics Cluster Commands +CHIP_ERROR ThreadNetworkDiagnosticsCluster::ResetCounts(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) { - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = WiFiNetworkDiagnostics::Attributes::SecurityType::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; -CHIP_ERROR WiFiNetworkDiagnosticsCluster::ReportAttributeSecurityType(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(WiFiNetworkDiagnostics::Attributes::SecurityType::Id, onReportCallback, - BasicAttributeFilter); -} + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; -CHIP_ERROR WiFiNetworkDiagnosticsCluster::SubscribeAttributeWiFiVersion(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = WiFiNetworkDiagnostics::Attributes::WiFiVersion::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); -CHIP_ERROR WiFiNetworkDiagnosticsCluster::ReportAttributeWiFiVersion(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(WiFiNetworkDiagnostics::Attributes::WiFiVersion::Id, onReportCallback, - BasicAttributeFilter); -} + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, + ThreadNetworkDiagnostics::Commands::ResetCounts::Id, + (app::CommandPathFlags::kEndpointIdValid) }; -CHIP_ERROR WiFiNetworkDiagnosticsCluster::SubscribeAttributeChannelNumber(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = WiFiNetworkDiagnostics::Attributes::ChannelNumber::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); -CHIP_ERROR WiFiNetworkDiagnosticsCluster::ReportAttributeChannelNumber(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(WiFiNetworkDiagnostics::Attributes::ChannelNumber::Id, onReportCallback, - BasicAttributeFilter); -} + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); -CHIP_ERROR WiFiNetworkDiagnosticsCluster::SubscribeAttributeRssi(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = WiFiNetworkDiagnostics::Attributes::Rssi::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); -CHIP_ERROR WiFiNetworkDiagnosticsCluster::ReportAttributeRssi(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(WiFiNetworkDiagnostics::Attributes::Rssi::Id, onReportCallback, - BasicAttributeFilter); -} + // Command takes no arguments. -CHIP_ERROR WiFiNetworkDiagnosticsCluster::SubscribeAttributeBeaconLostCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = WiFiNetworkDiagnostics::Attributes::BeaconLostCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = sender->FinishCommand()); -CHIP_ERROR WiFiNetworkDiagnosticsCluster::ReportAttributeBeaconLostCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(WiFiNetworkDiagnostics::Attributes::BeaconLostCount::Id, onReportCallback, - BasicAttributeFilter); -} + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); -CHIP_ERROR WiFiNetworkDiagnosticsCluster::SubscribeAttributeBeaconRxCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = WiFiNetworkDiagnostics::Attributes::BeaconRxCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = mDevice->SendCommands(sender.get())); -CHIP_ERROR WiFiNetworkDiagnosticsCluster::ReportAttributeBeaconRxCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(WiFiNetworkDiagnostics::Attributes::BeaconRxCount::Id, onReportCallback, - BasicAttributeFilter); + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; } -CHIP_ERROR WiFiNetworkDiagnosticsCluster::SubscribeAttributePacketMulticastRxCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} +// UserLabel Cluster Commands -CHIP_ERROR WiFiNetworkDiagnosticsCluster::ReportAttributePacketMulticastRxCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::Id, onReportCallback, - BasicAttributeFilter); -} +// WakeOnLan Cluster Commands -CHIP_ERROR WiFiNetworkDiagnosticsCluster::SubscribeAttributePacketMulticastTxCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) +// WiFiNetworkDiagnostics Cluster Commands +CHIP_ERROR WiFiNetworkDiagnosticsCluster::ResetCounts(Callback::Cancelable * onSuccessCallback, + Callback::Cancelable * onFailureCallback) { - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + CHIP_ERROR err = CHIP_NO_ERROR; + TLV::TLVWriter * writer = nullptr; + uint8_t argSeqNumber = 0; -CHIP_ERROR WiFiNetworkDiagnosticsCluster::ReportAttributePacketMulticastTxCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::Id, onReportCallback, - BasicAttributeFilter); -} + // Used when encoding non-empty command. Suppress error message when encoding empty commands. + (void) writer; + (void) argSeqNumber; -CHIP_ERROR WiFiNetworkDiagnosticsCluster::SubscribeAttributePacketUnicastRxCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + VerifyOrReturnError(mDevice != nullptr, CHIP_ERROR_INCORRECT_STATE); -CHIP_ERROR WiFiNetworkDiagnosticsCluster::ReportAttributePacketUnicastRxCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::Id, onReportCallback, - BasicAttributeFilter); -} + app::CommandPathParams cmdParams = { mEndpoint, /* group id */ 0, mClusterId, WiFiNetworkDiagnostics::Commands::ResetCounts::Id, + (app::CommandPathFlags::kEndpointIdValid) }; -CHIP_ERROR WiFiNetworkDiagnosticsCluster::SubscribeAttributePacketUnicastTxCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + CommandSenderHandle sender( + Platform::New(mDevice->GetInteractionModelDelegate(), mDevice->GetExchangeManager())); -CHIP_ERROR WiFiNetworkDiagnosticsCluster::ReportAttributePacketUnicastTxCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::Id, onReportCallback, - BasicAttributeFilter); -} + VerifyOrReturnError(sender != nullptr, CHIP_ERROR_NO_MEMORY); -CHIP_ERROR WiFiNetworkDiagnosticsCluster::SubscribeAttributeCurrentMaxRate(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = sender->PrepareCommand(cmdParams)); -CHIP_ERROR WiFiNetworkDiagnosticsCluster::ReportAttributeCurrentMaxRate(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::Id, onReportCallback, - BasicAttributeFilter); -} + // Command takes no arguments. -CHIP_ERROR WiFiNetworkDiagnosticsCluster::SubscribeAttributeOverrunCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = WiFiNetworkDiagnostics::Attributes::OverrunCount::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = sender->FinishCommand()); -CHIP_ERROR WiFiNetworkDiagnosticsCluster::ReportAttributeOverrunCount(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(WiFiNetworkDiagnostics::Attributes::OverrunCount::Id, onReportCallback, - BasicAttributeFilter); -} + // #6308: This is a temporary solution before we fully support IM on application side and should be replaced by IMDelegate. + mDevice->AddIMResponseHandler(sender.get(), onSuccessCallback, onFailureCallback); -CHIP_ERROR WiFiNetworkDiagnosticsCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} + SuccessOrExit(err = mDevice->SendCommands(sender.get())); -CHIP_ERROR WiFiNetworkDiagnosticsCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); + // We have successfully sent the command, and the callback handler will be responsible to free the object, release the object + // now. + sender.release(); +exit: + return err; } // WindowCovering Cluster Commands @@ -15094,346 +7387,5 @@ CHIP_ERROR WindowCoveringCluster::UpOrOpen(Callback::Cancelable * onSuccessCallb return err; } -// WindowCovering Cluster Attributes -CHIP_ERROR WindowCoveringCluster::SubscribeAttributeType(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = WindowCovering::Attributes::Type::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR WindowCoveringCluster::ReportAttributeType(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(WindowCovering::Attributes::Type::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR WindowCoveringCluster::SubscribeAttributeCurrentPositionLift(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = WindowCovering::Attributes::CurrentPositionLift::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR WindowCoveringCluster::ReportAttributeCurrentPositionLift(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(WindowCovering::Attributes::CurrentPositionLift::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR WindowCoveringCluster::SubscribeAttributeCurrentPositionTilt(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = WindowCovering::Attributes::CurrentPositionTilt::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR WindowCoveringCluster::ReportAttributeCurrentPositionTilt(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(WindowCovering::Attributes::CurrentPositionTilt::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR WindowCoveringCluster::SubscribeAttributeConfigStatus(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = WindowCovering::Attributes::ConfigStatus::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR WindowCoveringCluster::ReportAttributeConfigStatus(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(WindowCovering::Attributes::ConfigStatus::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR WindowCoveringCluster::SubscribeAttributeCurrentPositionLiftPercentage(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = WindowCovering::Attributes::CurrentPositionLiftPercentage::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR WindowCoveringCluster::ReportAttributeCurrentPositionLiftPercentage(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(WindowCovering::Attributes::CurrentPositionLiftPercentage::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR WindowCoveringCluster::SubscribeAttributeCurrentPositionTiltPercentage(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = WindowCovering::Attributes::CurrentPositionTiltPercentage::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR WindowCoveringCluster::ReportAttributeCurrentPositionTiltPercentage(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(WindowCovering::Attributes::CurrentPositionTiltPercentage::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR WindowCoveringCluster::SubscribeAttributeOperationalStatus(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = WindowCovering::Attributes::OperationalStatus::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR WindowCoveringCluster::ReportAttributeOperationalStatus(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(WindowCovering::Attributes::OperationalStatus::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR WindowCoveringCluster::SubscribeAttributeTargetPositionLiftPercent100ths(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = WindowCovering::Attributes::TargetPositionLiftPercent100ths::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR WindowCoveringCluster::ReportAttributeTargetPositionLiftPercent100ths(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(WindowCovering::Attributes::TargetPositionLiftPercent100ths::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR WindowCoveringCluster::SubscribeAttributeTargetPositionTiltPercent100ths(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = WindowCovering::Attributes::TargetPositionTiltPercent100ths::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR WindowCoveringCluster::ReportAttributeTargetPositionTiltPercent100ths(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(WindowCovering::Attributes::TargetPositionTiltPercent100ths::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR WindowCoveringCluster::SubscribeAttributeEndProductType(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = WindowCovering::Attributes::EndProductType::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR WindowCoveringCluster::ReportAttributeEndProductType(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(WindowCovering::Attributes::EndProductType::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR WindowCoveringCluster::SubscribeAttributeCurrentPositionLiftPercent100ths(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = WindowCovering::Attributes::CurrentPositionLiftPercent100ths::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR WindowCoveringCluster::ReportAttributeCurrentPositionLiftPercent100ths(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(WindowCovering::Attributes::CurrentPositionLiftPercent100ths::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR WindowCoveringCluster::SubscribeAttributeCurrentPositionTiltPercent100ths(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = WindowCovering::Attributes::CurrentPositionTiltPercent100ths::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR WindowCoveringCluster::ReportAttributeCurrentPositionTiltPercent100ths(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(WindowCovering::Attributes::CurrentPositionTiltPercent100ths::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR WindowCoveringCluster::SubscribeAttributeInstalledOpenLimitLift(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = WindowCovering::Attributes::InstalledOpenLimitLift::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR WindowCoveringCluster::ReportAttributeInstalledOpenLimitLift(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(WindowCovering::Attributes::InstalledOpenLimitLift::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR WindowCoveringCluster::SubscribeAttributeInstalledClosedLimitLift(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = WindowCovering::Attributes::InstalledClosedLimitLift::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR WindowCoveringCluster::ReportAttributeInstalledClosedLimitLift(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(WindowCovering::Attributes::InstalledClosedLimitLift::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR WindowCoveringCluster::SubscribeAttributeInstalledOpenLimitTilt(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = WindowCovering::Attributes::InstalledOpenLimitTilt::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR WindowCoveringCluster::ReportAttributeInstalledOpenLimitTilt(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(WindowCovering::Attributes::InstalledOpenLimitTilt::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR WindowCoveringCluster::SubscribeAttributeInstalledClosedLimitTilt(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = WindowCovering::Attributes::InstalledClosedLimitTilt::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR WindowCoveringCluster::ReportAttributeInstalledClosedLimitTilt(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(WindowCovering::Attributes::InstalledClosedLimitTilt::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR WindowCoveringCluster::SubscribeAttributeMode(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = WindowCovering::Attributes::Mode::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR WindowCoveringCluster::ReportAttributeMode(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(WindowCovering::Attributes::Mode::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR WindowCoveringCluster::SubscribeAttributeSafetyStatus(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = WindowCovering::Attributes::SafetyStatus::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR WindowCoveringCluster::ReportAttributeSafetyStatus(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(WindowCovering::Attributes::SafetyStatus::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR WindowCoveringCluster::SubscribeAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::FeatureMap::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR WindowCoveringCluster::ReportAttributeFeatureMap(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::FeatureMap::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR WindowCoveringCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR WindowCoveringCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} - } // namespace Controller } // namespace chip diff --git a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h index a0a56519efc3b0..8941ab09228115 100644 --- a/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h +++ b/zzz_generated/controller-clusters/zap-generated/CHIPClusters.h @@ -35,8 +35,6 @@ class DLL_EXPORT AccessControlCluster : public ClusterBase public: AccessControlCluster() : ClusterBase(app::Clusters::AccessControl::Id) {} ~AccessControlCluster() {} - - // Cluster Attributes }; class DLL_EXPORT AccountLoginCluster : public ClusterBase @@ -51,13 +49,6 @@ class DLL_EXPORT AccountLoginCluster : public ClusterBase CHIP_ERROR Login(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, chip::CharSpan tempAccountIdentifier, chip::CharSpan setupPIN); CHIP_ERROR Logout(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); - -private: }; class DLL_EXPORT AdministratorCommissioningCluster : public ClusterBase @@ -73,13 +64,6 @@ class DLL_EXPORT AdministratorCommissioningCluster : public ClusterBase uint16_t commissioningTimeout, chip::ByteSpan PAKEVerifier, uint16_t discriminator, uint32_t iterations, chip::ByteSpan salt, uint16_t passcodeID); CHIP_ERROR RevokeCommissioning(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); - -private: }; class DLL_EXPORT ApplicationBasicCluster : public ClusterBase @@ -90,33 +74,6 @@ class DLL_EXPORT ApplicationBasicCluster : public ClusterBase // Cluster Commands CHIP_ERROR ChangeStatus(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t status); - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeVendorName(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeVendorName(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeVendorId(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeVendorId(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeApplicationName(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeApplicationName(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeProductId(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeProductId(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeApplicationStatus(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeApplicationStatus(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeApplicationVersion(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeApplicationVersion(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); - -private: }; class DLL_EXPORT ApplicationLauncherCluster : public ClusterBase @@ -132,13 +89,6 @@ class DLL_EXPORT ApplicationLauncherCluster : public ClusterBase uint16_t catalogVendorId, chip::CharSpan applicationId); CHIP_ERROR StopApp(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t catalogVendorId, chip::CharSpan applicationId); - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); - -private: }; class DLL_EXPORT AudioOutputCluster : public ClusterBase @@ -151,17 +101,6 @@ class DLL_EXPORT AudioOutputCluster : public ClusterBase CHIP_ERROR RenameOutput(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t index, chip::CharSpan name); CHIP_ERROR SelectOutput(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t index); - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeCurrentAudioOutput(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeCurrentAudioOutput(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); - -private: }; class DLL_EXPORT BarrierControlCluster : public ClusterBase @@ -174,28 +113,6 @@ class DLL_EXPORT BarrierControlCluster : public ClusterBase CHIP_ERROR BarrierControlGoToPercent(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t percentOpen); CHIP_ERROR BarrierControlStop(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeBarrierMovingState(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeBarrierMovingState(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeBarrierSafetyStatus(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeBarrierSafetyStatus(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeBarrierCapabilities(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeBarrierCapabilities(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeBarrierPosition(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeBarrierPosition(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); - -private: }; class DLL_EXPORT BasicCluster : public ClusterBase @@ -206,72 +123,6 @@ class DLL_EXPORT BasicCluster : public ClusterBase // Cluster Commands CHIP_ERROR MfgSpecificPing(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeInteractionModelVersion(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeInteractionModelVersion(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeVendorName(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeVendorName(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeVendorID(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeVendorID(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeProductName(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeProductName(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeProductID(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeProductID(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeNodeLabel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeNodeLabel(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeLocation(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeLocation(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeHardwareVersion(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeHardwareVersion(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeHardwareVersionString(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeHardwareVersionString(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeSoftwareVersion(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeSoftwareVersion(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeSoftwareVersionString(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeSoftwareVersionString(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeManufacturingDate(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeManufacturingDate(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributePartNumber(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributePartNumber(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeProductURL(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeProductURL(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeProductLabel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeProductLabel(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeSerialNumber(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeSerialNumber(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeLocalConfigDisabled(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeLocalConfigDisabled(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeReachable(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeReachable(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); - -private: }; class DLL_EXPORT BinaryInputBasicCluster : public ClusterBase @@ -279,20 +130,6 @@ class DLL_EXPORT BinaryInputBasicCluster : public ClusterBase public: BinaryInputBasicCluster() : ClusterBase(app::Clusters::BinaryInputBasic::Id) {} ~BinaryInputBasicCluster() {} - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeOutOfService(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeOutOfService(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributePresentValue(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributePresentValue(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeStatusFlags(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeStatusFlags(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); }; class DLL_EXPORT BindingCluster : public ClusterBase @@ -306,13 +143,6 @@ class DLL_EXPORT BindingCluster : public ClusterBase chip::GroupId groupId, chip::EndpointId endpointId, chip::ClusterId clusterId); CHIP_ERROR Unbind(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, chip::NodeId nodeId, chip::GroupId groupId, chip::EndpointId endpointId, chip::ClusterId clusterId); - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); - -private: }; class DLL_EXPORT BooleanStateCluster : public ClusterBase @@ -320,14 +150,6 @@ class DLL_EXPORT BooleanStateCluster : public ClusterBase public: BooleanStateCluster() : ClusterBase(app::Clusters::BooleanState::Id) {} ~BooleanStateCluster() {} - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeStateValue(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeStateValue(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); }; class DLL_EXPORT BridgedActionsCluster : public ClusterBase @@ -361,16 +183,6 @@ class DLL_EXPORT BridgedActionsCluster : public ClusterBase uint16_t actionID, uint32_t invokeID, uint32_t duration); CHIP_ERROR StopAction(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t actionID, uint32_t invokeID); - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeSetupUrl(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeSetupUrl(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); - -private: }; class DLL_EXPORT BridgedDeviceBasicCluster : public ClusterBase @@ -378,11 +190,6 @@ class DLL_EXPORT BridgedDeviceBasicCluster : public ClusterBase public: BridgedDeviceBasicCluster() : ClusterBase(app::Clusters::BridgedDeviceBasic::Id) {} ~BridgedDeviceBasicCluster() {} - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); }; class DLL_EXPORT ColorControlCluster : public ClusterBase @@ -437,194 +244,6 @@ class DLL_EXPORT ColorControlCluster : public ClusterBase uint8_t stepSize, uint8_t transitionTime, uint8_t optionsMask, uint8_t optionsOverride); CHIP_ERROR StopMoveStep(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t optionsMask, uint8_t optionsOverride); - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeCurrentHue(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeCurrentHue(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeCurrentSaturation(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeCurrentSaturation(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeRemainingTime(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeRemainingTime(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeCurrentX(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeCurrentX(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeCurrentY(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeCurrentY(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeDriftCompensation(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeDriftCompensation(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeCompensationText(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeCompensationText(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeColorTemperature(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeColorTemperature(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeColorMode(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeColorMode(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeColorControlOptions(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeColorControlOptions(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeNumberOfPrimaries(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeNumberOfPrimaries(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributePrimary1X(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributePrimary1X(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributePrimary1Y(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributePrimary1Y(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributePrimary1Intensity(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributePrimary1Intensity(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributePrimary2X(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributePrimary2X(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributePrimary2Y(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributePrimary2Y(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributePrimary2Intensity(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributePrimary2Intensity(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributePrimary3X(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributePrimary3X(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributePrimary3Y(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributePrimary3Y(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributePrimary3Intensity(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributePrimary3Intensity(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributePrimary4X(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributePrimary4X(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributePrimary4Y(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributePrimary4Y(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributePrimary4Intensity(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributePrimary4Intensity(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributePrimary5X(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributePrimary5X(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributePrimary5Y(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributePrimary5Y(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributePrimary5Intensity(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributePrimary5Intensity(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributePrimary6X(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributePrimary6X(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributePrimary6Y(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributePrimary6Y(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributePrimary6Intensity(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributePrimary6Intensity(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeWhitePointX(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeWhitePointX(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeWhitePointY(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeWhitePointY(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeColorPointRX(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeColorPointRX(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeColorPointRY(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeColorPointRY(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeColorPointRIntensity(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeColorPointRIntensity(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeColorPointGX(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeColorPointGX(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeColorPointGY(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeColorPointGY(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeColorPointGIntensity(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeColorPointGIntensity(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeColorPointBX(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeColorPointBX(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeColorPointBY(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeColorPointBY(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeColorPointBIntensity(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeColorPointBIntensity(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeEnhancedCurrentHue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeEnhancedCurrentHue(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeEnhancedColorMode(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeEnhancedColorMode(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeColorLoopActive(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeColorLoopActive(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeColorLoopDirection(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeColorLoopDirection(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeColorLoopTime(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeColorLoopTime(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeColorLoopStartEnhancedHue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeColorLoopStartEnhancedHue(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeColorLoopStoredEnhancedHue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeColorLoopStoredEnhancedHue(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeColorCapabilities(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeColorCapabilities(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeColorTempPhysicalMin(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeColorTempPhysicalMin(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeColorTempPhysicalMax(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeColorTempPhysicalMax(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeCoupleColorTempToLevelMinMireds(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeCoupleColorTempToLevelMinMireds(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeStartUpColorTemperatureMireds(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeStartUpColorTemperatureMireds(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); - -private: }; class DLL_EXPORT ContentLauncherCluster : public ClusterBase @@ -638,17 +257,6 @@ class DLL_EXPORT ContentLauncherCluster : public ClusterBase chip::CharSpan data, uint8_t type, chip::CharSpan value); CHIP_ERROR LaunchURL(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, chip::CharSpan contentURL, chip::CharSpan displayString, chip::CharSpan providerName); - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeSupportedStreamingProtocols(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeSupportedStreamingProtocols(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); - -private: }; class DLL_EXPORT DescriptorCluster : public ClusterBase @@ -656,11 +264,6 @@ class DLL_EXPORT DescriptorCluster : public ClusterBase public: DescriptorCluster() : ClusterBase(app::Clusters::Descriptor::Id) {} ~DescriptorCluster() {} - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); }; class DLL_EXPORT DiagnosticLogsCluster : public ClusterBase @@ -672,10 +275,6 @@ class DLL_EXPORT DiagnosticLogsCluster : public ClusterBase // Cluster Commands CHIP_ERROR RetrieveLogsRequest(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t intent, uint8_t requestedProtocol, chip::ByteSpan transferFileDesignator); - - // Cluster Attributes - -private: }; class DLL_EXPORT DoorLockCluster : public ClusterBase @@ -700,49 +299,6 @@ class DLL_EXPORT DoorLockCluster : public ClusterBase uint8_t credentialRule); CHIP_ERROR UnlockDoor(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, chip::ByteSpan pinCode); - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeLockState(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeLockState(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeLockType(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeLockType(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeActuatorEnabled(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeActuatorEnabled(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeDoorState(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeDoorState(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeLanguage(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeLanguage(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeAutoRelockTime(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeAutoRelockTime(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeSoundVolume(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeSoundVolume(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeOperatingMode(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeOperatingMode(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeEnableOneTouchLocking(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeEnableOneTouchLocking(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeEnablePrivacyModeButton(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeEnablePrivacyModeButton(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeWrongCodeEntryLimit(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeWrongCodeEntryLimit(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); - -private: }; class DLL_EXPORT ElectricalMeasurementCluster : public ClusterBase @@ -750,45 +306,6 @@ class DLL_EXPORT ElectricalMeasurementCluster : public ClusterBase public: ElectricalMeasurementCluster() : ClusterBase(app::Clusters::ElectricalMeasurement::Id) {} ~ElectricalMeasurementCluster() {} - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeMeasurementType(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeMeasurementType(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeTotalActivePower(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeTotalActivePower(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeRmsVoltage(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeRmsVoltage(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeRmsVoltageMin(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeRmsVoltageMin(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeRmsVoltageMax(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeRmsVoltageMax(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeRmsCurrent(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeRmsCurrent(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeRmsCurrentMin(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeRmsCurrentMin(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeRmsCurrentMax(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeRmsCurrentMax(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeActivePower(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeActivePower(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeActivePowerMin(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeActivePowerMin(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeActivePowerMax(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeActivePowerMax(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); }; class DLL_EXPORT EthernetNetworkDiagnosticsCluster : public ClusterBase @@ -799,40 +316,6 @@ class DLL_EXPORT EthernetNetworkDiagnosticsCluster : public ClusterBase // Cluster Commands CHIP_ERROR ResetCounts(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); - - // Cluster Attributes - CHIP_ERROR SubscribeAttributePHYRate(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributePHYRate(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeFullDuplex(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeFullDuplex(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributePacketRxCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributePacketRxCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributePacketTxCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributePacketTxCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeTxErrCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeTxErrCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeCollisionCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeCollisionCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeOverrunCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeOverrunCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeCarrierDetect(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeCarrierDetect(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeTimeSinceReset(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeTimeSinceReset(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); - -private: }; class DLL_EXPORT FixedLabelCluster : public ClusterBase @@ -840,11 +323,6 @@ class DLL_EXPORT FixedLabelCluster : public ClusterBase public: FixedLabelCluster() : ClusterBase(app::Clusters::FixedLabel::Id) {} ~FixedLabelCluster() {} - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); }; class DLL_EXPORT FlowMeasurementCluster : public ClusterBase @@ -852,25 +330,6 @@ class DLL_EXPORT FlowMeasurementCluster : public ClusterBase public: FlowMeasurementCluster() : ClusterBase(app::Clusters::FlowMeasurement::Id) {} ~FlowMeasurementCluster() {} - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeMeasuredValue(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeMeasuredValue(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMinMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeMinMeasuredValue(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMaxMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeMaxMeasuredValue(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeTolerance(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeTolerance(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); }; class DLL_EXPORT GeneralCommissioningCluster : public ClusterBase @@ -885,16 +344,6 @@ class DLL_EXPORT GeneralCommissioningCluster : public ClusterBase CHIP_ERROR CommissioningComplete(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); CHIP_ERROR SetRegulatoryConfig(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t location, chip::CharSpan countryCode, uint64_t breadcrumb, uint32_t timeoutMs); - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeBreadcrumb(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeBreadcrumb(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); - -private: }; class DLL_EXPORT GeneralDiagnosticsCluster : public ClusterBase @@ -902,24 +351,6 @@ class DLL_EXPORT GeneralDiagnosticsCluster : public ClusterBase public: GeneralDiagnosticsCluster() : ClusterBase(app::Clusters::GeneralDiagnostics::Id) {} ~GeneralDiagnosticsCluster() {} - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeRebootCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeRebootCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeUpTime(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeUpTime(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeTotalOperationalHours(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeTotalOperationalHours(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeBootReasons(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeBootReasons(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); }; class DLL_EXPORT GroupKeyManagementCluster : public ClusterBase @@ -927,11 +358,6 @@ class DLL_EXPORT GroupKeyManagementCluster : public ClusterBase public: GroupKeyManagementCluster() : ClusterBase(app::Clusters::GroupKeyManagement::Id) {} ~GroupKeyManagementCluster() {} - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); }; class DLL_EXPORT GroupsCluster : public ClusterBase @@ -950,16 +376,6 @@ class DLL_EXPORT GroupsCluster : public ClusterBase CHIP_ERROR RemoveAllGroups(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); CHIP_ERROR RemoveGroup(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t groupId); CHIP_ERROR ViewGroup(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t groupId); - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeNameSupport(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeNameSupport(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); - -private: }; class DLL_EXPORT IdentifyCluster : public ClusterBase @@ -973,19 +389,6 @@ class DLL_EXPORT IdentifyCluster : public ClusterBase CHIP_ERROR IdentifyQuery(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); CHIP_ERROR TriggerEffect(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t effectIdentifier, uint8_t effectVariant); - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeIdentifyTime(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeIdentifyTime(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeIdentifyType(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeIdentifyType(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); - -private: }; class DLL_EXPORT IlluminanceMeasurementCluster : public ClusterBase @@ -993,28 +396,6 @@ class DLL_EXPORT IlluminanceMeasurementCluster : public ClusterBase public: IlluminanceMeasurementCluster() : ClusterBase(app::Clusters::IlluminanceMeasurement::Id) {} ~IlluminanceMeasurementCluster() {} - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeMeasuredValue(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeMeasuredValue(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMinMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeMinMeasuredValue(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMaxMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeMaxMeasuredValue(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeTolerance(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeTolerance(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeLightSensorType(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeLightSensorType(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); }; class DLL_EXPORT KeypadInputCluster : public ClusterBase @@ -1025,13 +406,6 @@ class DLL_EXPORT KeypadInputCluster : public ClusterBase // Cluster Commands CHIP_ERROR SendKey(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t keyCode); - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); - -private: }; class DLL_EXPORT LevelControlCluster : public ClusterBase @@ -1056,60 +430,6 @@ class DLL_EXPORT LevelControlCluster : public ClusterBase CHIP_ERROR Stop(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t optionMask, uint8_t optionOverride); CHIP_ERROR StopWithOnOff(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeCurrentLevel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeCurrentLevel(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeRemainingTime(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeRemainingTime(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMinLevel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeMinLevel(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMaxLevel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeMaxLevel(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeCurrentFrequency(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeCurrentFrequency(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMinFrequency(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeMinFrequency(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMaxFrequency(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeMaxFrequency(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeOptions(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeOptions(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeOnOffTransitionTime(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeOnOffTransitionTime(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeOnLevel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeOnLevel(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeOnTransitionTime(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeOnTransitionTime(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeOffTransitionTime(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeOffTransitionTime(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeDefaultMoveRate(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeDefaultMoveRate(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeStartUpCurrentLevel(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeStartUpCurrentLevel(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); - -private: }; class DLL_EXPORT LowPowerCluster : public ClusterBase @@ -1120,13 +440,6 @@ class DLL_EXPORT LowPowerCluster : public ClusterBase // Cluster Commands CHIP_ERROR Sleep(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); - -private: }; class DLL_EXPORT MediaInputCluster : public ClusterBase @@ -1141,17 +454,6 @@ class DLL_EXPORT MediaInputCluster : public ClusterBase chip::CharSpan name); CHIP_ERROR SelectInput(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t index); CHIP_ERROR ShowInputStatus(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeCurrentMediaInput(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeCurrentMediaInput(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); - -private: }; class DLL_EXPORT MediaPlaybackCluster : public ClusterBase @@ -1174,28 +476,6 @@ class DLL_EXPORT MediaPlaybackCluster : public ClusterBase uint64_t deltaPositionMilliseconds); CHIP_ERROR MediaStartOver(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); CHIP_ERROR MediaStop(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); - - // Cluster Attributes - CHIP_ERROR SubscribeAttributePlaybackState(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributePlaybackState(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeStartTime(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeStartTime(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeDuration(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeDuration(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeSeekRangeEnd(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeSeekRangeEnd(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeSeekRangeStart(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeSeekRangeStart(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); - -private: }; class DLL_EXPORT ModeSelectCluster : public ClusterBase @@ -1206,25 +486,6 @@ class DLL_EXPORT ModeSelectCluster : public ClusterBase // Cluster Commands CHIP_ERROR ChangeToMode(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t newMode); - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeCurrentMode(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeCurrentMode(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeOnMode(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeOnMode(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeStartUpMode(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeStartUpMode(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeDescription(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeDescription(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); - -private: }; class DLL_EXPORT NetworkCommissioningCluster : public ClusterBase @@ -1246,16 +507,6 @@ class DLL_EXPORT NetworkCommissioningCluster : public ClusterBase chip::ByteSpan networkID, uint8_t networkIndex, uint64_t breadcrumb); CHIP_ERROR ScanNetworks(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, chip::ByteSpan ssid, uint64_t breadcrumb); - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeFeatureMap(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); - -private: }; class DLL_EXPORT OtaSoftwareUpdateProviderCluster : public ClusterBase @@ -1273,13 +524,6 @@ class DLL_EXPORT OtaSoftwareUpdateProviderCluster : public ClusterBase chip::VendorId vendorId, uint16_t productId, uint32_t softwareVersion, uint8_t protocolsSupported, uint16_t hardwareVersion, chip::CharSpan location, bool requestorCanConsent, chip::ByteSpan metadataForProvider); - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); - -private: }; class DLL_EXPORT OtaSoftwareUpdateRequestorCluster : public ClusterBase @@ -1292,20 +536,6 @@ class DLL_EXPORT OtaSoftwareUpdateRequestorCluster : public ClusterBase CHIP_ERROR AnnounceOtaProvider(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, chip::NodeId providerLocation, chip::VendorId vendorId, uint8_t announcementReason, chip::ByteSpan metadataForNode); - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeDefaultOtaProvider(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeDefaultOtaProvider(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeUpdatePossible(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeUpdatePossible(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); - -private: }; class DLL_EXPORT OccupancySensingCluster : public ClusterBase @@ -1313,22 +543,6 @@ class DLL_EXPORT OccupancySensingCluster : public ClusterBase public: OccupancySensingCluster() : ClusterBase(app::Clusters::OccupancySensing::Id) {} ~OccupancySensingCluster() {} - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeOccupancy(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeOccupancy(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeOccupancySensorType(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeOccupancySensorType(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeOccupancySensorTypeBitmap(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeOccupancySensorTypeBitmap(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); }; class DLL_EXPORT OnOffCluster : public ClusterBase @@ -1346,32 +560,6 @@ class DLL_EXPORT OnOffCluster : public ClusterBase CHIP_ERROR OnWithTimedOff(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t onOffControl, uint16_t onTime, uint16_t offWaitTime); CHIP_ERROR Toggle(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeOnOff(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeOnOff(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeGlobalSceneControl(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeGlobalSceneControl(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeOnTime(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeOnTime(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeOffWaitTime(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeOffWaitTime(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeStartUpOnOff(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeStartUpOnOff(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeFeatureMap(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); - -private: }; class DLL_EXPORT OnOffSwitchConfigurationCluster : public ClusterBase @@ -1379,17 +567,6 @@ class DLL_EXPORT OnOffSwitchConfigurationCluster : public ClusterBase public: OnOffSwitchConfigurationCluster() : ClusterBase(app::Clusters::OnOffSwitchConfiguration::Id) {} ~OnOffSwitchConfigurationCluster() {} - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeSwitchType(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeSwitchType(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeSwitchActions(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeSwitchActions(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); }; class DLL_EXPORT OperationalCredentialsCluster : public ClusterBase @@ -1417,25 +594,6 @@ class DLL_EXPORT OperationalCredentialsCluster : public ClusterBase chip::CharSpan label); CHIP_ERROR UpdateNOC(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, chip::ByteSpan NOCValue, chip::ByteSpan ICACValue); - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeSupportedFabrics(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeSupportedFabrics(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeCommissionedFabrics(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeCommissionedFabrics(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeCurrentFabricIndex(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeCurrentFabricIndex(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); - -private: }; class DLL_EXPORT PowerSourceCluster : public ClusterBase @@ -1443,42 +601,6 @@ class DLL_EXPORT PowerSourceCluster : public ClusterBase public: PowerSourceCluster() : ClusterBase(app::Clusters::PowerSource::Id) {} ~PowerSourceCluster() {} - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeStatus(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeStatus(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeOrder(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeOrder(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeDescription(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeDescription(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeBatteryVoltage(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeBatteryVoltage(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeBatteryPercentRemaining(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeBatteryPercentRemaining(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeBatteryTimeRemaining(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeBatteryTimeRemaining(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeBatteryChargeLevel(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeBatteryChargeLevel(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeBatteryChargeState(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeBatteryChargeState(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeFeatureMap(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); }; class DLL_EXPORT PowerSourceConfigurationCluster : public ClusterBase @@ -1486,8 +608,6 @@ class DLL_EXPORT PowerSourceConfigurationCluster : public ClusterBase public: PowerSourceConfigurationCluster() : ClusterBase(app::Clusters::PowerSourceConfiguration::Id) {} ~PowerSourceConfigurationCluster() {} - - // Cluster Attributes }; class DLL_EXPORT PressureMeasurementCluster : public ClusterBase @@ -1495,22 +615,6 @@ class DLL_EXPORT PressureMeasurementCluster : public ClusterBase public: PressureMeasurementCluster() : ClusterBase(app::Clusters::PressureMeasurement::Id) {} ~PressureMeasurementCluster() {} - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeMeasuredValue(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeMeasuredValue(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMinMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeMinMeasuredValue(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMaxMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeMaxMeasuredValue(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); }; class DLL_EXPORT PumpConfigurationAndControlCluster : public ClusterBase @@ -1518,92 +622,6 @@ class DLL_EXPORT PumpConfigurationAndControlCluster : public ClusterBase public: PumpConfigurationAndControlCluster() : ClusterBase(app::Clusters::PumpConfigurationAndControl::Id) {} ~PumpConfigurationAndControlCluster() {} - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeMaxPressure(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeMaxPressure(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMaxSpeed(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeMaxSpeed(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMaxFlow(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeMaxFlow(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMinConstPressure(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeMinConstPressure(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMaxConstPressure(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeMaxConstPressure(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMinCompPressure(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeMinCompPressure(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMaxCompPressure(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeMaxCompPressure(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMinConstSpeed(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeMinConstSpeed(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMaxConstSpeed(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeMaxConstSpeed(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMinConstFlow(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeMinConstFlow(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMaxConstFlow(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeMaxConstFlow(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMinConstTemp(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeMinConstTemp(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMaxConstTemp(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeMaxConstTemp(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributePumpStatus(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributePumpStatus(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeEffectiveOperationMode(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeEffectiveOperationMode(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeEffectiveControlMode(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeEffectiveControlMode(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeCapacity(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeCapacity(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeSpeed(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeSpeed(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeLifetimeRunningHours(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeLifetimeRunningHours(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributePower(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributePower(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeLifetimeEnergyConsumed(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeLifetimeEnergyConsumed(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeOperationMode(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeOperationMode(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeControlMode(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeControlMode(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeAlarmMask(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeAlarmMask(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeFeatureMap(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); }; class DLL_EXPORT RelativeHumidityMeasurementCluster : public ClusterBase @@ -1611,25 +629,6 @@ class DLL_EXPORT RelativeHumidityMeasurementCluster : public ClusterBase public: RelativeHumidityMeasurementCluster() : ClusterBase(app::Clusters::RelativeHumidityMeasurement::Id) {} ~RelativeHumidityMeasurementCluster() {} - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeMeasuredValue(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeMeasuredValue(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMinMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeMinMeasuredValue(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMaxMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeMaxMeasuredValue(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeTolerance(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeTolerance(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); }; class DLL_EXPORT ScenesCluster : public ClusterBase @@ -1654,28 +653,6 @@ class DLL_EXPORT ScenesCluster : public ClusterBase uint8_t sceneId); CHIP_ERROR ViewScene(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t groupId, uint8_t sceneId); - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeSceneCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeSceneCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeCurrentScene(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeCurrentScene(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeCurrentGroup(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeCurrentGroup(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeSceneValid(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeSceneValid(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeNameSupport(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeNameSupport(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); - -private: }; class DLL_EXPORT SoftwareDiagnosticsCluster : public ClusterBase @@ -1686,23 +663,6 @@ class DLL_EXPORT SoftwareDiagnosticsCluster : public ClusterBase // Cluster Commands CHIP_ERROR ResetWatermarks(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeCurrentHeapFree(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeCurrentHeapFree(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeCurrentHeapUsed(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeCurrentHeapUsed(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeCurrentHeapHighWatermark(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeCurrentHeapHighWatermark(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); - -private: }; class DLL_EXPORT SwitchCluster : public ClusterBase @@ -1710,24 +670,6 @@ class DLL_EXPORT SwitchCluster : public ClusterBase public: SwitchCluster() : ClusterBase(app::Clusters::Switch::Id) {} ~SwitchCluster() {} - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeNumberOfPositions(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeNumberOfPositions(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeCurrentPosition(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeCurrentPosition(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMultiPressMax(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeMultiPressMax(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeFeatureMap(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); }; class DLL_EXPORT TvChannelCluster : public ClusterBase @@ -1742,13 +684,6 @@ class DLL_EXPORT TvChannelCluster : public ClusterBase CHIP_ERROR ChangeChannelByNumber(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t majorNumber, uint16_t minorNumber); CHIP_ERROR SkipChannel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t count); - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); - -private: }; class DLL_EXPORT TargetNavigatorCluster : public ClusterBase @@ -1760,13 +695,6 @@ class DLL_EXPORT TargetNavigatorCluster : public ClusterBase // Cluster Commands CHIP_ERROR NavigateTarget(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t target, chip::CharSpan data); - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); - -private: }; class DLL_EXPORT TemperatureMeasurementCluster : public ClusterBase @@ -1774,25 +702,6 @@ class DLL_EXPORT TemperatureMeasurementCluster : public ClusterBase public: TemperatureMeasurementCluster() : ClusterBase(app::Clusters::TemperatureMeasurement::Id) {} ~TemperatureMeasurementCluster() {} - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeMeasuredValue(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeMeasuredValue(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMinMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeMinMeasuredValue(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMaxMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeMaxMeasuredValue(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeTolerance(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeTolerance(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); }; class DLL_EXPORT TestClusterCluster : public ClusterBase @@ -1836,239 +745,6 @@ class DLL_EXPORT TestClusterCluster : public ClusterBase double h); CHIP_ERROR TestUnknownCommand(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); CHIP_ERROR TimedInvokeRequest(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeBoolean(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeBoolean(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeBitmap8(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeBitmap8(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeBitmap16(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeBitmap16(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeBitmap32(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeBitmap32(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeBitmap64(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeBitmap64(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeInt8u(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeInt8u(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeInt16u(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeInt16u(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeInt24u(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeInt24u(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeInt32u(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeInt32u(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeInt40u(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeInt40u(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeInt48u(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeInt48u(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeInt56u(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeInt56u(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeInt64u(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeInt64u(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeInt8s(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeInt8s(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeInt16s(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeInt16s(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeInt24s(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeInt24s(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeInt32s(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeInt32s(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeInt40s(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeInt40s(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeInt48s(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeInt48s(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeInt56s(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeInt56s(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeInt64s(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeInt64s(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeEnum8(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeEnum8(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeEnum16(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeEnum16(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeFloatSingle(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeFloatSingle(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeFloatDouble(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeFloatDouble(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeOctetString(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeOctetString(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeLongOctetString(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeLongOctetString(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeCharString(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeCharString(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeLongCharString(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeLongCharString(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeEpochUs(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeEpochUs(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeEpochS(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeEpochS(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeVendorId(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeVendorId(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeEnumAttr(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeEnumAttr(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeRangeRestrictedInt8u(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeRangeRestrictedInt8u(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeRangeRestrictedInt8s(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeRangeRestrictedInt8s(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeRangeRestrictedInt16u(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeRangeRestrictedInt16u(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeRangeRestrictedInt16s(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeRangeRestrictedInt16s(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeUnsupported(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeUnsupported(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeNullableBoolean(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeNullableBoolean(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeNullableBitmap8(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeNullableBitmap8(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeNullableBitmap16(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeNullableBitmap16(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeNullableBitmap32(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeNullableBitmap32(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeNullableBitmap64(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeNullableBitmap64(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeNullableInt8u(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeNullableInt8u(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeNullableInt16u(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeNullableInt16u(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeNullableInt24u(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeNullableInt24u(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeNullableInt32u(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeNullableInt32u(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeNullableInt40u(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeNullableInt40u(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeNullableInt48u(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeNullableInt48u(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeNullableInt56u(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeNullableInt56u(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeNullableInt64u(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeNullableInt64u(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeNullableInt8s(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeNullableInt8s(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeNullableInt16s(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeNullableInt16s(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeNullableInt24s(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeNullableInt24s(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeNullableInt32s(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeNullableInt32s(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeNullableInt40s(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeNullableInt40s(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeNullableInt48s(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeNullableInt48s(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeNullableInt56s(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeNullableInt56s(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeNullableInt64s(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeNullableInt64s(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeNullableEnum8(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeNullableEnum8(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeNullableEnum16(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeNullableEnum16(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeNullableFloatSingle(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeNullableFloatSingle(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeNullableFloatDouble(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeNullableFloatDouble(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeNullableOctetString(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeNullableOctetString(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeNullableCharString(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeNullableCharString(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeNullableEnumAttr(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeNullableEnumAttr(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeNullableRangeRestrictedInt8u(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeNullableRangeRestrictedInt8u(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeNullableRangeRestrictedInt8s(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeNullableRangeRestrictedInt8s(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeNullableRangeRestrictedInt16u(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeNullableRangeRestrictedInt16u(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeNullableRangeRestrictedInt16s(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeNullableRangeRestrictedInt16s(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); - -private: }; class DLL_EXPORT ThermostatCluster : public ClusterBase @@ -2087,82 +763,6 @@ class DLL_EXPORT ThermostatCluster : public ClusterBase uint8_t payload); CHIP_ERROR SetpointRaiseLower(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t mode, int8_t amount); - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeLocalTemperature(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeLocalTemperature(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeAbsMinHeatSetpointLimit(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeAbsMinHeatSetpointLimit(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeAbsMaxHeatSetpointLimit(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeAbsMaxHeatSetpointLimit(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeAbsMinCoolSetpointLimit(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeAbsMinCoolSetpointLimit(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeAbsMaxCoolSetpointLimit(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeAbsMaxCoolSetpointLimit(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeOccupiedCoolingSetpoint(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeOccupiedCoolingSetpoint(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeOccupiedHeatingSetpoint(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeOccupiedHeatingSetpoint(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMinHeatSetpointLimit(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeMinHeatSetpointLimit(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMaxHeatSetpointLimit(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeMaxHeatSetpointLimit(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMinCoolSetpointLimit(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeMinCoolSetpointLimit(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMaxCoolSetpointLimit(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeMaxCoolSetpointLimit(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMinSetpointDeadBand(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeMinSetpointDeadBand(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeControlSequenceOfOperation(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeControlSequenceOfOperation(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeSystemMode(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeSystemMode(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeStartOfWeek(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeStartOfWeek(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeNumberOfWeeklyTransitions(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeNumberOfWeeklyTransitions(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeNumberOfDailyTransitions(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeNumberOfDailyTransitions(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeFeatureMap(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); - -private: }; class DLL_EXPORT ThermostatUserInterfaceConfigurationCluster : public ClusterBase @@ -2170,22 +770,6 @@ class DLL_EXPORT ThermostatUserInterfaceConfigurationCluster : public ClusterBas public: ThermostatUserInterfaceConfigurationCluster() : ClusterBase(app::Clusters::ThermostatUserInterfaceConfiguration::Id) {} ~ThermostatUserInterfaceConfigurationCluster() {} - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeTemperatureDisplayMode(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeTemperatureDisplayMode(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeKeypadLockout(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeKeypadLockout(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeScheduleProgrammingVisibility(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeScheduleProgrammingVisibility(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); }; class DLL_EXPORT ThreadNetworkDiagnosticsCluster : public ClusterBase @@ -2196,209 +780,6 @@ class DLL_EXPORT ThreadNetworkDiagnosticsCluster : public ClusterBase // Cluster Commands CHIP_ERROR ResetCounts(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeChannel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeChannel(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeRoutingRole(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeRoutingRole(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeNetworkName(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeNetworkName(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributePanId(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributePanId(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeExtendedPanId(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeExtendedPanId(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMeshLocalPrefix(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeMeshLocalPrefix(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeOverrunCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeOverrunCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributePartitionId(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributePartitionId(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeWeighting(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeWeighting(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeDataVersion(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeDataVersion(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeStableDataVersion(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeStableDataVersion(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeLeaderRouterId(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeLeaderRouterId(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeDetachedRoleCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeDetachedRoleCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeChildRoleCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeChildRoleCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeRouterRoleCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeRouterRoleCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeLeaderRoleCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeLeaderRoleCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeAttachAttemptCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeAttachAttemptCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributePartitionIdChangeCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributePartitionIdChangeCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeBetterPartitionAttachAttemptCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeBetterPartitionAttachAttemptCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeParentChangeCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeParentChangeCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeTxTotalCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeTxTotalCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeTxUnicastCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeTxUnicastCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeTxBroadcastCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeTxBroadcastCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeTxAckRequestedCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeTxAckRequestedCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeTxAckedCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeTxAckedCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeTxNoAckRequestedCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeTxNoAckRequestedCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeTxDataCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeTxDataCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeTxDataPollCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeTxDataPollCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeTxBeaconCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeTxBeaconCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeTxBeaconRequestCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeTxBeaconRequestCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeTxOtherCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeTxOtherCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeTxRetryCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeTxRetryCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeTxDirectMaxRetryExpiryCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeTxDirectMaxRetryExpiryCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeTxIndirectMaxRetryExpiryCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeTxIndirectMaxRetryExpiryCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeTxErrCcaCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeTxErrCcaCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeTxErrAbortCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeTxErrAbortCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeTxErrBusyChannelCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeTxErrBusyChannelCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeRxTotalCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeRxTotalCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeRxUnicastCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeRxUnicastCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeRxBroadcastCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeRxBroadcastCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeRxDataCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeRxDataCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeRxDataPollCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeRxDataPollCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeRxBeaconCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeRxBeaconCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeRxBeaconRequestCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeRxBeaconRequestCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeRxOtherCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeRxOtherCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeRxAddressFilteredCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeRxAddressFilteredCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeRxDestAddrFilteredCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeRxDestAddrFilteredCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeRxDuplicatedCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeRxDuplicatedCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeRxErrNoFrameCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeRxErrNoFrameCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeRxErrUnknownNeighborCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeRxErrUnknownNeighborCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeRxErrInvalidSrcAddrCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeRxErrInvalidSrcAddrCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeRxErrSecCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeRxErrSecCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeRxErrFcsCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeRxErrFcsCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeRxErrOtherCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeRxErrOtherCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeActiveTimestamp(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeActiveTimestamp(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributePendingTimestamp(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributePendingTimestamp(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeDelay(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeDelay(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeChannelMask(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeChannelMask(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); - -private: }; class DLL_EXPORT UserLabelCluster : public ClusterBase @@ -2406,8 +787,6 @@ class DLL_EXPORT UserLabelCluster : public ClusterBase public: UserLabelCluster() : ClusterBase(app::Clusters::UserLabel::Id) {} ~UserLabelCluster() {} - - // Cluster Attributes }; class DLL_EXPORT WakeOnLanCluster : public ClusterBase @@ -2415,15 +794,6 @@ class DLL_EXPORT WakeOnLanCluster : public ClusterBase public: WakeOnLanCluster() : ClusterBase(app::Clusters::WakeOnLan::Id) {} ~WakeOnLanCluster() {} - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeWakeOnLanMacAddress(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeWakeOnLanMacAddress(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); }; class DLL_EXPORT WiFiNetworkDiagnosticsCluster : public ClusterBase @@ -2434,56 +804,6 @@ class DLL_EXPORT WiFiNetworkDiagnosticsCluster : public ClusterBase // Cluster Commands CHIP_ERROR ResetCounts(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeBssid(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeBssid(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeSecurityType(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeSecurityType(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeWiFiVersion(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeWiFiVersion(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeChannelNumber(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeChannelNumber(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeRssi(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeRssi(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeBeaconLostCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeBeaconLostCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeBeaconRxCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeBeaconRxCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributePacketMulticastRxCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributePacketMulticastRxCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributePacketMulticastTxCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributePacketMulticastTxCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributePacketUnicastRxCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributePacketUnicastRxCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributePacketUnicastTxCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributePacketUnicastTxCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeCurrentMaxRate(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeCurrentMaxRate(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeOverrunCount(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeOverrunCount(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); - -private: }; class DLL_EXPORT WindowCoveringCluster : public ClusterBase @@ -2504,83 +824,6 @@ class DLL_EXPORT WindowCoveringCluster : public ClusterBase uint16_t tiltValue); CHIP_ERROR StopMotion(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); CHIP_ERROR UpOrOpen(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeType(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeType(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeCurrentPositionLift(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeCurrentPositionLift(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeCurrentPositionTilt(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeCurrentPositionTilt(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeConfigStatus(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeConfigStatus(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeCurrentPositionLiftPercentage(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeCurrentPositionLiftPercentage(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeCurrentPositionTiltPercentage(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeCurrentPositionTiltPercentage(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeOperationalStatus(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeOperationalStatus(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeTargetPositionLiftPercent100ths(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeTargetPositionLiftPercent100ths(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeTargetPositionTiltPercent100ths(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeTargetPositionTiltPercent100ths(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeEndProductType(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeEndProductType(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeCurrentPositionLiftPercent100ths(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeCurrentPositionLiftPercent100ths(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeCurrentPositionTiltPercent100ths(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeCurrentPositionTiltPercent100ths(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeInstalledOpenLimitLift(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeInstalledOpenLimitLift(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeInstalledClosedLimitLift(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeInstalledClosedLimitLift(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeInstalledOpenLimitTilt(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeInstalledOpenLimitTilt(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeInstalledClosedLimitTilt(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeInstalledClosedLimitTilt(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMode(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeMode(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeSafetyStatus(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeSafetyStatus(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeFeatureMap(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); - -private: }; } // namespace Controller diff --git a/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.cpp b/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.cpp deleted file mode 100644 index 4afc378c3cedd1..00000000000000 --- a/zzz_generated/controller-clusters/zap-generated/tests/CHIPClustersTest.cpp +++ /dev/null @@ -1,3772 +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 - -#include -#include - -#include -#include -#include - -using namespace chip::app::Clusters; -using namespace chip::System; -using namespace chip::Encoding::LittleEndian; - -namespace chip { -namespace Controller { - -CHIP_ERROR AccessControlClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, AccessControl::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR AccountLoginClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, AccountLogin::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR AdministratorCommissioningClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, AdministratorCommissioning::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ApplicationBasicClusterTest::WriteAttributeVendorName(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, chip::CharSpan value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ApplicationBasic::Attributes::VendorName::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ApplicationBasicClusterTest::WriteAttributeVendorId(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ApplicationBasic::Attributes::VendorId::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ApplicationBasicClusterTest::WriteAttributeApplicationName(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - chip::CharSpan value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ApplicationBasic::Attributes::ApplicationName::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ApplicationBasicClusterTest::WriteAttributeProductId(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ApplicationBasic::Attributes::ProductId::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ApplicationBasicClusterTest::WriteAttributeApplicationStatus(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ApplicationBasic::Attributes::ApplicationStatus::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ApplicationBasicClusterTest::WriteAttributeApplicationVersion(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - chip::CharSpan value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ApplicationBasic::Attributes::ApplicationVersion::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ApplicationBasicClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ApplicationBasic::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ApplicationLauncherClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ApplicationLauncher::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR AudioOutputClusterTest::WriteAttributeCurrentAudioOutput(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, AudioOutput::Attributes::CurrentAudioOutput::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR AudioOutputClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, AudioOutput::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BarrierControlClusterTest::WriteAttributeBarrierMovingState(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, BarrierControl::Attributes::BarrierMovingState::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR BarrierControlClusterTest::WriteAttributeBarrierSafetyStatus(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, BarrierControl::Attributes::BarrierSafetyStatus::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR BarrierControlClusterTest::WriteAttributeBarrierCapabilities(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, BarrierControl::Attributes::BarrierCapabilities::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR BarrierControlClusterTest::WriteAttributeBarrierPosition(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, BarrierControl::Attributes::BarrierPosition::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR BarrierControlClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, BarrierControl::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BasicClusterTest::WriteAttributeInteractionModelVersion(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, Basic::Attributes::InteractionModelVersion::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR BasicClusterTest::WriteAttributeVendorName(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, chip::CharSpan value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, Basic::Attributes::VendorName::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR BasicClusterTest::WriteAttributeVendorID(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, Basic::Attributes::VendorID::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR BasicClusterTest::WriteAttributeProductName(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, chip::CharSpan value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, Basic::Attributes::ProductName::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR BasicClusterTest::WriteAttributeProductID(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, Basic::Attributes::ProductID::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR BasicClusterTest::WriteAttributeHardwareVersion(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, Basic::Attributes::HardwareVersion::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR BasicClusterTest::WriteAttributeHardwareVersionString(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, chip::CharSpan value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, Basic::Attributes::HardwareVersionString::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR BasicClusterTest::WriteAttributeSoftwareVersion(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, Basic::Attributes::SoftwareVersion::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR BasicClusterTest::WriteAttributeSoftwareVersionString(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, chip::CharSpan value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, Basic::Attributes::SoftwareVersionString::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR BasicClusterTest::WriteAttributeManufacturingDate(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, chip::CharSpan value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, Basic::Attributes::ManufacturingDate::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR BasicClusterTest::WriteAttributePartNumber(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, chip::CharSpan value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, Basic::Attributes::PartNumber::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR BasicClusterTest::WriteAttributeProductURL(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, chip::CharSpan value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, Basic::Attributes::ProductURL::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR BasicClusterTest::WriteAttributeProductLabel(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, chip::CharSpan value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, Basic::Attributes::ProductLabel::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR BasicClusterTest::WriteAttributeSerialNumber(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, chip::CharSpan value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, Basic::Attributes::SerialNumber::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR BasicClusterTest::WriteAttributeReachable(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, bool value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, Basic::Attributes::Reachable::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR BasicClusterTest::WriteAttributeUniqueID(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, chip::CharSpan value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, Basic::Attributes::UniqueID::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR BasicClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, Basic::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BinaryInputBasicClusterTest::WriteAttributeStatusFlags(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, BinaryInputBasic::Attributes::StatusFlags::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR BinaryInputBasicClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, BinaryInputBasic::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BindingClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, Binding::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BooleanStateClusterTest::WriteAttributeStateValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, bool value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, BooleanState::Attributes::StateValue::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR BooleanStateClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, BooleanState::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BridgedActionsClusterTest::WriteAttributeSetupUrl(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, chip::CharSpan value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, BridgedActions::Attributes::SetupUrl::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR BridgedActionsClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, BridgedActions::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR BridgedDeviceBasicClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, BridgedDeviceBasic::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ColorControlClusterTest::WriteAttributeCurrentHue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::CurrentHue::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ColorControlClusterTest::WriteAttributeCurrentSaturation(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::CurrentSaturation::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ColorControlClusterTest::WriteAttributeRemainingTime(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::RemainingTime::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ColorControlClusterTest::WriteAttributeCurrentX(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::CurrentX::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ColorControlClusterTest::WriteAttributeCurrentY(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::CurrentY::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ColorControlClusterTest::WriteAttributeDriftCompensation(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::DriftCompensation::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ColorControlClusterTest::WriteAttributeCompensationText(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, chip::CharSpan value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::CompensationText::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ColorControlClusterTest::WriteAttributeColorTemperature(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::ColorTemperature::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ColorControlClusterTest::WriteAttributeColorMode(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::ColorMode::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ColorControlClusterTest::WriteAttributeNumberOfPrimaries(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::NumberOfPrimaries::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary1X(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::Primary1X::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary1Y(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::Primary1Y::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary1Intensity(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::Primary1Intensity::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary2X(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::Primary2X::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary2Y(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::Primary2Y::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary2Intensity(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::Primary2Intensity::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary3X(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::Primary3X::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary3Y(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::Primary3Y::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary3Intensity(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::Primary3Intensity::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary4X(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::Primary4X::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary4Y(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::Primary4Y::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary4Intensity(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::Primary4Intensity::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary5X(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::Primary5X::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary5Y(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::Primary5Y::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary5Intensity(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::Primary5Intensity::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary6X(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::Primary6X::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary6Y(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::Primary6Y::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ColorControlClusterTest::WriteAttributePrimary6Intensity(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::Primary6Intensity::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ColorControlClusterTest::WriteAttributeEnhancedCurrentHue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::EnhancedCurrentHue::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ColorControlClusterTest::WriteAttributeEnhancedColorMode(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::EnhancedColorMode::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ColorControlClusterTest::WriteAttributeColorLoopActive(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::ColorLoopActive::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ColorControlClusterTest::WriteAttributeColorLoopDirection(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::ColorLoopDirection::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ColorControlClusterTest::WriteAttributeColorLoopTime(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::ColorLoopTime::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ColorControlClusterTest::WriteAttributeColorLoopStartEnhancedHue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::ColorLoopStartEnhancedHue::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ColorControlClusterTest::WriteAttributeColorLoopStoredEnhancedHue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ColorControlClusterTest::WriteAttributeColorCapabilities(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::ColorCapabilities::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ColorControlClusterTest::WriteAttributeColorTempPhysicalMin(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::ColorTempPhysicalMin::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ColorControlClusterTest::WriteAttributeColorTempPhysicalMax(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::ColorTempPhysicalMax::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ColorControlClusterTest::WriteAttributeCoupleColorTempToLevelMinMireds(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::CoupleColorTempToLevelMinMireds::Id), - value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ColorControlClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ColorControl::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ContentLauncherClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ContentLauncher::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR DescriptorClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, Descriptor::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR DoorLockClusterTest::WriteAttributeLockState(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, DoorLock::Attributes::LockState::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR DoorLockClusterTest::WriteAttributeLockType(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, DoorLock::Attributes::LockType::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR DoorLockClusterTest::WriteAttributeActuatorEnabled(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, bool value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, DoorLock::Attributes::ActuatorEnabled::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR DoorLockClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, DoorLock::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ElectricalMeasurementClusterTest::WriteAttributeMeasurementType(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ElectricalMeasurement::Attributes::MeasurementType::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ElectricalMeasurementClusterTest::WriteAttributeTotalActivePower(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, int32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ElectricalMeasurement::Attributes::TotalActivePower::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ElectricalMeasurementClusterTest::WriteAttributeRmsVoltage(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ElectricalMeasurement::Attributes::RmsVoltage::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ElectricalMeasurementClusterTest::WriteAttributeRmsVoltageMin(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ElectricalMeasurement::Attributes::RmsVoltageMin::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ElectricalMeasurementClusterTest::WriteAttributeRmsVoltageMax(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ElectricalMeasurement::Attributes::RmsVoltageMax::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ElectricalMeasurementClusterTest::WriteAttributeRmsCurrent(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ElectricalMeasurement::Attributes::RmsCurrent::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ElectricalMeasurementClusterTest::WriteAttributeRmsCurrentMin(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ElectricalMeasurement::Attributes::RmsCurrentMin::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ElectricalMeasurementClusterTest::WriteAttributeRmsCurrentMax(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ElectricalMeasurement::Attributes::RmsCurrentMax::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ElectricalMeasurementClusterTest::WriteAttributeActivePower(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, int16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ElectricalMeasurement::Attributes::ActivePower::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ElectricalMeasurementClusterTest::WriteAttributeActivePowerMin(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, int16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ElectricalMeasurement::Attributes::ActivePowerMin::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ElectricalMeasurementClusterTest::WriteAttributeActivePowerMax(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, int16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ElectricalMeasurement::Attributes::ActivePowerMax::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ElectricalMeasurementClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ElectricalMeasurement::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR EthernetNetworkDiagnosticsClusterTest::WriteAttributePHYRate(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, EthernetNetworkDiagnostics::Attributes::PHYRate::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR EthernetNetworkDiagnosticsClusterTest::WriteAttributeFullDuplex(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, bool value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, EthernetNetworkDiagnostics::Attributes::FullDuplex::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR EthernetNetworkDiagnosticsClusterTest::WriteAttributePacketRxCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint64_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, EthernetNetworkDiagnostics::Attributes::PacketRxCount::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR EthernetNetworkDiagnosticsClusterTest::WriteAttributePacketTxCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint64_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, EthernetNetworkDiagnostics::Attributes::PacketTxCount::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR EthernetNetworkDiagnosticsClusterTest::WriteAttributeTxErrCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint64_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, EthernetNetworkDiagnostics::Attributes::TxErrCount::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR EthernetNetworkDiagnosticsClusterTest::WriteAttributeCollisionCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint64_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, EthernetNetworkDiagnostics::Attributes::CollisionCount::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR EthernetNetworkDiagnosticsClusterTest::WriteAttributeOverrunCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint64_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, EthernetNetworkDiagnostics::Attributes::OverrunCount::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR EthernetNetworkDiagnosticsClusterTest::WriteAttributeCarrierDetect(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, bool value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, EthernetNetworkDiagnostics::Attributes::CarrierDetect::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR EthernetNetworkDiagnosticsClusterTest::WriteAttributeTimeSinceReset(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint64_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, EthernetNetworkDiagnostics::Attributes::TimeSinceReset::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR EthernetNetworkDiagnosticsClusterTest::WriteAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, EthernetNetworkDiagnostics::Attributes::FeatureMap::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR EthernetNetworkDiagnosticsClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, EthernetNetworkDiagnostics::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR FixedLabelClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, FixedLabel::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR FlowMeasurementClusterTest::WriteAttributeMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, int16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, FlowMeasurement::Attributes::MeasuredValue::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR FlowMeasurementClusterTest::WriteAttributeMinMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, int16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, FlowMeasurement::Attributes::MinMeasuredValue::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR FlowMeasurementClusterTest::WriteAttributeMaxMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, int16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, FlowMeasurement::Attributes::MaxMeasuredValue::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR FlowMeasurementClusterTest::WriteAttributeTolerance(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, FlowMeasurement::Attributes::Tolerance::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR FlowMeasurementClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, FlowMeasurement::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR GeneralCommissioningClusterTest::WriteAttributeRegulatoryConfig(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, GeneralCommissioning::Attributes::RegulatoryConfig::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR GeneralCommissioningClusterTest::WriteAttributeLocationCapability(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, GeneralCommissioning::Attributes::LocationCapability::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR GeneralCommissioningClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, GeneralCommissioning::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR GeneralDiagnosticsClusterTest::WriteAttributeRebootCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, GeneralDiagnostics::Attributes::RebootCount::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR GeneralDiagnosticsClusterTest::WriteAttributeUpTime(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint64_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, GeneralDiagnostics::Attributes::UpTime::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR GeneralDiagnosticsClusterTest::WriteAttributeTotalOperationalHours(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, GeneralDiagnostics::Attributes::TotalOperationalHours::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR GeneralDiagnosticsClusterTest::WriteAttributeBootReasons(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, GeneralDiagnostics::Attributes::BootReasons::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR GeneralDiagnosticsClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, GeneralDiagnostics::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR GroupKeyManagementClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, GroupKeyManagement::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR GroupsClusterTest::WriteAttributeNameSupport(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, Groups::Attributes::NameSupport::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR GroupsClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, Groups::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR IdentifyClusterTest::WriteAttributeIdentifyType(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, Identify::Attributes::IdentifyType::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR IdentifyClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, Identify::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR IlluminanceMeasurementClusterTest::WriteAttributeMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, IlluminanceMeasurement::Attributes::MeasuredValue::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR IlluminanceMeasurementClusterTest::WriteAttributeMinMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, IlluminanceMeasurement::Attributes::MinMeasuredValue::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR IlluminanceMeasurementClusterTest::WriteAttributeMaxMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, IlluminanceMeasurement::Attributes::MaxMeasuredValue::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR IlluminanceMeasurementClusterTest::WriteAttributeTolerance(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, IlluminanceMeasurement::Attributes::Tolerance::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR IlluminanceMeasurementClusterTest::WriteAttributeLightSensorType(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, IlluminanceMeasurement::Attributes::LightSensorType::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR IlluminanceMeasurementClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, IlluminanceMeasurement::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR KeypadInputClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, KeypadInput::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR LevelControlClusterTest::WriteAttributeCurrentLevel(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, LevelControl::Attributes::CurrentLevel::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR LevelControlClusterTest::WriteAttributeRemainingTime(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, LevelControl::Attributes::RemainingTime::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR LevelControlClusterTest::WriteAttributeMinLevel(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, LevelControl::Attributes::MinLevel::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR LevelControlClusterTest::WriteAttributeMaxLevel(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, LevelControl::Attributes::MaxLevel::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR LevelControlClusterTest::WriteAttributeCurrentFrequency(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, LevelControl::Attributes::CurrentFrequency::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR LevelControlClusterTest::WriteAttributeMinFrequency(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, LevelControl::Attributes::MinFrequency::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR LevelControlClusterTest::WriteAttributeMaxFrequency(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, LevelControl::Attributes::MaxFrequency::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR LevelControlClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, LevelControl::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR LowPowerClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, LowPower::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR MediaInputClusterTest::WriteAttributeCurrentMediaInput(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, MediaInput::Attributes::CurrentMediaInput::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR MediaInputClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, MediaInput::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR MediaPlaybackClusterTest::WriteAttributePlaybackState(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, MediaPlayback::Attributes::PlaybackState::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR MediaPlaybackClusterTest::WriteAttributeStartTime(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint64_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, MediaPlayback::Attributes::StartTime::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR MediaPlaybackClusterTest::WriteAttributeDuration(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint64_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, MediaPlayback::Attributes::Duration::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR MediaPlaybackClusterTest::WriteAttributePlaybackSpeed(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, float value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, MediaPlayback::Attributes::PlaybackSpeed::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR MediaPlaybackClusterTest::WriteAttributeSeekRangeEnd(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint64_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, MediaPlayback::Attributes::SeekRangeEnd::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR MediaPlaybackClusterTest::WriteAttributeSeekRangeStart(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint64_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, MediaPlayback::Attributes::SeekRangeStart::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR MediaPlaybackClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, MediaPlayback::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ModeSelectClusterTest::WriteAttributeCurrentMode(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ModeSelect::Attributes::CurrentMode::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ModeSelectClusterTest::WriteAttributeStartUpMode(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ModeSelect::Attributes::StartUpMode::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ModeSelectClusterTest::WriteAttributeDescription(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, chip::CharSpan value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ModeSelect::Attributes::Description::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ModeSelectClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ModeSelect::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR NetworkCommissioningClusterTest::WriteAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, NetworkCommissioning::Attributes::FeatureMap::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR NetworkCommissioningClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, NetworkCommissioning::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR OtaSoftwareUpdateProviderClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, OtaSoftwareUpdateProvider::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR OtaSoftwareUpdateRequestorClusterTest::WriteAttributeUpdatePossible(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, bool value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR OtaSoftwareUpdateRequestorClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR OccupancySensingClusterTest::WriteAttributeOccupancy(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, OccupancySensing::Attributes::Occupancy::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR OccupancySensingClusterTest::WriteAttributeOccupancySensorType(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, OccupancySensing::Attributes::OccupancySensorType::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR OccupancySensingClusterTest::WriteAttributeOccupancySensorTypeBitmap(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, OccupancySensing::Attributes::OccupancySensorTypeBitmap::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR OccupancySensingClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, OccupancySensing::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR OnOffClusterTest::WriteAttributeOnOff(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - bool value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, OnOff::Attributes::OnOff::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR OnOffClusterTest::WriteAttributeGlobalSceneControl(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, bool value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, OnOff::Attributes::GlobalSceneControl::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR OnOffClusterTest::WriteAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, OnOff::Attributes::FeatureMap::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR OnOffClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, OnOff::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR OnOffSwitchConfigurationClusterTest::WriteAttributeSwitchType(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, OnOffSwitchConfiguration::Attributes::SwitchType::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR OnOffSwitchConfigurationClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, OnOffSwitchConfiguration::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR OperationalCredentialsClusterTest::WriteAttributeSupportedFabrics(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, OperationalCredentials::Attributes::SupportedFabrics::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR OperationalCredentialsClusterTest::WriteAttributeCommissionedFabrics(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, OperationalCredentials::Attributes::CommissionedFabrics::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR OperationalCredentialsClusterTest::WriteAttributeCurrentFabricIndex(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - chip::FabricIndex value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, OperationalCredentials::Attributes::CurrentFabricIndex::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR OperationalCredentialsClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, OperationalCredentials::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR PowerSourceClusterTest::WriteAttributeStatus(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, PowerSource::Attributes::Status::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR PowerSourceClusterTest::WriteAttributeOrder(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, PowerSource::Attributes::Order::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR PowerSourceClusterTest::WriteAttributeDescription(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, chip::CharSpan value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, PowerSource::Attributes::Description::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR PowerSourceClusterTest::WriteAttributeBatteryVoltage(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, PowerSource::Attributes::BatteryVoltage::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR PowerSourceClusterTest::WriteAttributeBatteryPercentRemaining(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, PowerSource::Attributes::BatteryPercentRemaining::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR PowerSourceClusterTest::WriteAttributeBatteryTimeRemaining(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, PowerSource::Attributes::BatteryTimeRemaining::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR PowerSourceClusterTest::WriteAttributeBatteryChargeLevel(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, PowerSource::Attributes::BatteryChargeLevel::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR PowerSourceClusterTest::WriteAttributeBatteryChargeState(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, PowerSource::Attributes::BatteryChargeState::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR PowerSourceClusterTest::WriteAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, PowerSource::Attributes::FeatureMap::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR PowerSourceClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, PowerSource::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR PowerSourceConfigurationClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, PowerSourceConfiguration::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR PressureMeasurementClusterTest::WriteAttributeMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, int16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, PressureMeasurement::Attributes::MeasuredValue::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR PressureMeasurementClusterTest::WriteAttributeMinMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, int16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, PressureMeasurement::Attributes::MinMeasuredValue::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR PressureMeasurementClusterTest::WriteAttributeMaxMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, int16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, PressureMeasurement::Attributes::MaxMeasuredValue::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR PressureMeasurementClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, PressureMeasurement::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeMaxPressure(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - int16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::MaxPressure::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeMaxSpeed(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::MaxSpeed::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeMaxFlow(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::MaxFlow::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeMinConstPressure(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - int16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::MinConstPressure::Id), - value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeMaxConstPressure(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - int16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::MaxConstPressure::Id), - value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeMinCompPressure(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - int16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::MinCompPressure::Id), - value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeMaxCompPressure(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - int16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::MaxCompPressure::Id), - value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeMinConstSpeed(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::MinConstSpeed::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeMaxConstSpeed(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::MaxConstSpeed::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeMinConstFlow(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::MinConstFlow::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeMaxConstFlow(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::MaxConstFlow::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeMinConstTemp(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - int16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::MinConstTemp::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeMaxConstTemp(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - int16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::MaxConstTemp::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributePumpStatus(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::PumpStatus::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeEffectiveOperationMode(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::EffectiveOperationMode::Id), - value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeEffectiveControlMode(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::EffectiveControlMode::Id), - value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeCapacity(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, int16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::Capacity::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeSpeed(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::Speed::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributePower(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::Power::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeAlarmMask(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::AlarmMask::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::FeatureMap::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR PumpConfigurationAndControlClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, PumpConfigurationAndControl::Attributes::ClusterRevision::Id), - value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR RelativeHumidityMeasurementClusterTest::WriteAttributeMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, RelativeHumidityMeasurement::Attributes::MeasuredValue::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR RelativeHumidityMeasurementClusterTest::WriteAttributeMinMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, RelativeHumidityMeasurement::Attributes::MinMeasuredValue::Id), - value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR RelativeHumidityMeasurementClusterTest::WriteAttributeMaxMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::Id), - value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR RelativeHumidityMeasurementClusterTest::WriteAttributeTolerance(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, RelativeHumidityMeasurement::Attributes::Tolerance::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR RelativeHumidityMeasurementClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, RelativeHumidityMeasurement::Attributes::ClusterRevision::Id), - value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ScenesClusterTest::WriteAttributeSceneCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, Scenes::Attributes::SceneCount::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ScenesClusterTest::WriteAttributeCurrentScene(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, Scenes::Attributes::CurrentScene::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ScenesClusterTest::WriteAttributeCurrentGroup(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, Scenes::Attributes::CurrentGroup::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ScenesClusterTest::WriteAttributeSceneValid(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, bool value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, Scenes::Attributes::SceneValid::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ScenesClusterTest::WriteAttributeNameSupport(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, Scenes::Attributes::NameSupport::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ScenesClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, Scenes::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR SoftwareDiagnosticsClusterTest::WriteAttributeCurrentHeapFree(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint64_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, SoftwareDiagnostics::Attributes::CurrentHeapFree::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR SoftwareDiagnosticsClusterTest::WriteAttributeCurrentHeapUsed(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint64_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, SoftwareDiagnostics::Attributes::CurrentHeapUsed::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR SoftwareDiagnosticsClusterTest::WriteAttributeCurrentHeapHighWatermark(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint64_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::Id), - value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR SoftwareDiagnosticsClusterTest::WriteAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, SoftwareDiagnostics::Attributes::FeatureMap::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR SoftwareDiagnosticsClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, SoftwareDiagnostics::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR SwitchClusterTest::WriteAttributeNumberOfPositions(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, Switch::Attributes::NumberOfPositions::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR SwitchClusterTest::WriteAttributeCurrentPosition(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, Switch::Attributes::CurrentPosition::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR SwitchClusterTest::WriteAttributeMultiPressMax(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, Switch::Attributes::MultiPressMax::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR SwitchClusterTest::WriteAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, Switch::Attributes::FeatureMap::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR SwitchClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, Switch::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TvChannelClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, TvChannel::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TargetNavigatorClusterTest::WriteAttributeCurrentNavigatorTarget(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, TargetNavigator::Attributes::CurrentNavigatorTarget::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR TargetNavigatorClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, TargetNavigator::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TemperatureMeasurementClusterTest::WriteAttributeMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, int16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, TemperatureMeasurement::Attributes::MeasuredValue::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR TemperatureMeasurementClusterTest::WriteAttributeMinMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - int16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, TemperatureMeasurement::Attributes::MinMeasuredValue::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR TemperatureMeasurementClusterTest::WriteAttributeMaxMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - int16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, TemperatureMeasurement::Attributes::MaxMeasuredValue::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR TemperatureMeasurementClusterTest::WriteAttributeTolerance(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, TemperatureMeasurement::Attributes::Tolerance::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR TemperatureMeasurementClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, TemperatureMeasurement::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TestClusterClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, TestCluster::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThermostatClusterTest::WriteAttributeLocalTemperature(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, int16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, Thermostat::Attributes::LocalTemperature::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThermostatClusterTest::WriteAttributeAbsMinHeatSetpointLimit(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, int16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, Thermostat::Attributes::AbsMinHeatSetpointLimit::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThermostatClusterTest::WriteAttributeAbsMaxHeatSetpointLimit(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, int16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, Thermostat::Attributes::AbsMaxHeatSetpointLimit::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThermostatClusterTest::WriteAttributeAbsMinCoolSetpointLimit(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, int16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, Thermostat::Attributes::AbsMinCoolSetpointLimit::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThermostatClusterTest::WriteAttributeAbsMaxCoolSetpointLimit(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, int16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, Thermostat::Attributes::AbsMaxCoolSetpointLimit::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThermostatClusterTest::WriteAttributeStartOfWeek(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, Thermostat::Attributes::StartOfWeek::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThermostatClusterTest::WriteAttributeNumberOfWeeklyTransitions(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, Thermostat::Attributes::NumberOfWeeklyTransitions::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThermostatClusterTest::WriteAttributeNumberOfDailyTransitions(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, Thermostat::Attributes::NumberOfDailyTransitions::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThermostatClusterTest::WriteAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, Thermostat::Attributes::FeatureMap::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThermostatClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, Thermostat::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThermostatUserInterfaceConfigurationClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, - ThermostatUserInterfaceConfiguration::Attributes::ClusterRevision::Id), - value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeChannel(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::Channel::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRoutingRole(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::RoutingRole::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeNetworkName(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - chip::ByteSpan value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::NetworkName::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributePanId(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::PanId::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeExtendedPanId(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint64_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::ExtendedPanId::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeMeshLocalPrefix(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - chip::ByteSpan value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeOverrunCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint64_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::OverrunCount::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributePartitionId(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::PartitionId::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeWeighting(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::Weighting::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeDataVersion(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::DataVersion::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeStableDataVersion(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::StableDataVersion::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeLeaderRouterId(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::LeaderRouterId::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeDetachedRoleCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeChildRoleCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::ChildRoleCount::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRouterRoleCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::RouterRoleCount::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeLeaderRoleCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeAttachAttemptCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::Id), - value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributePartitionIdChangeCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::Id), - value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeBetterPartitionAttachAttemptCount( - Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, - ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::Id), - value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeParentChangeCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::ParentChangeCount::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxTotalCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::TxTotalCount::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxUnicastCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::TxUnicastCount::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxBroadcastCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxAckRequestedCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::Id), - value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxAckedCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::TxAckedCount::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxNoAckRequestedCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::Id), - value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxDataCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::TxDataCount::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxDataPollCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::TxDataPollCount::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxBeaconCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::TxBeaconCount::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxBeaconRequestCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::Id), - value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxOtherCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::TxOtherCount::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxRetryCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::TxRetryCount::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxDirectMaxRetryExpiryCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, - ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::Id), - value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxIndirectMaxRetryExpiryCount( - Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, - ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::Id), - value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxErrCcaCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxErrAbortCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeTxErrBusyChannelCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::Id), - value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxTotalCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::RxTotalCount::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxUnicastCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::RxUnicastCount::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxBroadcastCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxDataCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::RxDataCount::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxDataPollCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::RxDataPollCount::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxBeaconCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::RxBeaconCount::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxBeaconRequestCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::Id), - value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxOtherCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::RxOtherCount::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxAddressFilteredCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::Id), - value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxDestAddrFilteredCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::Id), - value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxDuplicatedCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxErrNoFrameCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxErrUnknownNeighborCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::Id), - value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxErrInvalidSrcAddrCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::Id), - value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxErrSecCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::RxErrSecCount::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxErrFcsCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeRxErrOtherCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeActiveTimestamp(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint64_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributePendingTimestamp(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint64_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::PendingTimestamp::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeDelay(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::Delay::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeChannelMask(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - chip::ByteSpan value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::ChannelMask::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::FeatureMap::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR ThreadNetworkDiagnosticsClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, ThreadNetworkDiagnostics::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR WakeOnLanClusterTest::WriteAttributeWakeOnLanMacAddress(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, chip::CharSpan value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, WakeOnLan::Attributes::WakeOnLanMacAddress::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR WakeOnLanClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, WakeOnLan::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR WiFiNetworkDiagnosticsClusterTest::WriteAttributeBssid(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, chip::ByteSpan value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, WiFiNetworkDiagnostics::Attributes::Bssid::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR WiFiNetworkDiagnosticsClusterTest::WriteAttributeSecurityType(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, WiFiNetworkDiagnostics::Attributes::SecurityType::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR WiFiNetworkDiagnosticsClusterTest::WriteAttributeWiFiVersion(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, WiFiNetworkDiagnostics::Attributes::WiFiVersion::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR WiFiNetworkDiagnosticsClusterTest::WriteAttributeChannelNumber(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, WiFiNetworkDiagnostics::Attributes::ChannelNumber::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR WiFiNetworkDiagnosticsClusterTest::WriteAttributeRssi(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, int8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, WiFiNetworkDiagnostics::Attributes::Rssi::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR WiFiNetworkDiagnosticsClusterTest::WriteAttributeBeaconLostCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, WiFiNetworkDiagnostics::Attributes::BeaconLostCount::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR WiFiNetworkDiagnosticsClusterTest::WriteAttributeBeaconRxCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, WiFiNetworkDiagnostics::Attributes::BeaconRxCount::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR WiFiNetworkDiagnosticsClusterTest::WriteAttributePacketMulticastRxCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::Id), - value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR WiFiNetworkDiagnosticsClusterTest::WriteAttributePacketMulticastTxCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::Id), - value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR WiFiNetworkDiagnosticsClusterTest::WriteAttributePacketUnicastRxCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::Id), - value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR WiFiNetworkDiagnosticsClusterTest::WriteAttributePacketUnicastTxCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::Id), - value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR WiFiNetworkDiagnosticsClusterTest::WriteAttributeCurrentMaxRate(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint64_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR WiFiNetworkDiagnosticsClusterTest::WriteAttributeOverrunCount(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint64_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, WiFiNetworkDiagnostics::Attributes::OverrunCount::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR WiFiNetworkDiagnosticsClusterTest::WriteAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, WiFiNetworkDiagnostics::Attributes::FeatureMap::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR WiFiNetworkDiagnosticsClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, WiFiNetworkDiagnostics::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR WindowCoveringClusterTest::WriteAttributeType(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, WindowCovering::Attributes::Type::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR WindowCoveringClusterTest::WriteAttributeCurrentPositionLift(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, WindowCovering::Attributes::CurrentPositionLift::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR WindowCoveringClusterTest::WriteAttributeCurrentPositionTilt(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, WindowCovering::Attributes::CurrentPositionTilt::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR WindowCoveringClusterTest::WriteAttributeConfigStatus(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, WindowCovering::Attributes::ConfigStatus::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR WindowCoveringClusterTest::WriteAttributeCurrentPositionLiftPercentage(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, WindowCovering::Attributes::CurrentPositionLiftPercentage::Id), - value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR WindowCoveringClusterTest::WriteAttributeCurrentPositionTiltPercentage(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, WindowCovering::Attributes::CurrentPositionTiltPercentage::Id), - value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR WindowCoveringClusterTest::WriteAttributeOperationalStatus(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, WindowCovering::Attributes::OperationalStatus::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR WindowCoveringClusterTest::WriteAttributeTargetPositionLiftPercent100ths(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, WindowCovering::Attributes::TargetPositionLiftPercent100ths::Id), - value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR WindowCoveringClusterTest::WriteAttributeTargetPositionTiltPercent100ths(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, WindowCovering::Attributes::TargetPositionTiltPercent100ths::Id), - value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR WindowCoveringClusterTest::WriteAttributeEndProductType(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint8_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, WindowCovering::Attributes::EndProductType::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR WindowCoveringClusterTest::WriteAttributeCurrentPositionLiftPercent100ths(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, WindowCovering::Attributes::CurrentPositionLiftPercent100ths::Id), - value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR WindowCoveringClusterTest::WriteAttributeCurrentPositionTiltPercent100ths(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, WindowCovering::Attributes::CurrentPositionTiltPercent100ths::Id), - value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR WindowCoveringClusterTest::WriteAttributeInstalledOpenLimitLift(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, WindowCovering::Attributes::InstalledOpenLimitLift::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR WindowCoveringClusterTest::WriteAttributeInstalledClosedLimitLift(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, WindowCovering::Attributes::InstalledClosedLimitLift::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR WindowCoveringClusterTest::WriteAttributeInstalledOpenLimitTilt(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, WindowCovering::Attributes::InstalledOpenLimitTilt::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR WindowCoveringClusterTest::WriteAttributeInstalledClosedLimitTilt(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, WindowCovering::Attributes::InstalledClosedLimitTilt::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR WindowCoveringClusterTest::WriteAttributeSafetyStatus(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, WindowCovering::Attributes::SafetyStatus::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR WindowCoveringClusterTest::WriteAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint32_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, WindowCovering::Attributes::FeatureMap::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} -CHIP_ERROR WindowCoveringClusterTest::WriteAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t value) -{ - app::WriteClientHandle handle; - ReturnErrorOnFailure( - app::InteractionModelEngine::GetInstance()->NewWriteClient(handle, mDevice->GetInteractionModelDelegate())); - ReturnErrorOnFailure(handle.EncodeAttributeWritePayload( - chip::app::AttributePathParams(mEndpoint, mClusterId, WindowCovering::Attributes::ClusterRevision::Id), value)); - return mDevice->SendWriteAttributeRequest(std::move(handle), onSuccessCallback, onFailureCallback); -} - -} // namespace Controller -} // namespace chip diff --git a/zzz_generated/lighting-app/zap-generated/CHIPClusters.cpp b/zzz_generated/lighting-app/zap-generated/CHIPClusters.cpp index ba1cdf93cacdfe..e4f1af2542fbd8 100644 --- a/zzz_generated/lighting-app/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/lighting-app/zap-generated/CHIPClusters.cpp @@ -184,127 +184,7 @@ CHIP_ERROR OtaSoftwareUpdateProviderCluster::QueryImage(Callback::Cancelable * o return err; } -// OtaSoftwareUpdateProvider Cluster Attributes - // OnOff Cluster Commands -// OnOff Cluster Attributes -CHIP_ERROR OnOffCluster::SubscribeAttributeOnOff(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = OnOff::Attributes::OnOff::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR OnOffCluster::ReportAttributeOnOff(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(OnOff::Attributes::OnOff::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR OnOffCluster::SubscribeAttributeGlobalSceneControl(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = OnOff::Attributes::GlobalSceneControl::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR OnOffCluster::ReportAttributeGlobalSceneControl(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(OnOff::Attributes::GlobalSceneControl::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR OnOffCluster::SubscribeAttributeOnTime(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = OnOff::Attributes::OnTime::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR OnOffCluster::ReportAttributeOnTime(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(OnOff::Attributes::OnTime::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR OnOffCluster::SubscribeAttributeOffWaitTime(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = OnOff::Attributes::OffWaitTime::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR OnOffCluster::ReportAttributeOffWaitTime(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(OnOff::Attributes::OffWaitTime::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR OnOffCluster::SubscribeAttributeStartUpOnOff(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = OnOff::Attributes::StartUpOnOff::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR OnOffCluster::ReportAttributeStartUpOnOff(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(OnOff::Attributes::StartUpOnOff::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR OnOffCluster::SubscribeAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::FeatureMap::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR OnOffCluster::ReportAttributeFeatureMap(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::FeatureMap::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR OnOffCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR OnOffCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} } // namespace Controller } // namespace chip diff --git a/zzz_generated/lighting-app/zap-generated/CHIPClusters.h b/zzz_generated/lighting-app/zap-generated/CHIPClusters.h index 08c9d3509a9f43..b676e14c0d9747 100644 --- a/zzz_generated/lighting-app/zap-generated/CHIPClusters.h +++ b/zzz_generated/lighting-app/zap-generated/CHIPClusters.h @@ -45,10 +45,6 @@ class DLL_EXPORT OtaSoftwareUpdateProviderCluster : public ClusterBase chip::VendorId vendorId, uint16_t productId, uint32_t softwareVersion, uint8_t protocolsSupported, uint16_t hardwareVersion, chip::CharSpan location, bool requestorCanConsent, chip::ByteSpan metadataForProvider); - - // Cluster Attributes - -private: }; class DLL_EXPORT OnOffCluster : public ClusterBase @@ -56,30 +52,6 @@ class DLL_EXPORT OnOffCluster : public ClusterBase public: OnOffCluster() : ClusterBase(app::Clusters::OnOff::Id) {} ~OnOffCluster() {} - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeOnOff(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeOnOff(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeGlobalSceneControl(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeGlobalSceneControl(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeOnTime(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeOnTime(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeOffWaitTime(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeOffWaitTime(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeStartUpOnOff(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeStartUpOnOff(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeFeatureMap(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeFeatureMap(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); }; } // namespace Controller diff --git a/zzz_generated/log-source-app/zap-generated/CHIPClusters.cpp b/zzz_generated/log-source-app/zap-generated/CHIPClusters.cpp index 3175e85910ea91..a230c51a3c6f07 100644 --- a/zzz_generated/log-source-app/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/log-source-app/zap-generated/CHIPClusters.cpp @@ -35,7 +35,6 @@ namespace Controller { // TODO(#4503): Commands should take group id as an argument. // DiagnosticLogs Cluster Commands -// DiagnosticLogs Cluster Attributes } // namespace Controller } // namespace chip diff --git a/zzz_generated/log-source-app/zap-generated/CHIPClusters.h b/zzz_generated/log-source-app/zap-generated/CHIPClusters.h index 7b704c88b2dc36..e7e8d21f076fa6 100644 --- a/zzz_generated/log-source-app/zap-generated/CHIPClusters.h +++ b/zzz_generated/log-source-app/zap-generated/CHIPClusters.h @@ -35,8 +35,6 @@ class DLL_EXPORT DiagnosticLogsCluster : public ClusterBase public: DiagnosticLogsCluster() : ClusterBase(app::Clusters::DiagnosticLogs::Id) {} ~DiagnosticLogsCluster() {} - - // Cluster Attributes }; } // namespace Controller diff --git a/zzz_generated/ota-requestor-app/zap-generated/CHIPClusters.cpp b/zzz_generated/ota-requestor-app/zap-generated/CHIPClusters.cpp index 9cc87d3624e9df..610435b71adc00 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/ota-requestor-app/zap-generated/CHIPClusters.cpp @@ -184,23 +184,5 @@ CHIP_ERROR OtaSoftwareUpdateProviderCluster::QueryImage(Callback::Cancelable * o return err; } -// OtaSoftwareUpdateProvider Cluster Attributes -CHIP_ERROR OtaSoftwareUpdateProviderCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR OtaSoftwareUpdateProviderCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} - } // namespace Controller } // namespace chip diff --git a/zzz_generated/ota-requestor-app/zap-generated/CHIPClusters.h b/zzz_generated/ota-requestor-app/zap-generated/CHIPClusters.h index 213ff93d0e6c54..908506defd13e0 100644 --- a/zzz_generated/ota-requestor-app/zap-generated/CHIPClusters.h +++ b/zzz_generated/ota-requestor-app/zap-generated/CHIPClusters.h @@ -45,13 +45,6 @@ class DLL_EXPORT OtaSoftwareUpdateProviderCluster : public ClusterBase chip::VendorId vendorId, uint16_t productId, uint32_t softwareVersion, uint8_t protocolsSupported, uint16_t hardwareVersion, chip::CharSpan location, bool requestorCanConsent, chip::ByteSpan metadataForProvider); - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); - -private: }; } // namespace Controller diff --git a/zzz_generated/pump-app/zap-generated/CHIPClusters.cpp b/zzz_generated/pump-app/zap-generated/CHIPClusters.cpp index a389adc1243490..d9be8496dcf259 100644 --- a/zzz_generated/pump-app/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/pump-app/zap-generated/CHIPClusters.cpp @@ -35,214 +35,10 @@ namespace Controller { // TODO(#4503): Commands should take group id as an argument. // FlowMeasurement Cluster Commands -// FlowMeasurement Cluster Attributes -CHIP_ERROR FlowMeasurementCluster::SubscribeAttributeMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = FlowMeasurement::Attributes::MeasuredValue::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR FlowMeasurementCluster::ReportAttributeMeasuredValue(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(FlowMeasurement::Attributes::MeasuredValue::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR FlowMeasurementCluster::SubscribeAttributeMinMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = FlowMeasurement::Attributes::MinMeasuredValue::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR FlowMeasurementCluster::ReportAttributeMinMeasuredValue(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(FlowMeasurement::Attributes::MinMeasuredValue::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR FlowMeasurementCluster::SubscribeAttributeMaxMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = FlowMeasurement::Attributes::MaxMeasuredValue::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR FlowMeasurementCluster::ReportAttributeMaxMeasuredValue(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(FlowMeasurement::Attributes::MaxMeasuredValue::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR FlowMeasurementCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR FlowMeasurementCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} // PressureMeasurement Cluster Commands -// PressureMeasurement Cluster Attributes -CHIP_ERROR PressureMeasurementCluster::SubscribeAttributeMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PressureMeasurement::Attributes::MeasuredValue::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR PressureMeasurementCluster::ReportAttributeMeasuredValue(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PressureMeasurement::Attributes::MeasuredValue::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR PressureMeasurementCluster::SubscribeAttributeMinMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PressureMeasurement::Attributes::MinMeasuredValue::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR PressureMeasurementCluster::ReportAttributeMinMeasuredValue(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PressureMeasurement::Attributes::MinMeasuredValue::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR PressureMeasurementCluster::SubscribeAttributeMaxMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PressureMeasurement::Attributes::MaxMeasuredValue::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR PressureMeasurementCluster::ReportAttributeMaxMeasuredValue(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PressureMeasurement::Attributes::MaxMeasuredValue::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR PressureMeasurementCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR PressureMeasurementCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} // TemperatureMeasurement Cluster Commands -// TemperatureMeasurement Cluster Attributes -CHIP_ERROR TemperatureMeasurementCluster::SubscribeAttributeMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TemperatureMeasurement::Attributes::MeasuredValue::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TemperatureMeasurementCluster::ReportAttributeMeasuredValue(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TemperatureMeasurement::Attributes::MeasuredValue::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TemperatureMeasurementCluster::SubscribeAttributeMinMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TemperatureMeasurement::Attributes::MinMeasuredValue::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TemperatureMeasurementCluster::ReportAttributeMinMeasuredValue(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TemperatureMeasurement::Attributes::MinMeasuredValue::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TemperatureMeasurementCluster::SubscribeAttributeMaxMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TemperatureMeasurement::Attributes::MaxMeasuredValue::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TemperatureMeasurementCluster::ReportAttributeMaxMeasuredValue(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TemperatureMeasurement::Attributes::MaxMeasuredValue::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TemperatureMeasurementCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TemperatureMeasurementCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} } // namespace Controller } // namespace chip diff --git a/zzz_generated/pump-app/zap-generated/CHIPClusters.h b/zzz_generated/pump-app/zap-generated/CHIPClusters.h index 6cef2576cb11e0..2395f712efe45c 100644 --- a/zzz_generated/pump-app/zap-generated/CHIPClusters.h +++ b/zzz_generated/pump-app/zap-generated/CHIPClusters.h @@ -35,22 +35,6 @@ class DLL_EXPORT FlowMeasurementCluster : public ClusterBase public: FlowMeasurementCluster() : ClusterBase(app::Clusters::FlowMeasurement::Id) {} ~FlowMeasurementCluster() {} - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeMeasuredValue(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeMeasuredValue(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMinMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeMinMeasuredValue(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMaxMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeMaxMeasuredValue(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); }; class DLL_EXPORT PressureMeasurementCluster : public ClusterBase @@ -58,22 +42,6 @@ class DLL_EXPORT PressureMeasurementCluster : public ClusterBase public: PressureMeasurementCluster() : ClusterBase(app::Clusters::PressureMeasurement::Id) {} ~PressureMeasurementCluster() {} - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeMeasuredValue(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeMeasuredValue(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMinMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeMinMeasuredValue(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMaxMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeMaxMeasuredValue(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); }; class DLL_EXPORT TemperatureMeasurementCluster : public ClusterBase @@ -81,22 +49,6 @@ class DLL_EXPORT TemperatureMeasurementCluster : public ClusterBase public: TemperatureMeasurementCluster() : ClusterBase(app::Clusters::TemperatureMeasurement::Id) {} ~TemperatureMeasurementCluster() {} - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeMeasuredValue(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeMeasuredValue(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMinMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeMinMeasuredValue(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMaxMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeMaxMeasuredValue(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); }; } // namespace Controller diff --git a/zzz_generated/pump-controller-app/zap-generated/CHIPClusters.cpp b/zzz_generated/pump-controller-app/zap-generated/CHIPClusters.cpp index 8d145aae4d82bf..5d5bc2ded1b7e5 100644 --- a/zzz_generated/pump-controller-app/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/pump-controller-app/zap-generated/CHIPClusters.cpp @@ -35,74 +35,6 @@ namespace Controller { // TODO(#4503): Commands should take group id as an argument. // FlowMeasurement Cluster Commands -// FlowMeasurement Cluster Attributes -CHIP_ERROR FlowMeasurementCluster::SubscribeAttributeMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = FlowMeasurement::Attributes::MeasuredValue::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR FlowMeasurementCluster::ReportAttributeMeasuredValue(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(FlowMeasurement::Attributes::MeasuredValue::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR FlowMeasurementCluster::SubscribeAttributeMinMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = FlowMeasurement::Attributes::MinMeasuredValue::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR FlowMeasurementCluster::ReportAttributeMinMeasuredValue(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(FlowMeasurement::Attributes::MinMeasuredValue::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR FlowMeasurementCluster::SubscribeAttributeMaxMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = FlowMeasurement::Attributes::MaxMeasuredValue::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR FlowMeasurementCluster::ReportAttributeMaxMeasuredValue(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(FlowMeasurement::Attributes::MaxMeasuredValue::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR FlowMeasurementCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR FlowMeasurementCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} // LevelControl Cluster Commands CHIP_ERROR LevelControlCluster::Move(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, @@ -462,41 +394,6 @@ CHIP_ERROR LevelControlCluster::StopWithOnOff(Callback::Cancelable * onSuccessCa return err; } -// LevelControl Cluster Attributes -CHIP_ERROR LevelControlCluster::SubscribeAttributeCurrentLevel(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = LevelControl::Attributes::CurrentLevel::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR LevelControlCluster::ReportAttributeCurrentLevel(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(LevelControl::Attributes::CurrentLevel::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR LevelControlCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR LevelControlCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} - // OnOff Cluster Commands CHIP_ERROR OnOffCluster::Off(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback) { @@ -612,317 +509,11 @@ CHIP_ERROR OnOffCluster::Toggle(Callback::Cancelable * onSuccessCallback, Callba return err; } -// OnOff Cluster Attributes -CHIP_ERROR OnOffCluster::SubscribeAttributeOnOff(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = OnOff::Attributes::OnOff::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR OnOffCluster::ReportAttributeOnOff(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(OnOff::Attributes::OnOff::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR OnOffCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR OnOffCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} - // PressureMeasurement Cluster Commands -// PressureMeasurement Cluster Attributes -CHIP_ERROR PressureMeasurementCluster::SubscribeAttributeMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PressureMeasurement::Attributes::MeasuredValue::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR PressureMeasurementCluster::ReportAttributeMeasuredValue(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PressureMeasurement::Attributes::MeasuredValue::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR PressureMeasurementCluster::SubscribeAttributeMinMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PressureMeasurement::Attributes::MinMeasuredValue::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR PressureMeasurementCluster::ReportAttributeMinMeasuredValue(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PressureMeasurement::Attributes::MinMeasuredValue::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR PressureMeasurementCluster::SubscribeAttributeMaxMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PressureMeasurement::Attributes::MaxMeasuredValue::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR PressureMeasurementCluster::ReportAttributeMaxMeasuredValue(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PressureMeasurement::Attributes::MaxMeasuredValue::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR PressureMeasurementCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR PressureMeasurementCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} // PumpConfigurationAndControl Cluster Commands -// PumpConfigurationAndControl Cluster Attributes -CHIP_ERROR PumpConfigurationAndControlCluster::SubscribeAttributeMaxPressure(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PumpConfigurationAndControl::Attributes::MaxPressure::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::ReportAttributeMaxPressure(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PumpConfigurationAndControl::Attributes::MaxPressure::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::SubscribeAttributeMaxSpeed(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PumpConfigurationAndControl::Attributes::MaxSpeed::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::ReportAttributeMaxSpeed(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PumpConfigurationAndControl::Attributes::MaxSpeed::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::SubscribeAttributeMaxFlow(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PumpConfigurationAndControl::Attributes::MaxFlow::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::ReportAttributeMaxFlow(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PumpConfigurationAndControl::Attributes::MaxFlow::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::SubscribeAttributeEffectiveOperationMode(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PumpConfigurationAndControl::Attributes::EffectiveOperationMode::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::ReportAttributeEffectiveOperationMode(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PumpConfigurationAndControl::Attributes::EffectiveOperationMode::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::SubscribeAttributeEffectiveControlMode(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PumpConfigurationAndControl::Attributes::EffectiveControlMode::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::ReportAttributeEffectiveControlMode(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PumpConfigurationAndControl::Attributes::EffectiveControlMode::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::SubscribeAttributeCapacity(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PumpConfigurationAndControl::Attributes::Capacity::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::ReportAttributeCapacity(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PumpConfigurationAndControl::Attributes::Capacity::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::SubscribeAttributeOperationMode(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = PumpConfigurationAndControl::Attributes::OperationMode::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::ReportAttributeOperationMode(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(PumpConfigurationAndControl::Attributes::OperationMode::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR PumpConfigurationAndControlCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} // TemperatureMeasurement Cluster Commands -// TemperatureMeasurement Cluster Attributes -CHIP_ERROR TemperatureMeasurementCluster::SubscribeAttributeMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TemperatureMeasurement::Attributes::MeasuredValue::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TemperatureMeasurementCluster::ReportAttributeMeasuredValue(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TemperatureMeasurement::Attributes::MeasuredValue::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TemperatureMeasurementCluster::SubscribeAttributeMinMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TemperatureMeasurement::Attributes::MinMeasuredValue::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TemperatureMeasurementCluster::ReportAttributeMinMeasuredValue(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TemperatureMeasurement::Attributes::MinMeasuredValue::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TemperatureMeasurementCluster::SubscribeAttributeMaxMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = TemperatureMeasurement::Attributes::MaxMeasuredValue::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TemperatureMeasurementCluster::ReportAttributeMaxMeasuredValue(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(TemperatureMeasurement::Attributes::MaxMeasuredValue::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR TemperatureMeasurementCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR TemperatureMeasurementCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} } // namespace Controller } // namespace chip diff --git a/zzz_generated/pump-controller-app/zap-generated/CHIPClusters.h b/zzz_generated/pump-controller-app/zap-generated/CHIPClusters.h index 1cc5a7e2028c2f..61aace6b8b9f3f 100644 --- a/zzz_generated/pump-controller-app/zap-generated/CHIPClusters.h +++ b/zzz_generated/pump-controller-app/zap-generated/CHIPClusters.h @@ -35,22 +35,6 @@ class DLL_EXPORT FlowMeasurementCluster : public ClusterBase public: FlowMeasurementCluster() : ClusterBase(app::Clusters::FlowMeasurement::Id) {} ~FlowMeasurementCluster() {} - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeMeasuredValue(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeMeasuredValue(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMinMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeMinMeasuredValue(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMaxMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeMaxMeasuredValue(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); }; class DLL_EXPORT LevelControlCluster : public ClusterBase @@ -75,16 +59,6 @@ class DLL_EXPORT LevelControlCluster : public ClusterBase CHIP_ERROR Stop(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t optionMask, uint8_t optionOverride); CHIP_ERROR StopWithOnOff(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeCurrentLevel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeCurrentLevel(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); - -private: }; class DLL_EXPORT OnOffCluster : public ClusterBase @@ -97,16 +71,6 @@ class DLL_EXPORT OnOffCluster : public ClusterBase CHIP_ERROR Off(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); CHIP_ERROR On(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); CHIP_ERROR Toggle(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeOnOff(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeOnOff(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); - -private: }; class DLL_EXPORT PressureMeasurementCluster : public ClusterBase @@ -114,22 +78,6 @@ class DLL_EXPORT PressureMeasurementCluster : public ClusterBase public: PressureMeasurementCluster() : ClusterBase(app::Clusters::PressureMeasurement::Id) {} ~PressureMeasurementCluster() {} - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeMeasuredValue(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeMeasuredValue(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMinMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeMinMeasuredValue(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMaxMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeMaxMeasuredValue(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); }; class DLL_EXPORT PumpConfigurationAndControlCluster : public ClusterBase @@ -137,34 +85,6 @@ class DLL_EXPORT PumpConfigurationAndControlCluster : public ClusterBase public: PumpConfigurationAndControlCluster() : ClusterBase(app::Clusters::PumpConfigurationAndControl::Id) {} ~PumpConfigurationAndControlCluster() {} - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeMaxPressure(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeMaxPressure(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMaxSpeed(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeMaxSpeed(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMaxFlow(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeMaxFlow(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeEffectiveOperationMode(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeEffectiveOperationMode(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeEffectiveControlMode(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeEffectiveControlMode(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeCapacity(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeCapacity(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeOperationMode(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeOperationMode(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); }; class DLL_EXPORT TemperatureMeasurementCluster : public ClusterBase @@ -172,22 +92,6 @@ class DLL_EXPORT TemperatureMeasurementCluster : public ClusterBase public: TemperatureMeasurementCluster() : ClusterBase(app::Clusters::TemperatureMeasurement::Id) {} ~TemperatureMeasurementCluster() {} - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeMeasuredValue(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeMeasuredValue(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMinMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeMinMeasuredValue(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeMaxMeasuredValue(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeMaxMeasuredValue(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); }; } // namespace Controller diff --git a/zzz_generated/thermostat/zap-generated/CHIPClusters.cpp b/zzz_generated/thermostat/zap-generated/CHIPClusters.cpp index a77c77a4105bff..3570368f8f26b7 100644 --- a/zzz_generated/thermostat/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/thermostat/zap-generated/CHIPClusters.cpp @@ -114,57 +114,5 @@ CHIP_ERROR IdentifyCluster::IdentifyQuery(Callback::Cancelable * onSuccessCallba return err; } -// Identify Cluster Attributes -CHIP_ERROR IdentifyCluster::SubscribeAttributeIdentifyTime(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Identify::Attributes::IdentifyTime::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR IdentifyCluster::ReportAttributeIdentifyTime(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Identify::Attributes::IdentifyTime::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR IdentifyCluster::SubscribeAttributeIdentifyType(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Identify::Attributes::IdentifyType::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR IdentifyCluster::ReportAttributeIdentifyType(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Identify::Attributes::IdentifyType::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR IdentifyCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR IdentifyCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} - } // namespace Controller } // namespace chip diff --git a/zzz_generated/thermostat/zap-generated/CHIPClusters.h b/zzz_generated/thermostat/zap-generated/CHIPClusters.h index 0cb414ecfb0550..2e5cbd30f56076 100644 --- a/zzz_generated/thermostat/zap-generated/CHIPClusters.h +++ b/zzz_generated/thermostat/zap-generated/CHIPClusters.h @@ -39,19 +39,6 @@ class DLL_EXPORT IdentifyCluster : public ClusterBase // Cluster Commands CHIP_ERROR Identify(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint16_t identifyTime); CHIP_ERROR IdentifyQuery(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeIdentifyTime(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeIdentifyTime(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeIdentifyType(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeIdentifyType(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); - -private: }; } // namespace Controller diff --git a/zzz_generated/tv-app/zap-generated/CHIPClusters.cpp b/zzz_generated/tv-app/zap-generated/CHIPClusters.cpp index fcdf6ed9063385..ae3e8dcaafcfec 100644 --- a/zzz_generated/tv-app/zap-generated/CHIPClusters.cpp +++ b/zzz_generated/tv-app/zap-generated/CHIPClusters.cpp @@ -170,41 +170,6 @@ CHIP_ERROR GeneralCommissioningCluster::SetRegulatoryConfig(Callback::Cancelable return err; } -// GeneralCommissioning Cluster Attributes -CHIP_ERROR GeneralCommissioningCluster::SubscribeAttributeBreadcrumb(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = GeneralCommissioning::Attributes::Breadcrumb::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR GeneralCommissioningCluster::ReportAttributeBreadcrumb(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(GeneralCommissioning::Attributes::Breadcrumb::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR GeneralCommissioningCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR GeneralCommissioningCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} - // NetworkCommissioning Cluster Commands CHIP_ERROR NetworkCommissioningCluster::AddOrUpdateThreadNetwork(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, @@ -478,24 +443,6 @@ CHIP_ERROR NetworkCommissioningCluster::ScanNetworks(Callback::Cancelable * onSu return err; } -// NetworkCommissioning Cluster Attributes -CHIP_ERROR NetworkCommissioningCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR NetworkCommissioningCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} - // OperationalCredentials Cluster Commands CHIP_ERROR OperationalCredentialsCluster::AddNOC(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, chip::ByteSpan NOCValue, chip::ByteSpan ICACValue, chip::ByteSpan IPKValue, @@ -801,74 +748,5 @@ CHIP_ERROR OperationalCredentialsCluster::UpdateFabricLabel(Callback::Cancelable return err; } -// OperationalCredentials Cluster Attributes -CHIP_ERROR OperationalCredentialsCluster::SubscribeAttributeSupportedFabrics(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = OperationalCredentials::Attributes::SupportedFabrics::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR OperationalCredentialsCluster::ReportAttributeSupportedFabrics(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(OperationalCredentials::Attributes::SupportedFabrics::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR OperationalCredentialsCluster::SubscribeAttributeCommissionedFabrics(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = OperationalCredentials::Attributes::CommissionedFabrics::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR OperationalCredentialsCluster::ReportAttributeCommissionedFabrics(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(OperationalCredentials::Attributes::CommissionedFabrics::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR OperationalCredentialsCluster::SubscribeAttributeCurrentFabricIndex(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = OperationalCredentials::Attributes::CurrentFabricIndex::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR OperationalCredentialsCluster::ReportAttributeCurrentFabricIndex(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(OperationalCredentials::Attributes::CurrentFabricIndex::Id, onReportCallback, - BasicAttributeFilter); -} - -CHIP_ERROR OperationalCredentialsCluster::SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval) -{ - chip::app::AttributePathParams attributePath; - attributePath.mEndpointId = mEndpoint; - attributePath.mClusterId = mClusterId; - attributePath.mAttributeId = Globals::Attributes::ClusterRevision::Id; - return mDevice->SendSubscribeAttributeRequest(attributePath, minInterval, maxInterval, onSuccessCallback, onFailureCallback); -} - -CHIP_ERROR OperationalCredentialsCluster::ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback) -{ - return RequestAttributeReporting(Globals::Attributes::ClusterRevision::Id, onReportCallback, - BasicAttributeFilter); -} - } // namespace Controller } // namespace chip diff --git a/zzz_generated/tv-app/zap-generated/CHIPClusters.h b/zzz_generated/tv-app/zap-generated/CHIPClusters.h index 8f2d0c2d2a5326..2b64cd00524e46 100644 --- a/zzz_generated/tv-app/zap-generated/CHIPClusters.h +++ b/zzz_generated/tv-app/zap-generated/CHIPClusters.h @@ -42,16 +42,6 @@ class DLL_EXPORT GeneralCommissioningCluster : public ClusterBase CHIP_ERROR CommissioningComplete(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback); CHIP_ERROR SetRegulatoryConfig(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, uint8_t location, chip::CharSpan countryCode, uint64_t breadcrumb, uint32_t timeoutMs); - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeBreadcrumb(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeBreadcrumb(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); - -private: }; class DLL_EXPORT NetworkCommissioningCluster : public ClusterBase @@ -73,13 +63,6 @@ class DLL_EXPORT NetworkCommissioningCluster : public ClusterBase chip::ByteSpan networkID, uint8_t networkIndex, uint64_t breadcrumb); CHIP_ERROR ScanNetworks(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, chip::ByteSpan ssid, uint64_t breadcrumb); - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); - -private: }; class DLL_EXPORT OperationalCredentialsCluster : public ClusterBase @@ -103,25 +86,6 @@ class DLL_EXPORT OperationalCredentialsCluster : public ClusterBase uint8_t fabricIndex); CHIP_ERROR UpdateFabricLabel(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, chip::CharSpan label); - - // Cluster Attributes - CHIP_ERROR SubscribeAttributeSupportedFabrics(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeSupportedFabrics(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeCommissionedFabrics(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeCommissionedFabrics(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeCurrentFabricIndex(Callback::Cancelable * onSuccessCallback, - Callback::Cancelable * onFailureCallback, uint16_t minInterval, - uint16_t maxInterval); - CHIP_ERROR ReportAttributeCurrentFabricIndex(Callback::Cancelable * onReportCallback); - CHIP_ERROR SubscribeAttributeClusterRevision(Callback::Cancelable * onSuccessCallback, Callback::Cancelable * onFailureCallback, - uint16_t minInterval, uint16_t maxInterval); - CHIP_ERROR ReportAttributeClusterRevision(Callback::Cancelable * onReportCallback); - -private: }; } // namespace Controller